Change impassable terrain to short.max
This commit is contained in:
@@ -86,7 +86,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
locomotor = world.WorldActor.TraitsImplementing<Locomotor>()
|
||||
.SingleOrDefault(l => l.Info.Name == Locomotor);
|
||||
|
||||
if (locomotor.MovementCostForCell(cell) == int.MaxValue)
|
||||
if (locomotor.MovementCostForCell(cell) == short.MaxValue)
|
||||
return false;
|
||||
|
||||
var check = checkTransientActors ? CellConditions.All : CellConditions.BlockedByMovers;
|
||||
@@ -438,7 +438,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public bool CanExistInCell(CPos cell)
|
||||
{
|
||||
return Locomotor.MovementCostForCell(cell) != int.MaxValue;
|
||||
return Locomotor.MovementCostForCell(cell) != short.MaxValue;
|
||||
}
|
||||
|
||||
public bool CanEnterCell(CPos cell, Actor ignoreActor = null, bool checkTransientActors = true)
|
||||
@@ -876,7 +876,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
if (mobile.IsTraitPaused
|
||||
|| (!explored && !locomotorInfo.MoveIntoShroud)
|
||||
|| (explored && mobile.Locomotor.MovementCostForCell(location) == int.MaxValue))
|
||||
|| (explored && mobile.Locomotor.MovementCostForCell(location) == short.MaxValue))
|
||||
cursor = mobile.Info.BlockedCursor;
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user