Change impassable terrain to short.max

This commit is contained in:
Tomase
2019-07-27 17:31:20 +02:00
committed by reaperrr
parent 702f4d1937
commit 98602cb1cb
4 changed files with 11 additions and 11 deletions

View File

@@ -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;