From 1612d8feb6a6f36e8502ef61ab0cc51168d44b65 Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 28 Sep 2002 10:23:16 +0000 Subject: [PATCH] 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 --- host_cmd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; } //============================================================================= -- 2.39.2