Removed unused sanity checks from pathfinding

These haven't been active and used in years.
This commit is contained in:
reaperrr
2019-01-03 23:40:09 +01:00
committed by Paul Chote
parent 5166b8cd5d
commit 117dde32ba
2 changed files with 0 additions and 44 deletions

View File

@@ -197,10 +197,7 @@ namespace OpenRA.Mods.Common.Activities
return NextActivity;
if (path == null)
{
path = EvalPath();
SanityCheckPath(mobile);
}
if (path.Count == 0)
{
@@ -260,16 +257,6 @@ namespace OpenRA.Mods.Common.Activities
return this;
}
[Conditional("SANITY_CHECKS")]
void SanityCheckPath(Mobile mobile)
{
if (path.Count == 0)
return;
var d = path[path.Count - 1] - mobile.ToCell;
if (d.LengthSquared > 2)
throw new InvalidOperationException("(Move) Sanity check failed");
}
Pair<CPos, SubCell>? PopPath(Actor self)
{
if (path.Count == 0)