diff --git a/datasrc/network.py b/datasrc/network.py index 7ad2c0244..08739f0e3 100644 --- a/datasrc/network.py +++ b/datasrc/network.py @@ -572,4 +572,7 @@ Messages = [ NetMessageEx("Sv_CommandInfoRemove", "commandinfo-remove@netmsg.ddnet.org", [ NetStringStrict("m_pName") ]), + + NetMessageEx("Sv_VoteOptionGroupStart", "sv-vote-option-group-start@netmsg.ddnet.org", []), + NetMessageEx("Sv_VoteOptionGroupEnd", "sv-vote-option-group-end@netmsg.ddnet.org", []), ] diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 8bb560595..5ee861283 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -1432,10 +1432,22 @@ void CGameContext::ProgressVoteOptions(int ClientID) } // send msg + if(pPl->m_SendVoteIndex == 0) + { + CNetMsg_Sv_VoteOptionGroupStart StartMsg; + Server()->SendPackMsg(&StartMsg, MSGFLAG_VITAL, ClientID); + } + OptionMsg.m_NumOptions = NumVotesToSend; Server()->SendPackMsg(&OptionMsg, MSGFLAG_VITAL, ClientID); pPl->m_SendVoteIndex += NumVotesToSend; + + if(pPl->m_SendVoteIndex == m_NumVoteOptions) + { + CNetMsg_Sv_VoteOptionGroupEnd EndMsg; + Server()->SendPackMsg(&EndMsg, MSGFLAG_VITAL, ClientID); + } } void CGameContext::OnClientEnter(int ClientID)