mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Replace duplicate condition with a check for empty string
This commit is contained in:
parent
84c9506d3c
commit
2d1d7b9562
|
@ -524,15 +524,6 @@ void CScoreboard::RenderScoreboard(float x, float y, float w, int Team, const ch
|
|||
|
||||
void CScoreboard::RenderRecordingNotification(float x)
|
||||
{
|
||||
if(!m_pClient->DemoRecorder(RECORDER_MANUAL)->IsRecording() &&
|
||||
!m_pClient->DemoRecorder(RECORDER_AUTO)->IsRecording() &&
|
||||
!m_pClient->DemoRecorder(RECORDER_RACE)->IsRecording() &&
|
||||
!m_pClient->DemoRecorder(RECORDER_REPLAYS)->IsRecording())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//draw the text
|
||||
char aBuf[64] = "\0";
|
||||
char aBuf2[64];
|
||||
char aTime[32];
|
||||
|
@ -562,6 +553,9 @@ void CScoreboard::RenderRecordingNotification(float x)
|
|||
str_append(aBuf, aBuf2, sizeof(aBuf));
|
||||
}
|
||||
|
||||
if(!aBuf[0])
|
||||
return;
|
||||
|
||||
float w = TextRender()->TextWidth(0, 20.0f, aBuf, -1, -1.0f);
|
||||
|
||||
// draw the box
|
||||
|
|
Loading…
Reference in a new issue