]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
-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 3a15737f0dbdc05baf1d67e55d4099238e174b86..729469fc723c449692e773f1d42009118e82f402 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 b3cd8a7f75b5e6221e8e2e505f22a2e750d35fd9..3c78a495c07aa7c7e079afa52a69495d06620aae 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;