- Fix: possible crash if enemy forces arrive via non-group (enemy heli)

- Fix: possible crash when ordering militia to move if previous path was not properly cleared

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8541 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2018-03-08 21:49:26 +00:00
parent 1e38e07ad9
commit d6db35f000
5 changed files with 129 additions and 41 deletions
+1 -3
View File
@@ -2442,8 +2442,6 @@ void HandleNonCombatGroupArrival( GROUP *pGroup, BOOLEAN fMainGroup, BOOLEAN fNe
}
}
//MilitiaFollowPlayer( pGroup->ubPrevX, pGroup->ubPrevY, pGroup->ubSectorX, pGroup->ubSectorY );
// look for NPCs to stop for, anyone is too tired to keep going, if all OK rebuild waypoints & continue movement
// NOTE: Only the main group (first group arriving) will stop for NPCs, it's just too much hassle to stop them all
PlayerGroupArrivedSafelyInSector( pGroup, fMainGroup );
@@ -2501,7 +2499,7 @@ void HandleOtherGroupsArrivingSimultaneously( UINT8 ubSectorX, UINT8 ubSectorY,
}
// Flugente: concealed spies are added if a battle occurs
if ( !IsGroupTheHelicopterGroup( pArrivingGroup ) )
if ( pArrivingGroup && !IsGroupTheHelicopterGroup( pArrivingGroup ) )
{
UINT16 uiCnt = 0;
SOLDIERTYPE* pSoldier = NULL;