mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-17 21:48:19 +00:00
Group CNetMsg_Sv_VoteOptionListAdd
This commit is contained in:
parent
c12835bc39
commit
f81828e78e
|
@ -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", []),
|
||||
]
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue