]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix changelevel, and simplify restart code
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 30 Sep 2002 03:37:53 +0000 (03:37 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 30 Sep 2002 03:37:53 +0000 (03:37 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2481 d7cf8633-e32d-0410-b094-e92efae38249

host_cmd.c

index 652f1ce93df3691f6b778a5e364e36b3dfd5fdb1..1ac4b6cb572704173b8e46c7c4e82ef3093cdb7e 100644 (file)
@@ -23,7 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 int current_skill;
 char sv_spawnmap[MAX_QPATH];
 char sv_loadgame[MAX_OSPATH];
-int sv_restartmap;
 
 dfunction_t *ED_FindFunction (char *name);
 
@@ -300,7 +299,7 @@ void Host_Restart_f (void)
 
        if (cmd_source != src_command)
                return;
-       sv_restartmap = true;
+       strcpy (sv_spawnmap, sv.name);
 }
 
 /*
@@ -1601,17 +1600,11 @@ void Host_PerformSpawnServerAndLoadGame(void)
        else if (sv_spawnmap[0])
        {
                SV_SpawnServer(sv_spawnmap);
-               if (sv.active && cls.state != ca_dedicated)
+               if (sv.active && cls.state == ca_disconnected)
                        Cmd_ExecuteString ("connect local", src_command);
        }
-       else if (sv_restartmap)
-       {
-               strcpy(sv_spawnmap, sv.name);
-               SV_SpawnServer(sv_spawnmap);
-       }
        sv_loadgame[0] = 0;
        sv_spawnmap[0] = 0;
-       sv_restartmap = 0;
 }
 
 //=============================================================================