clean up duplicate trait lookup in RASpecialPowers

This commit is contained in:
Chris Forbes
2011-10-18 21:52:58 +13:00
parent c790c41465
commit a1dd5cedd4

View File

@@ -35,11 +35,7 @@ namespace OpenRA.Scripting
var targetCell = kv.Second; var targetCell = kv.Second;
var cs = target.Trait<Chronoshiftable>(); var cs = target.Trait<Chronoshiftable>();
if (cs.CanChronoshiftTo(target, targetCell, true)) if (cs.CanChronoshiftTo(target, targetCell, true))
target.Trait<Chronoshiftable>().Teleport(target, cs.Teleport(target, targetCell, duration, killCargo,chronosphere);
targetCell,
duration,
killCargo,
chronosphere);
} }