mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge branch 'spec-vote' into DDRace
This commit is contained in:
commit
919f6d1cb2
|
@ -971,7 +971,8 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
|
|||
return;
|
||||
}
|
||||
|
||||
if(GetPlayerChar(ClientID) && GetPlayerChar(KickID) && GetDDRaceTeam(ClientID) != GetDDRaceTeam(KickID))
|
||||
// Don't allow kicking if a player has no character
|
||||
if(!GetPlayerChar(ClientID) || !GetPlayerChar(KickID) || GetDDRaceTeam(ClientID) != GetDDRaceTeam(KickID))
|
||||
{
|
||||
SendChatTarget(ClientID, "You can kick only your team member");
|
||||
m_apPlayers[ClientID]->m_Last_KickVote = time_get();
|
||||
|
@ -1011,6 +1012,12 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
|
|||
return;
|
||||
}
|
||||
|
||||
if(!GetPlayerChar(ClientID) || GetPlayerChar(SpectateID) || GetDDRaceTeam(ClientID) != GetDDRaceTeam(SpectateID))
|
||||
{
|
||||
SendChatTarget(ClientID, "You can only move your team member to specators");
|
||||
return;
|
||||
}
|
||||
|
||||
if(g_Config.m_SvPauseable && g_Config.m_SvVotePause)
|
||||
{
|
||||
str_format(aChatmsg, sizeof(aChatmsg), "'%s' called for vote to pause '%s' for %d seconds (%s)", Server()->ClientName(ClientID), Server()->ClientName(SpectateID), g_Config.m_SvVotePauseTime, pReason);
|
||||
|
|
Loading…
Reference in a new issue