mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
Don't show if offline, reset on join
This commit is contained in:
parent
ba5083f8ff
commit
2cbdda7c62
|
@ -55,7 +55,7 @@ void CBroadcast::RenderServerBroadcast()
|
|||
if(m_aSrvBroadcastMsg[0] == 0 || DeltaTime > DisplayDuration)
|
||||
return;
|
||||
|
||||
if(m_pClient->m_pChat->IsActive())
|
||||
if(m_pClient->m_pChat->IsActive() || m_pClient->Client()->State() != IClient::STATE_ONLINE)
|
||||
return;
|
||||
|
||||
const float Fade = 1.0f - max(0.0f, (DeltaTime - DisplayStartFade) / (DisplayDuration - DisplayStartFade));
|
||||
|
@ -251,6 +251,7 @@ void CBroadcast::DoBroadcast(const char *pText)
|
|||
void CBroadcast::OnReset()
|
||||
{
|
||||
m_BroadcastTime = 0;
|
||||
m_SrvBroadcastReceivedTime = 0;
|
||||
}
|
||||
|
||||
void CBroadcast::OnMessage(int MsgType, void* pRawMsg)
|
||||
|
|
Loading…
Reference in a new issue