Fix: Send proper votes to 64/16 player clients

This commit is contained in:
def 2014-01-11 22:22:45 +01:00
parent 188635162e
commit aa64e86f12

View file

@ -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);
}
}
}