mirror of
https://github.com/unknownworlds/NS.git
synced 2024-11-14 08:50:35 +00:00
o Fixed a formatting issue with the server name in the scoreboard.
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@527 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
081798e78b
commit
21c44cec9f
1 changed files with 4 additions and 3 deletions
|
@ -405,10 +405,11 @@ void ScorePanel::Update()
|
|||
char theServerName[MAX_SERVERNAME_LENGTH+1];
|
||||
if (gViewPort->m_szServerName)
|
||||
{
|
||||
memset(theServerName, 0, MAX_SERVERNAME_LENGTH+1);
|
||||
int iServerNameLength = max((int)strlen(gViewPort->m_szServerName),MAX_SERVERNAME_LENGTH);
|
||||
sprintf(theServerName, "%32s", gViewPort->m_szServerName);
|
||||
strncat(theServerName, gViewPort->m_szServerName, iServerNameLength);
|
||||
}
|
||||
|
||||
theServerName[MAX_SERVERNAME_LENGTH]=0;
|
||||
char theMapName[MAX_MAPNAME_LENGTH+1];
|
||||
sprintf(theMapName, "%s", gHUD.GetMapName().c_str());
|
||||
|
||||
|
@ -423,7 +424,7 @@ void ScorePanel::Update()
|
|||
sprintf(elapsedString, "");
|
||||
}
|
||||
|
||||
sprintf(title, "%s Map: %s %s", theServerName, theMapName, elapsedString);
|
||||
sprintf(title, "%32s Map: %s %s", theServerName, theMapName, elapsedString);
|
||||
|
||||
m_TitleLabel.setText(title);
|
||||
|
||||
|
|
Loading…
Reference in a new issue