]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fixed Prydon Gate behavior regarding the start map (which immediately changes level)
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 28 Aug 2003 08:08:07 +0000 (08:08 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 28 Aug 2003 08:08:07 +0000 (08:08 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3421 d7cf8633-e32d-0410-b094-e92efae38249

host_cmd.c

index fb4486f4395bdba63405d92333547672cbb16e9a..6ef5247ef74a8a5a9c7c85d1e11d3e9210aa034d 100644 (file)
@@ -286,6 +286,8 @@ void Host_Map_f (void)
 
        svs.serverflags = 0;                    // haven't completed an episode yet
        strcpy (sv_spawnmap, Cmd_Argv(1));
+       if (host_initialized)
+               Host_PerformSpawnServerAndLoadGame();
 }
 
 /*
@@ -309,6 +311,8 @@ void Host_Changelevel_f (void)
        }
        SV_SaveSpawnparms ();
        strcpy (sv_spawnmap, Cmd_Argv(1));
+       if (host_initialized)
+               Host_PerformSpawnServerAndLoadGame();
 }
 
 /*
@@ -326,6 +330,8 @@ void Host_Restart_f (void)
        if (cmd_source != src_command)
                return;
        strcpy (sv_spawnmap, sv.name);
+       if (host_initialized)
+               Host_PerformSpawnServerAndLoadGame();
 }
 
 /*
@@ -1650,7 +1656,7 @@ void Host_PerformSpawnServerAndLoadGame(void)
        sv_loadgame[0] = 0;
        sv_spawnmap[0] = 0;
        if (sv.active && cls.state == ca_disconnected)
-               Cmd_ExecuteString ("connect local", src_command);
+               Cbuf_AddText ("connect local");
 }
 
 //=============================================================================