Merged from revision: 7224

- Fix: removing dead mercs who were inside vehicle at the moment of death would cause assertion failure. (by anv)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7225 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2014-05-20 18:33:55 +00:00
parent 8abbd3c053
commit 34978fc15e
+3 -1
View File
@@ -986,7 +986,9 @@ BOOLEAN StrategicRemoveMerc( SOLDIERTYPE *pSoldier )
// is he/she in a mvt group, if so, remove and destroy the group
if( pSoldier->ubGroupID )
{
if ( pSoldier->bAssignment != VEHICLE )
// anv: dead people are on "dead" assignment even if they were in vehicle pre-mortem, check flags too
if( ( pSoldier->bAssignment != VEHICLE ) && !( pSoldier->flags.uiStatusFlags & ( SOLDIER_DRIVER | SOLDIER_PASSENGER ) ) )
//if ( pSoldier->bAssignment != VEHICLE )
{ //Can only remove groups if they aren't persistant (not in a squad or vehicle)
RemoveGroup( pSoldier->ubGroupID );
}