int current_skill;
-void Mod_Print (void);
-
dfunction_t *ED_FindFunction (char *name);
/*
// LordHavoc: didn't like it asking me if I wanted to quit
//extern void M_Menu_Quit_f (void);
+extern qboolean host_shuttingdown;
void Host_Quit_f (void)
{
/*
return;
}
*/
+ host_shuttingdown = true;
CL_Disconnect ();
Host_ShutdownServer(false);
cls.demonum = -1; // stop demo loop in case this fails
if (cls.demoplayback)
- {
- CL_StopPlayback ();
CL_Disconnect ();
- }
strcpy (name, Cmd_Argv(1));
CL_EstablishConnection (name);
Host_Reconnect_f ();
}
+extern mempool_t *edictstring_mempool;
+
/*
===============
Host_Loadgame_f
edict_t *ent;
int entnum;
int version;
- float spawn_parms[NUM_SPAWN_PARMS];
+ float spawn_parms[NUM_SPAWN_PARMS];
if (cmd_source != src_command)
return;
for (i=0 ; i<MAX_LIGHTSTYLES ; i++)
{
str = Qgetline (f);
- sv.lightstyles[i] = Hunk_AllocName (strlen(str)+1, "lightstyles");
+ sv.lightstyles[i] = Mem_Alloc(edictstring_mempool, strlen(str)+1);
strcpy (sv.lightstyles[i], str);
}
*/
void Host_Name_f (void)
{
- char *newName;
+ char newName[64];
if (Cmd_Argc () == 1)
{
Con_Printf ("\"name\" is \"%s\"\n", cl_name.string);
return;
}
+ //if (Cmd_Argc () == 2)
+ // newName = Cmd_Argv(1);
+ //else
+ // newName = Cmd_Args();
+ //newName[15] = 0;
if (Cmd_Argc () == 2)
- newName = Cmd_Argv(1);
+ strncpy(newName, Cmd_Argv(1), 15);
else
- newName = Cmd_Args();
+ strncpy(newName, Cmd_Args(), 15);
newName[15] = 0;
if (cmd_source == src_command)
{
if (!client || !client->active || !client->spawned)
continue;
- if (teamplay.value && teamonly && client->edict->v.team != save->edict->v.team)
+ if (teamplay.integer && teamonly && client->edict->v.team != save->edict->v.team)
continue;
host_client = client;
SV_ClientPrintf("%s", text);
if (Cmd_Argc() == 1)
{
- Con_Printf ("\"color\" is \"%i %i\"\n", ((int)cl_color.value) >> 4, ((int)cl_color.value) & 0x0f);
+ Con_Printf ("\"color\" is \"%i %i\"\n", cl_color.integer >> 4, cl_color.integer & 15);
Con_Printf ("color <0-13> [0-13]\n");
return;
}
Cmd_ForwardToServer ();
return;
}
- if (!pausable.value)
+ if (!pausable.integer)
SV_ClientPrintf ("Pause not allowed.\n");
else
{
if (!e)
return;
- m = Mod_ForName (Cmd_Argv(1), false);
+ m = Mod_ForName (Cmd_Argv(1), false, true, false);
if (!m)
{
Con_Printf ("Can't load %s\n", Cmd_Argv(1));
void PrintFrameName (model_t *m, int frame)
{
- int data;
- if (m->ofs_scenes && (data = (int) Mod_Extradata(m)))
- Con_Printf("frame %i: %s\n", frame, ((animscene_t *) (m->ofs_scenes + data))[frame].name);
+ if (m->animscenes)
+ Con_Printf("frame %i: %s\n", frame, m->animscenes[frame].name);
else
Con_Printf("frame %i\n", frame);
}
return;
if (!cls.demoplayback)
return;
- CL_StopPlayback ();
CL_Disconnect ();
}
Cmd_AddCommand ("viewframe", Host_Viewframe_f);
Cmd_AddCommand ("viewnext", Host_Viewnext_f);
Cmd_AddCommand ("viewprev", Host_Viewprev_f);
-
- Cmd_AddCommand ("mcache", Mod_Print);
}