mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fix: Send proper votes to 64/16 player clients
This commit is contained in:
parent
188635162e
commit
aa64e86f12
|
@ -409,6 +409,7 @@ void CGameContext::SendVoteSet(int ClientID)
|
|||
void CGameContext::SendVoteStatus(int ClientID, int Total, int Yes, int No)
|
||||
{
|
||||
CServer* pServ = (CServer*)Server();
|
||||
|
||||
if (Total > VANILLA_MAX_CLIENTS && !pServ->m_aClients[ClientID].m_CustClt)
|
||||
{
|
||||
Yes = float(Yes) * VANILLA_MAX_CLIENTS / float(Total);
|
||||
|
@ -610,7 +611,9 @@ void CGameContext::OnTick()
|
|||
else if(m_VoteUpdate)
|
||||
{
|
||||
m_VoteUpdate = false;
|
||||
SendVoteStatus(-1, Total, Yes, No);
|
||||
for(int i = 0; i < MAX_CLIENTS; ++i)
|
||||
if(Server()->ClientIngame(i))
|
||||
SendVoteStatus(i, Total, Yes, No);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue