mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Fix: if no squad name is provided in xml, fall back on hardcoded name
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8867 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1987,8 +1987,8 @@ void DrawSelectedUIAboveGuy( UINT16 usSoldierID )
|
||||
}
|
||||
else if ( pSoldier->bTeam == gbPlayerNum && pSoldier->bAssignment < ON_DUTY && pSoldier->bAssignment != CurrentSquad() && !( pSoldier->flags.uiStatusFlags & SOLDIER_MULTI_SELECTED ) )
|
||||
{
|
||||
if ( gGameExternalOptions.fUseXMLSquadNames )
|
||||
swprintf( NameStr, SquadNames[ pSoldier->bAssignment ].squadname );
|
||||
if ( gGameExternalOptions.fUseXMLSquadNames && pSoldier->bAssignment < gSquadNameVector.size() )
|
||||
swprintf( NameStr, gSquadNameVector[pSoldier->bAssignment].c_str() );
|
||||
else
|
||||
swprintf( NameStr, gzLateLocalizedString[ 34 ], ( pSoldier->bAssignment + 1 ) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user