sv_mempool = Mem_AllocPool("server", 0, NULL);
SV_ServerOptions();
+ Cvar_Callback(&sv_netport);
}
static void SV_SaveEntFile_f(cmd_state_t *cmd)
if(sv.active)
{
- client_t *client;
- for (i = 0, client = svs.clients;i < svs.maxclients;i++, client++)
- {
- if (client->netconnection)
- {
- MSG_WriteByte(&client->netconnection->message, svc_stufftext);
- MSG_WriteString(&client->netconnection->message, "reconnect\n");
- }
- }
World_End(&sv.world);
if(PRVM_serverfunction(SV_Shutdown))
{
//
// tell all connected clients that we are going to a new level
//
- if (!sv.active)
+ if (sv.active)
+ {
+ client_t *client;
+ for (i = 0, client = svs.clients;i < svs.maxclients;i++, client++)
+ {
+ if (client->netconnection)
+ {
+ MSG_WriteByte(&client->netconnection->message, svc_stufftext);
+ MSG_WriteString(&client->netconnection->message, "reconnect\n");
+ }
+ }
+ }
+ else
+ {
+ // open server port
NetConn_OpenServerPorts(true);
+ }
//
// make cvars consistant
static void SV_VM_Setup(void)
{
prvm_prog_t *prog = SVVM_prog;
- PRVM_Prog_Init(prog, cmd_server);
+ PRVM_Prog_Init(prog, cmd_local);
// allocate the mempools
// TODO: move the magic numbers/constants into #defines [9/13/2006 Black]
{
if (host_client->netconnection && host.realtime > host_client->netconnection->timeout)
{
- Con_Printf("Client \"%s\" connection timed out\n", host_client->name);
+ if (host_client->begun)
+ SV_BroadcastPrintf("Client \"%s\" connection timed out\n", host_client->name);
+ else
+ Con_Printf("Client \"%s\" connection timed out\n", host_client->name);
+
SV_DropClient(false);
}
}