Added cache for cell cost and blocking
This commit is contained in:
@@ -78,7 +78,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return EmptyPath;
|
||||
|
||||
var distance = source - target;
|
||||
if (source.Layer == target.Layer && distance.LengthSquared < 3 && li.CanMoveFreelyInto(world, self, target, null, CellConditions.All))
|
||||
if (source.Layer == target.Layer && distance.LengthSquared < 3 && locomotor.CanMoveFreelyInto(self, target, null, CellConditions.All))
|
||||
return new List<CPos> { target };
|
||||
|
||||
List<CPos> pb;
|
||||
|
||||
Reference in New Issue
Block a user