From 688396cea66f09e7ce20d3e3b077261dd1d3db7e Mon Sep 17 00:00:00 2001 From: black Date: Sat, 30 Jul 2005 18:43:24 +0000 Subject: [PATCH] -Changed a call to VariableString with FindCvar. -Made changelevel call map if there is no server running (you could call this a hack). git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5549 d7cf8633-e32d-0410-b094-e92efae38249 --- cmd.c | 2 +- host_cmd.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cmd.c b/cmd.c index 3a15737f..729469fc 100644 --- a/cmd.c +++ b/cmd.c @@ -649,7 +649,7 @@ void Cmd_AddCommand (const char *cmd_name, xcommand_t function) cmd_function_t *prev, *current; // fail if the command is a variable name - if (Cvar_VariableString(cmd_name)[0]) + if (Cvar_FindVar( cmd_name )) { Con_Printf("Cmd_AddCommand: %s already defined as a var\n", cmd_name); return; diff --git a/host_cmd.c b/host_cmd.c index b3cd8a7f..3c78a495 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -294,7 +294,12 @@ void Host_Changelevel_f (void) Con_Print("changelevel : continue game on a new level\n"); return; } - if (!sv.active || cls.demoplayback) + // HACKHACKHACK + if (!sv.active) { + Host_Map_f(); + return; + } + if (cls.demoplayback) { Con_Print("Only the server may changelevel\n"); return; -- 2.39.2