mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-10 09:41:09 +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: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@827 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
3d7a0fd66a
commit
eb8e1beed3
1 changed files with 6 additions and 2 deletions
|
@ -890,6 +890,9 @@ void Host_Changelevel_f (void)
|
||||||
SV_SaveSpawnparms ();
|
SV_SaveSpawnparms ();
|
||||||
q_strlcpy (level, Cmd_Argv(1), sizeof(level));
|
q_strlcpy (level, Cmd_Argv(1), sizeof(level));
|
||||||
SV_SpawnServer (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)
|
if (cmd_source != src_command)
|
||||||
return;
|
return;
|
||||||
q_strlcpy (mapname, sv.name, sizeof(mapname)); // must copy out, because it gets cleared
|
q_strlcpy (mapname, sv.name, sizeof(mapname)); // mapname gets cleared in spawnserver
|
||||||
// in sv_spawnserver
|
|
||||||
SV_SpawnServer (mapname);
|
SV_SpawnServer (mapname);
|
||||||
|
if (!sv.active)
|
||||||
|
Host_Error ("cannot restart map %s", level);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue