mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
After voting only show votes when scoreboard is open
This commit is contained in:
parent
3a2d196104
commit
ffc18b6933
|
@ -10,6 +10,7 @@
|
||||||
#include <game/client/gameclient.h>
|
#include <game/client/gameclient.h>
|
||||||
#include <game/client/animstate.h>
|
#include <game/client/animstate.h>
|
||||||
#include <game/client/render.h>
|
#include <game/client/render.h>
|
||||||
|
#include <game/client/components/scoreboard.h>
|
||||||
|
|
||||||
#include "controls.h"
|
#include "controls.h"
|
||||||
#include "camera.h"
|
#include "camera.h"
|
||||||
|
@ -324,7 +325,7 @@ void CHud::RenderTeambalanceWarning()
|
||||||
|
|
||||||
void CHud::RenderVoting()
|
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;
|
return;
|
||||||
|
|
||||||
Graphics()->TextureSet(-1);
|
Graphics()->TextureSet(-1);
|
||||||
|
|
|
@ -113,6 +113,7 @@ void CVoting::AddvoteOption(const char *pDescription, const char *pCommand)
|
||||||
|
|
||||||
void CVoting::Vote(int v)
|
void CVoting::Vote(int v)
|
||||||
{
|
{
|
||||||
|
m_Voted = v;
|
||||||
CNetMsg_Cl_Vote Msg = {v};
|
CNetMsg_Cl_Vote Msg = {v};
|
||||||
Client()->SendPackMsg(&Msg, MSGFLAG_VITAL);
|
Client()->SendPackMsg(&Msg, MSGFLAG_VITAL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue