Don't show if offline, reset on join

This commit is contained in:
LordSk 2018-11-29 17:24:33 +01:00
parent ba5083f8ff
commit 2cbdda7c62

View file

@ -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)