mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix: name display repeated name if two names were used in one sentence
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5985 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -15971,13 +15971,18 @@ void SOLDIERTYPE::SwitchWeapons( BOOLEAN fKnife, BOOLEAN fSideArm )
|
||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||
}
|
||||
|
||||
static CHAR16 tmpname[ 100 ];
|
||||
UINT8 tmpuser = 0;
|
||||
static CHAR16 tmpname[2][ 100 ]; // we need 2 arrays, in case we need 2 name pointers in one string
|
||||
STR16 SOLDIERTYPE::GetName()
|
||||
{
|
||||
tmpname[0] = '\0' ;
|
||||
wcscat( tmpname, this->name );
|
||||
++tmpuser;
|
||||
if ( tmpuser > 1 )
|
||||
tmpuser = 0;
|
||||
|
||||
return tmpname;
|
||||
tmpname[tmpuser][0] = '\0' ;
|
||||
wcscat( tmpname[tmpuser], this->name );
|
||||
|
||||
return tmpname[tmpuser];
|
||||
}
|
||||
|
||||
INT32 CheckBleeding( SOLDIERTYPE *pSoldier )
|
||||
|
||||
Reference in New Issue
Block a user