just bail from SV_Map_f if the requested map doesn't exist so play doesn't

get interupted.
This commit is contained in:
Bill Currie 2002-09-04 18:26:34 +00:00
parent 1d35f4dd9e
commit 4373e4b4de

View file

@ -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);