From 34978fc15e553b8b8a393765e1e150f02fee302b Mon Sep 17 00:00:00 2001 From: Wanne Date: Tue, 20 May 2014 18:33:55 +0000 Subject: [PATCH] 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 --- Strategic/Merc Contract.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Strategic/Merc Contract.cpp b/Strategic/Merc Contract.cpp index 01c657d61..aaad0b476 100644 --- a/Strategic/Merc Contract.cpp +++ b/Strategic/Merc Contract.cpp @@ -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 ); }