summaryrefslogtreecommitdiff
path: root/src/server/sv_ccmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/sv_ccmds.c')
-rw-r--r--src/server/sv_ccmds.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/server/sv_ccmds.c b/src/server/sv_ccmds.c
index 21a5f0e5..688f20b3 100644
--- a/src/server/sv_ccmds.c
+++ b/src/server/sv_ccmds.c
@@ -162,7 +162,10 @@ static void SV_MapRestart_f( void ) {
// 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++) {
+ svs.clients[i].view = NULL;
if (svs.clients[i].state == CS_PRIMED) {
+ //if (svs.clients[i].isPlaceholder)
+ //continue;
svs.clients[i].oldServerTime = sv.restartTime;
}
}
@@ -195,11 +198,14 @@ static void SV_MapRestart_f( void ) {
continue;
}
- // add the map_restart command
- SV_AddServerCommand( client, "map_restart\n" );
+ if (!client->isPlaceholder)
+ {
+ // add the map_restart command
+ SV_AddServerCommand( client, "map_restart\n" );
+ }
// connect the client again, without the firstTime flag
- denied = VM_ExplicitArgPtr( gvm, VM_Call( gvm, GAME_CLIENT_CONNECT, i, qfalse ) );
+ denied = VM_ExplicitArgPtr( gvm, VM_Call( gvm, GAME_CLIENT_CONNECT, i, qfalse, client->isPlaceholder ) );
if ( denied ) {
// this generally shouldn't happen, because the client
// was connected before the level change
@@ -208,7 +214,12 @@ static void SV_MapRestart_f( void ) {
continue;
}
- if(client->state == CS_ACTIVE)
+ if (client->isPlaceholder)
+ {
+ client->gentity = SV_GentityNum(i);
+ client->gentity->s.number = i;
+ }
+ else if (client->state == CS_ACTIVE)
SV_ClientEnterWorld(client, &client->lastUsercmd);
else
{