From f4ce34f01c87e4edbfc085ea60ccec1e3b386f60 Mon Sep 17 00:00:00 2001 From: oy Date: Mon, 11 Jul 2011 12:02:45 +0200 Subject: [PATCH] close spectator/emoticon menu when changing to team/spectator via bind. Closes #768 --- src/game/client/components/emoticon.cpp | 7 +++++++ src/game/client/components/spectator.cpp | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/game/client/components/emoticon.cpp b/src/game/client/components/emoticon.cpp index bedfaafb0..b2f48b80f 100644 --- a/src/game/client/components/emoticon.cpp +++ b/src/game/client/components/emoticon.cpp @@ -102,6 +102,13 @@ void CEmoticon::OnRender() return; } + if(m_pClient->m_Snap.m_SpecInfo.m_Active) + { + m_Active = false; + m_WasActive = false; + return; + } + m_WasActive = true; if (length(m_SelectorMouse) > 140) diff --git a/src/game/client/components/spectator.cpp b/src/game/client/components/spectator.cpp index c69a76693..c09b2ee21 100644 --- a/src/game/client/components/spectator.cpp +++ b/src/game/client/components/spectator.cpp @@ -162,6 +162,13 @@ void CSpectator::OnRender() return; } + if(!m_pClient->m_Snap.m_SpecInfo.m_Active) + { + m_Active = false; + m_WasActive = false; + return; + } + m_WasActive = true; m_SelectedSpectatorID = NO_SELECTION;