mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
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:
parent
a275c2d76f
commit
7aec459b09
1 changed files with 6 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue