Improved pause fix (thanks to heinrich5991)

This commit is contained in:
ChillerDragon 2018-07-10 00:08:57 +02:00
parent e9807fe47c
commit 819ae338d8

View file

@ -472,11 +472,8 @@ void CGameContext::StartVote(const char *pDesc, const char *pCommand, const char
void CGameContext::EndVote() void CGameContext::EndVote()
{ {
if(m_apPlayers[m_VoteVictim])
m_apPlayers[m_VoteVictim]->Pause(CPlayer::PAUSE_NONE, false);
m_VoteCloseTime = 0; m_VoteCloseTime = 0;
SendVoteSet(-1); SendVoteSet(-1);
m_VoteVictim = -1;
} }
void CGameContext::SendVoteSet(int ClientID) void CGameContext::SendVoteSet(int ClientID)
@ -2236,6 +2233,7 @@ void CGameContext::ConSetTeam(IConsole::IResult *pResult, void *pUserData)
str_format(aBuf, sizeof(aBuf), "moved client %d to team %d", ClientID, Team); str_format(aBuf, sizeof(aBuf), "moved client %d to team %d", ClientID, Team);
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "server", aBuf); pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "server", aBuf);
pSelf->m_apPlayers[ClientID]->Pause(CPlayer::PAUSE_NONE, false); // reset /spec and /pause to allow rejoin
pSelf->m_apPlayers[ClientID]->m_TeamChangeTick = pSelf->Server()->Tick()+pSelf->Server()->TickSpeed()*Delay*60; pSelf->m_apPlayers[ClientID]->m_TeamChangeTick = pSelf->Server()->Tick()+pSelf->Server()->TickSpeed()*Delay*60;
pSelf->m_apPlayers[ClientID]->SetTeam(Team); pSelf->m_apPlayers[ClientID]->SetTeam(Team);
if(Team == TEAM_SPECTATORS) if(Team == TEAM_SPECTATORS)