Fix: Assertion failures on militia strategic commands (by sun_alf)

* Discarding a route can result in failure"Path exists, but no waypoints were added!	AM-0".
* Waypoints can be not deleted upon arrival to final destination.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9356 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
rftr
2022-04-02 04:27:02 +00:00
parent 746d15a1ba
commit 2747f9cee0
2 changed files with 31 additions and 30 deletions
+1 -1
View File
@@ -1697,7 +1697,7 @@ void RebuildWayPointsForGroupPath( PathStPtr pHeadOfPath, INT16 sMvtGroup )
// if group has no path planned at all
if ( pNode == NULL )
if ( pNode == NULL || pNode->pNext == NULL )
{
// and it's a player group, and it's between sectors
// NOTE: AI groups never reverse direction between sectors, Kris cheats & teleports them back to their current sector!