Removed unused sanity checks from pathfinding
These haven't been active and used in years.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user