mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix: Proper vote status for non-64-player-clients
This commit is contained in:
parent
89da13686d
commit
e44456c08e
|
@ -408,6 +408,15 @@ void CGameContext::SendVoteSet(int ClientID)
|
||||||
|
|
||||||
void CGameContext::SendVoteStatus(int ClientID, int Total, int Yes, int No)
|
void CGameContext::SendVoteStatus(int ClientID, int Total, int Yes, int No)
|
||||||
{
|
{
|
||||||
|
CServer* pServ = (CServer*)Server();
|
||||||
|
|
||||||
|
if (!pServ->m_aClients[ClientID].m_CustClt && Total > VANILLA_MAX_CLIENTS)
|
||||||
|
{
|
||||||
|
Yes = float(Yes) * VANILLA_MAX_CLIENTS / float(Total);
|
||||||
|
No = float(Yes) * VANILLA_MAX_CLIENTS / float(Total);
|
||||||
|
Total = VANILLA_MAX_CLIENTS;
|
||||||
|
}
|
||||||
|
|
||||||
CNetMsg_Sv_VoteStatus Msg = {0};
|
CNetMsg_Sv_VoteStatus Msg = {0};
|
||||||
Msg.m_Total = Total;
|
Msg.m_Total = Total;
|
||||||
Msg.m_Yes = Yes;
|
Msg.m_Yes = Yes;
|
||||||
|
|
Loading…
Reference in a new issue