*/
void Host_Ping_f (void)
{
- int i, j;
- float total;
+ int i;
client_t *client;
if (cmd_source == src_command)
{
if (!client->active)
continue;
- total = 0;
- for (j=0 ; j<NUM_PING_TIMES ; j++)
- total+=client->ping_times[j];
- total /= NUM_PING_TIMES;
- SV_ClientPrintf("%4i %s\n", (int)(total*1000), client->name);
+ SV_ClientPrintf("%4i %s\n", (int)floor(client->ping*1000+0.5), client->name);
}
}
allowcheats = sv_cheats.integer != 0;
strcpy(mapname, sv.name);
SV_SpawnServer(mapname);
- if (sv.active && cls.state == ca_disconnected)
+ if (sv.active && cls.state == ca_disconnected)
{
SV_VM_Begin();
CL_EstablishConnection("local:1");
*/
void Host_Reconnect_f (void)
{
+ if (cmd_source == src_command)
+ {
+ Con_Print("reconnect is not valid from the console\n");
+ return;
+ }
if (Cmd_Argc() != 1)
{
Con_Print("reconnect : wait for signon messages again\n");
SV_ClientPrint(text);
host_client = save;
- //Con_Print(&text[1]);
+ if (cls.state == ca_dedicated)
+ Con_Print(&text[1]);
}
if (cmd_source != src_command || !sv.active)
return;
+ SV_VM_Begin();
save = host_client;
if (Cmd_Argc() > 2 && strcmp(Cmd_Argv(1), "#") == 0)
}
host_client = save;
+ SV_VM_End();
}
/*
prvm_edict_t *e;
model_t *m;
+ if (!sv.active)
+ return;
+
+ SV_VM_Begin();
e = FindViewthing ();
+ SV_VM_End();
if (!e)
return;
int f;
model_t *m;
+ if (!sv.active)
+ return;
+
+ SV_VM_Begin();
e = FindViewthing ();
+ SV_VM_End();
if (!e)
return;
m = cl.model_precache[(int)e->fields.server->modelindex];
prvm_edict_t *e;
model_t *m;
+ if (!sv.active)
+ return;
+
+ SV_VM_Begin();
e = FindViewthing ();
+ SV_VM_End();
if (!e)
return;
m = cl.model_precache[(int)e->fields.server->modelindex];
prvm_edict_t *e;
model_t *m;
+ if (!sv.active)
+ return;
+
+ SV_VM_Begin();
e = FindViewthing ();
+ SV_VM_End();
if (!e)
return;
{
int i, c;
- if (cls.state == ca_dedicated || COM_CheckParm("-listen"))
+ if (cls.state == ca_dedicated || COM_CheckParm("-listen") || COM_CheckParm("-benchmark") || COM_CheckParm("-demo") || COM_CheckParm("-demolooponly"))
return;
c = Cmd_Argc() - 1;