From 5473012a6d83ba4193194fc6f1d526c31e149f29 Mon Sep 17 00:00:00 2001 From: def Date: Sun, 29 Apr 2018 15:57:57 +0200 Subject: [PATCH] /showall: Only print message if state changed --- src/game/server/ddracechat.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/game/server/ddracechat.cpp b/src/game/server/ddracechat.cpp index 19fa813bb..16760f007 100644 --- a/src/game/server/ddracechat.cpp +++ b/src/game/server/ddracechat.cpp @@ -1132,9 +1132,16 @@ void CGameContext::ConShowAll(IConsole::IResult *pResult, void *pUserData) return; if (pResult->NumArguments()) + { + if (pPlayer->m_ShowAll == pResult->GetInteger(0)) + return; + pPlayer->m_ShowAll = pResult->GetInteger(0); + } else + { pPlayer->m_ShowAll = !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");