mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 01:24:18 +00:00
Only disallow team changing and killing when calling kick/spec votes
This commit is contained in:
parent
f6b4ca16f9
commit
1ef03e7387
|
@ -796,7 +796,7 @@ void CGameContext::ConJoinTeam(IConsole::IResult *pResult, void *pUserData)
|
|||
if (!pPlayer)
|
||||
return;
|
||||
|
||||
if (pSelf->m_VoteCloseTime && pSelf->m_VoteCreator == pResult->m_ClientID)
|
||||
if (pSelf->m_VoteCloseTime && pSelf->m_VoteCreator == pResult->m_ClientID && (pSelf->m_VoteKick || pSelf->m_VoteSpec))
|
||||
{
|
||||
pSelf->Console()->Print(
|
||||
IConsole::OUTPUT_LEVEL_STANDARD,
|
||||
|
|
|
@ -1586,7 +1586,7 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
|
|||
}
|
||||
else if (MsgID == NETMSGTYPE_CL_KILL && !m_World.m_Paused)
|
||||
{
|
||||
if(m_VoteCloseTime && m_VoteCreator == ClientID && GetDDRaceTeam(ClientID))
|
||||
if(m_VoteCloseTime && m_VoteCreator == ClientID && GetDDRaceTeam(ClientID) && (m_VoteKick || m_VoteSpec))
|
||||
{
|
||||
SendChatTarget(ClientID, "You are running a vote please try again after the vote is done!");
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue