summaryrefslogtreecommitdiff
path: root/src/server/sv_ccmds.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2009-10-18 23:36:10 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:16:56 +0000
commit4239e321d9d5003858af4efde584d113b281a47d (patch)
treeb960de1dd199d8eb044001cad846e9db740cec18 /src/server/sv_ccmds.c
parent189b9daf077e572eaf6573cbf5e8d6be5a17f211 (diff)
* Merge ioq3-r1680
Diffstat (limited to 'src/server/sv_ccmds.c')
-rw-r--r--src/server/sv_ccmds.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/server/sv_ccmds.c b/src/server/sv_ccmds.c
index 1da5aaeb..ffd78e56 100644
--- a/src/server/sv_ccmds.c
+++ b/src/server/sv_ccmds.c
@@ -155,6 +155,15 @@ static void SV_MapRestart_f( void ) {
sv.serverId = com_frameTime;
Cvar_Set( "sv_serverid", va("%i", sv.serverId ) );
+ // if a map_restart occurs while a client is changing maps, we need
+ // to give them the correct time so that when they finish loading
+ // they don't violate the backwards time check in cl_cgame.c
+ for (i=0 ; i<sv_maxclients->integer ; i++) {
+ if (svs.clients[i].state == CS_PRIMED) {
+ svs.clients[i].oldServerTime = sv.restartTime;
+ }
+ }
+
// reset all the vm data in place without changing memory allocation
// note that we do NOT set sv.state = SS_LOADING, so configstrings that
// had been changed from their default values will generate broadcast updates