// update server listing on the master because player count changed
// (which the master uses for filtering empty/full servers)
NetConn_Heartbeat(1);
+
+ if (sv.loadgame)
+ {
+ for (i = 0;i < svs.maxclients;i++)
+ if (svs.clients[i].active && !svs.clients[i].spawned)
+ break;
+ if (i == svs.maxclients)
+ {
+ Con_Printf("Loaded game, everyone rejoined - unpausing\n");
+ sv.paused = sv.loadgame = false; // we're basically done with loading now
+ }
+ }
}
/*
==================
Host_TimeReport
-Returns a time report string, for example for
+Returns a time report string, for example for
==================
*/
const char *Host_TimingReport()
if (sv.loadgame)
{
// loaded games are fully initialized already
- // if this is the last client to be connected, unpause
- sv.paused = false;
-
if (prog->funcoffsets.RestoreGame)
{
Con_DPrint("Calling RestoreGame\n");
prog->globals.server->self = PRVM_EDICT_TO_PROG(host_client->edict);
PRVM_ExecuteProgram (prog->globals.server->ClientConnect, "QC function ClientConnect is missing");
- if (svs.maxclients > 1 || cls.state == ca_dedicated)
- Con_Printf("%s entered the game\n", host_client->name);
+ if (cls.state == ca_dedicated)
+ Con_Printf("%s connected\n", host_client->name);
PRVM_ExecuteProgram (prog->globals.server->PutClientInServer, "QC function PutClientInServer is missing");
}
MSG_WriteAngle (&host_client->netconnection->message, host_client->edict->fields.server->v_angle[0], sv.protocol);
MSG_WriteAngle (&host_client->netconnection->message, host_client->edict->fields.server->v_angle[1], sv.protocol);
MSG_WriteAngle (&host_client->netconnection->message, 0, sv.protocol);
- sv.loadgame = false; // we're basically done with loading now
}
else
{
void Host_Begin_f (void)
{
host_client->spawned = true;
+
+ // LordHavoc: note: this code also exists in SV_DropClient
+ if (sv.loadgame)
+ {
+ int i;
+ for (i = 0;i < svs.maxclients;i++)
+ if (svs.clients[i].active && !svs.clients[i].spawned)
+ break;
+ if (i == svs.maxclients)
+ {
+ Con_Printf("Loaded game, everyone rejoined - unpausing\n");
+ sv.paused = sv.loadgame = false; // we're basically done with loading now
+ }
+ }
}
//===========================================================================