mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix veto
This commit is contained in:
parent
e25ecef906
commit
5a23bc1ab1
|
@ -877,10 +877,11 @@ void CGameContext::OnTick()
|
|||
// veto right for players who have been active on server for long and who're not afk
|
||||
if(!IsKickVote() && !IsSpecVote() && g_Config.m_SvVoteVetoTime)
|
||||
{
|
||||
// look through all players with same IP again
|
||||
for(int j = i + 1; j < MAX_CLIENTS; j++)
|
||||
// look through all players with same IP again, including the current player
|
||||
for(int j = i; j < MAX_CLIENTS; j++)
|
||||
{
|
||||
if(!m_apPlayers[j] || str_comp(aaBuf[j], aaBuf[i]) != 0)
|
||||
// no need to check ip address of current player
|
||||
if(i != j && (!m_apPlayers[j] || str_comp(aaBuf[j], aaBuf[i]) != 0))
|
||||
continue;
|
||||
|
||||
if(m_apPlayers[j] && !m_apPlayers[j]->m_Afk && m_apPlayers[j]->GetTeam() != TEAM_SPECTATORS &&
|
||||
|
|
Loading…
Reference in a new issue