From: havoc Date: Sat, 28 Sep 2002 10:23:16 +0000 (+0000) Subject: fix restart command (can't do the "connect local" for a restart) X-Git-Tag: RELEASE_0_2_0_RC1~183 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1612d8feb6a6f36e8502ef61ab0cc51168d44b65;p=xonotic%2Fdarkplaces.git fix restart command (can't do the "connect local" for a restart) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2463 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/host_cmd.c b/host_cmd.c index 6a648c38..652f1ce9 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -23,6 +23,7 @@ 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); @@ -299,7 +300,7 @@ void Host_Restart_f (void) if (cmd_source != src_command) return; - strcpy (sv_spawnmap, sv.name); + sv_restartmap = true; } /* @@ -1603,8 +1604,14 @@ void Host_PerformSpawnServerAndLoadGame(void) if (sv.active && cls.state != ca_dedicated) 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; } //=============================================================================