-Changed a call to VariableString with FindCvar.
authorblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 30 Jul 2005 18:43:24 +0000 (18:43 +0000)
committerblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 30 Jul 2005 18:43:24 +0000 (18:43 +0000)
-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
host_cmd.c

diff --git a/cmd.c b/cmd.c
index 3a15737..729469f 100644 (file)
--- 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;
index b3cd8a7..3c78a49 100644 (file)
@@ -294,7 +294,12 @@ void Host_Changelevel_f (void)
                Con_Print("changelevel <levelname> : 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;