host_cmd.c (Host_Changelevel_f, Host_Restart_f): if the serverspawn

fails even with an existing map, issue a Host_Error().

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@827 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2013-03-02 10:29:26 +00:00
parent a275c2d76f
commit 7aec459b09

View file

@ -890,6 +890,9 @@ void Host_Changelevel_f (void)
SV_SaveSpawnparms ();
q_strlcpy (level, Cmd_Argv(1), sizeof(level));
SV_SpawnServer (level);
// also issue an error if spawn failed -- O.S.
if (!sv.active)
Host_Error ("cannot run map %s", level);
}
/*
@ -908,9 +911,10 @@ void Host_Restart_f (void)
if (cmd_source != src_command)
return;
q_strlcpy (mapname, sv.name, sizeof(mapname)); // must copy out, because it gets cleared
// in sv_spawnserver
q_strlcpy (mapname, sv.name, sizeof(mapname)); // mapname gets cleared in spawnserver
SV_SpawnServer (mapname);
if (!sv.active)
Host_Error ("cannot restart map %s", level);
}
/*