Fix: Proper vote status for non-64-player-clients

This commit is contained in:
def 2014-01-02 21:23:27 +01:00
parent 89da13686d
commit e44456c08e

View file

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