mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
/showall: Only print message if state changed
This commit is contained in:
parent
6793acafc4
commit
5473012a6d
|
@ -1132,9 +1132,16 @@ void CGameContext::ConShowAll(IConsole::IResult *pResult, void *pUserData)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (pResult->NumArguments())
|
if (pResult->NumArguments())
|
||||||
|
{
|
||||||
|
if (pPlayer->m_ShowAll == pResult->GetInteger(0))
|
||||||
|
return;
|
||||||
|
|
||||||
pPlayer->m_ShowAll = pResult->GetInteger(0);
|
pPlayer->m_ShowAll = pResult->GetInteger(0);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
pPlayer->m_ShowAll = !pPlayer->m_ShowAll;
|
pPlayer->m_ShowAll = !pPlayer->m_ShowAll;
|
||||||
|
}
|
||||||
|
|
||||||
if (pPlayer->m_ShowAll)
|
if (pPlayer->m_ShowAll)
|
||||||
pSelf->SendChatTarget(pResult->m_ClientID, "You will now see all tees on this server, no matter the distance");
|
pSelf->SendChatTarget(pResult->m_ClientID, "You will now see all tees on this server, no matter the distance");
|
||||||
|
|
Loading…
Reference in a new issue