about summary refs log tree commit diff
path: root/src/game/server
diff options
context:
space:
mode:
authorJohannes Loher <ghost91@gmx.net>2011-05-25 12:05:32 +0200
committeroy <Tom_Adams@web.de>2011-06-27 17:07:51 +0200
commitf80c46e24d8c98089e066f7220fdb0c69db6c8a7 (patch)
tree10b352eb3174e9cf4332ff14d73dcf2c8868fe65 /src/game/server
parent14f98a9dedf21b9d73227651f3499fff66432a8f (diff)
downloadzcatch-f80c46e24d8c98089e066f7220fdb0c69db6c8a7.tar.gz
zcatch-f80c46e24d8c98089e066f7220fdb0c69db6c8a7.zip
fixed so you can use whatever time you want on set_team and so that it uses minutes
Diffstat (limited to 'src/game/server')
-rw-r--r--src/game/server/gamecontext.cpp8
1 files changed, 4 insertions, 4 deletions
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);
 	}
 }