Temporary fix for game freeze when a path contains duplicate tiles

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2637 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
lalien
2009-03-28 00:28:54 +00:00
parent 84299f157e
commit 6a740eb82b
3 changed files with 12 additions and 8 deletions
+5 -1
View File
@@ -813,7 +813,11 @@ int AStarPathfinder::GetPath(SOLDIERTYPE *s ,
//CHAR8 str[128];
//sprintf( str, "Duplicate GridNo found during pathfinding" );
//AssertMsg( 0, str );
AssertMsg( FALSE, String( "Duplicate GridNo found during pathfinding at %d. Related to soldier %d at GridNo %d.", current, s->ubID, s->sGridNo ) );
//AssertMsg( FALSE, String( "Duplicate GridNo found during pathfinding at %d. Related to soldier %d at GridNo %d.", current, s->ubID, s->sGridNo ) );
// lalien: hack to avoid freezing, return 0 if the path is bad.
// Probably it will make trouble, need to check this
return 0;
}
}
trackNode.push_back(current);