mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +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)
|
||||
{
|
||||
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};
|
||||
Msg.m_Total = Total;
|
||||
Msg.m_Yes = Yes;
|
||||
|
|
Loading…
Reference in a new issue