diff --git a/Tactical/Squads.cpp b/Tactical/Squads.cpp index 47f455c9..9bf4b2a7 100644 --- a/Tactical/Squads.cpp +++ b/Tactical/Squads.cpp @@ -389,7 +389,7 @@ BOOLEAN AddCharacterToSquad( SOLDIERTYPE *pCharacter, INT8 bSquadValue ) if( bSquadValue == ( INT8 ) iCurrentTacticalSquad ) { - CheckForAndAddMercToTeamPanel( Squad[ iCurrentTacticalSquad ][ bCounter ] ); + CheckForAndAddMercToTeamPanel( pCharacter ); } if ( pCharacter->ubID == gusSelectedSoldier ) @@ -911,6 +911,20 @@ BOOLEAN SetCurrentSquad( INT32 iCurrentSquad, BOOLEAN fForce ) CheckForAndAddMercToTeamPanel( Squad[ iCurrentTacticalSquad ][ iCounter ] ); } } + SOLDIERTYPE *pDeadSoldier = NULL; + for (iCounter = 0; iCounter < NUMBER_OF_SOLDIERS_PER_SQUAD; iCounter++) + { + if (sDeadMercs[iCurrentTacticalSquad][iCounter] != -1) + { + pDeadSoldier = FindSoldierByProfileID((UINT8)(sDeadMercs[iCurrentTacticalSquad][iCounter]), TRUE); + + if (pDeadSoldier) + { + // squad set, now add soldiers in + CheckForAndAddMercToTeamPanel(pDeadSoldier); + } + } + } } // check if the currently selected guy is on this squad, if not, get the first one on the new squad