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:
Flugente
2013-04-04 23:24:09 +00:00
parent 6bd8399bb9
commit e043ce0e70
+9 -4
View File
@@ -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 )