Minor MoveOrderTargeter optimization
IsTraitPaused should be cheaper than Map.Contains, so let's perform the cheaper check first.
This commit is contained in:
@@ -1003,8 +1003,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
var explored = self.Owner.Shroud.IsExplored(location);
|
||||
|
||||
if (!self.World.Map.Contains(location)
|
||||
|| mobile.IsTraitPaused
|
||||
if (mobile.IsTraitPaused
|
||||
|| !self.World.Map.Contains(location)
|
||||
|| (!explored && !locomotorInfo.MoveIntoShroud)
|
||||
|| (explored && mobile.Locomotor.MovementCostForCell(location) == short.MaxValue))
|
||||
cursor = mobile.Info.BlockedCursor;
|
||||
|
||||
Reference in New Issue
Block a user