After voting only show votes when scoreboard is open

This commit is contained in:
def 2013-10-07 12:13:33 +02:00
parent 3a2d196104
commit ffc18b6933
2 changed files with 3 additions and 1 deletions

View file

@ -10,6 +10,7 @@
#include <game/client/gameclient.h>
#include <game/client/animstate.h>
#include <game/client/render.h>
#include <game/client/components/scoreboard.h>
#include "controls.h"
#include "camera.h"
@ -324,7 +325,7 @@ void CHud::RenderTeambalanceWarning()
void CHud::RenderVoting()
{
if(!m_pClient->m_pVoting->IsVoting() || Client()->State() == IClient::STATE_DEMOPLAYBACK)
if((!m_pClient->m_pScoreboard->Active() && m_pClient->m_pVoting->TakenChoice()) || !m_pClient->m_pVoting->IsVoting() || Client()->State() == IClient::STATE_DEMOPLAYBACK)
return;
Graphics()->TextureSet(-1);

View file

@ -113,6 +113,7 @@ void CVoting::AddvoteOption(const char *pDescription, const char *pCommand)
void CVoting::Vote(int v)
{
m_Voted = v;
CNetMsg_Cl_Vote Msg = {v};
Client()->SendPackMsg(&Msg, MSGFLAG_VITAL);
}