*/
void Host_Ping_f (void)
{
- int i;
- client_t *client;
+ int i;
+ client_t *client;
+ void (*print) (const char *fmt, ...);
if (cmd_source == src_command)
{
- Cmd_ForwardToServer ();
- return;
+ if (!sv.active)
+ {
+ Cmd_ForwardToServer ();
+ return;
+ }
+ print = Con_Printf;
}
+ else
+ print = SV_ClientPrintf;
- SV_ClientPrint("Client ping times:\n");
+ print("Client ping times:\n");
for (i = 0, client = svs.clients;i < svs.maxclients;i++, client++)
{
if (!client->active)
continue;
- SV_ClientPrintf("%4i %s\n", (int)floor(client->ping*1000+0.5), client->name);
+ print("%4i %s\n", (int)floor(client->ping*1000+0.5), client->name);
}
}
*/
void Host_Savegame_f (void)
{
- char name[256];
+ char name[MAX_QPATH];
qfile_t *f;
int i;
char comment[SAVEGAME_COMMENT_LENGTH+1];
cls.demonum = -1; // stop demo loop in case this fails
- t = text = (char *)FS_LoadFile (filename, tempmempool, false);
+ t = text = (char *)FS_LoadFile (filename, tempmempool, false, NULL);
if (!text)
{
Con_Print("ERROR: couldn't open.\n");
if (entnum >= MAX_EDICTS)
{
Mem_Free(text);
- Host_Error("Host_PerformLoadGame: too many edicts in save file (reached MAX_EDICTS %i)\n", MAX_EDICTS);
+ Host_Error("Host_PerformLoadGame: too many edicts in save file (reached MAX_EDICTS %i)", MAX_EDICTS);
}
while (entnum >= prog->max_edicts)
//SV_IncreaseEdicts();
int j, quoted;
const char *p1;
char *p2;
- // LordHavoc: 256 char say messages
- char text[256];
+ // LordHavoc: long say messages
+ char text[1024];
qboolean fromServer = false;
if (cmd_source == src_command)
client_t *save;
int j;
const char *p1, *p2;
- char text[1024]; // LordHavoc: FIXME: temporary buffer overflow fix (was 64)
+ char text[MAX_INPUTLINE]; // LordHavoc: FIXME: temporary buffer overflow fix (was 64)
qboolean fromServer = false;
if (cmd_source == src_command)
}
else
{
- // set up the edict
- PRVM_ED_ClearEdict(host_client->edict);
-
//Con_Printf("Host_Spawn_f: host_client->edict->netname = %s, host_client->edict->netname = %s, host_client->name = %s\n", PRVM_GetString(host_client->edict->fields.server->netname), PRVM_GetString(host_client->edict->fields.server->netname), host_client->name);
// copy spawn parms out of the client_t