From f80c46e24d8c98089e066f7220fdb0c69db6c8a7 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Wed, 25 May 2011 12:05:32 +0200 Subject: fixed so you can use whatever time you want on set_team and so that it uses minutes --- src/game/server/gamecontext.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/game') diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 9cec47e8..9f8a9ebb 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -738,7 +738,7 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID) str_format(aChatmsg, sizeof(aChatmsg), "'%s' called for vote to move '%s' to spectators (%s)", Server()->ClientName(ClientID), Server()->ClientName(SpectateID), pReason); str_format(aDesc, sizeof(aDesc), "move '%s' to spectators", Server()->ClientName(SpectateID)); - str_format(aCmd, sizeof(aCmd), "set_team %d -1 %d", SpectateID, g_Config.m_SvVoteSpectateRejoindelay*60); + str_format(aCmd, sizeof(aCmd), "set_team %d -1 %d", SpectateID, g_Config.m_SvVoteSpectateRejoindelay); } if(aCmd[0]) @@ -1037,7 +1037,7 @@ void CGameContext::ConSetTeam(IConsole::IResult *pResult, void *pUserData) int Team = clamp(pResult->GetInteger(1), -1, 1); int Delay = 0; if(pResult->NumArguments() > 2) - Delay = clamp(pResult->GetInteger(2), 0, 1000); + Delay = pResult->GetInteger(2); char aBuf[256]; str_format(aBuf, sizeof(aBuf), "moved client %d to team %d", ClientID, Team); @@ -1046,7 +1046,7 @@ void CGameContext::ConSetTeam(IConsole::IResult *pResult, void *pUserData) if(!pSelf->m_apPlayers[ClientID]) return; - pSelf->m_apPlayers[ClientID]->m_TeamChangeTick = pSelf->Server()->Tick()+pSelf->Server()->TickSpeed()*Delay; + pSelf->m_apPlayers[ClientID]->m_TeamChangeTick = pSelf->Server()->Tick()+pSelf->Server()->TickSpeed()*Delay*60; pSelf->m_apPlayers[ClientID]->SetTeam(Team); (void)pSelf->m_pController->CheckTeamBalance(); } @@ -1263,7 +1263,7 @@ void CGameContext::ConForceVote(IConsole::IResult *pResult, void *pUserData) return; } - str_format(aBuf, sizeof(aBuf), "set_team %d -1 %d", SpectateID, g_Config.m_SvVoteSpectateRejoindelay*60); + str_format(aBuf, sizeof(aBuf), "set_team %d -1 %d", SpectateID, g_Config.m_SvVoteSpectateRejoindelay); pSelf->Console()->ExecuteLine(aBuf); } } -- cgit 1.4.1