mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- fixed newly added merc to current squad not showing up in the panel interface
- fixed dead mercs not showing up in the panel interface properly from loaded savegame git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9091 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+15
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user