mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 06:51:47 +00:00
just bail from SV_Map_f if the requested map doesn't exist so play doesn't
get interupted.
This commit is contained in:
parent
1d35f4dd9e
commit
4373e4b4de
1 changed files with 5 additions and 12 deletions
|
@ -369,18 +369,11 @@ SV_Map_f (void)
|
|||
level[sizeof (level) - 1] = 0;
|
||||
|
||||
// check to make sure the level exists
|
||||
while (1) {
|
||||
snprintf (expanded, sizeof (expanded), "maps/%s.bsp", level);
|
||||
COM_FOpenFile (expanded, &f);
|
||||
if (!f) {
|
||||
SV_Printf ("Can't find %s\n", expanded);
|
||||
// If curlevel == level, something is SCREWED! --KB
|
||||
if (strcaseequal (level, curlevel))
|
||||
Sys_Error ("map: cannot restart level");
|
||||
strcpy (level, curlevel);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
snprintf (expanded, sizeof (expanded), "maps/%s.bsp", level);
|
||||
COM_FOpenFile (expanded, &f);
|
||||
if (!f) {
|
||||
SV_Printf ("Can't find %s\n", expanded);
|
||||
return;
|
||||
}
|
||||
Qclose (f);
|
||||
|
||||
|
|
Loading…
Reference in a new issue