mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Fix: allow longer soldier names to be displayed
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6100 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1666,7 +1666,7 @@ void DrawSelectedUIAboveGuy( UINT16 usSoldierID )
|
|||||||
INT32 iBack;
|
INT32 iBack;
|
||||||
TILE_ELEMENT TileElem;
|
TILE_ELEMENT TileElem;
|
||||||
CHAR16 *pStr;
|
CHAR16 *pStr;
|
||||||
CHAR16 NameStr[ 50 ];
|
CHAR16 NameStr[ MAX_ENEMY_NAMES_CHARS ];
|
||||||
UINT16 usGraphicToUse = THIRDPOINTERS1;
|
UINT16 usGraphicToUse = THIRDPOINTERS1;
|
||||||
BOOLEAN fRaiseName = FALSE;
|
BOOLEAN fRaiseName = FALSE;
|
||||||
BOOLEAN fDoName = TRUE;
|
BOOLEAN fDoName = TRUE;
|
||||||
|
|||||||
@@ -16065,7 +16065,7 @@ void SOLDIERTYPE::SwitchWeapons( BOOLEAN fKnife, BOOLEAN fSideArm )
|
|||||||
}
|
}
|
||||||
|
|
||||||
UINT8 tmpuser = 0;
|
UINT8 tmpuser = 0;
|
||||||
static CHAR16 tmpname[2][ 100 ]; // we need 2 arrays, in case we need 2 name pointers in one string
|
static CHAR16 tmpname[2][ MAX_ENEMY_NAMES_CHARS ]; // we need 2 arrays, in case we need 2 name pointers in one string
|
||||||
STR16 SOLDIERTYPE::GetName()
|
STR16 SOLDIERTYPE::GetName()
|
||||||
{
|
{
|
||||||
++tmpuser;
|
++tmpuser;
|
||||||
@@ -16079,7 +16079,10 @@ STR16 SOLDIERTYPE::GetName()
|
|||||||
{
|
{
|
||||||
INT8 type = this->GetSoldierProfileType(this->bTeam);
|
INT8 type = this->GetSoldierProfileType(this->bTeam);
|
||||||
if ( type > -1 )
|
if ( type > -1 )
|
||||||
|
{
|
||||||
wcscpy( tmpname[tmpuser], zSoldierProfile[type][this->usSoldierProfile].szName );
|
wcscpy( tmpname[tmpuser], zSoldierProfile[type][this->usSoldierProfile].szName );
|
||||||
|
tmpname[tmpuser][ MAX_ENEMY_NAMES_CHARS - 1 ] = '\0';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return tmpname[tmpuser];
|
return tmpname[tmpuser];
|
||||||
|
|||||||
Reference in New Issue
Block a user