Add a ReturnToGroundLayerOnIdle flag to CustomMovementLayers
Co-authored-by: Mazar Farran <farranmazar@gmail.com> Co-authored-by: Paul Chote <paul@chote.net>
This commit is contained in:
committed by
reaperrr
parent
8fc483b30b
commit
0bd00d3b7c
@@ -76,7 +76,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return EmptyPath;
|
||||
|
||||
var distance = source - target;
|
||||
if (distance.LengthSquared < 3 && li.CanMoveFreelyInto(world, self, target, null, CellConditions.All))
|
||||
if (source.Layer == target.Layer && distance.LengthSquared < 3 && li.CanMoveFreelyInto(world, self, target, null, CellConditions.All))
|
||||
return new List<CPos> { target };
|
||||
|
||||
List<CPos> pb;
|
||||
|
||||
Reference in New Issue
Block a user