mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
I suppose it's probably a good idea not to crash when someone tries telling the game to warp to an undefined map
git-svn-id: https://svn.eduke32.com/eduke32@382 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
57042cd9a7
commit
44e9f75e48
1 changed files with 15 additions and 8 deletions
|
@ -1491,7 +1491,8 @@ void dofrontscreens(char *statustext)
|
|||
else
|
||||
{
|
||||
menutext(160,90,0,0,"ENTERING");
|
||||
menutext(160,90+16+8,0,0,level_names[(ud.volume_number*MAXLEVELS) + ud.level_number]);
|
||||
if (level_names[(ud.volume_number*MAXLEVELS) + ud.level_number] != NULL)
|
||||
menutext(160,90+16+8,0,0,level_names[(ud.volume_number*MAXLEVELS) + ud.level_number]);
|
||||
}
|
||||
|
||||
if (statustext) gametext(160,180,statustext,0,2+8+16);
|
||||
|
@ -1611,13 +1612,6 @@ int enterlevel(char g)
|
|||
if (VOLUMEALL) Bsprintf(tempbuf,HEAD2);
|
||||
else Bsprintf(tempbuf,HEAD);
|
||||
|
||||
if (boardfilename[0] != 0 && ud.m_level_number == 7 && ud.m_volume_number == 0)
|
||||
{
|
||||
Bstrcpy(levname, boardfilename);
|
||||
Bsprintf(apptitle," - %s",levname);
|
||||
}
|
||||
else Bsprintf(apptitle," - %s",level_names[(ud.volume_number*MAXLEVELS)+ud.level_number]);
|
||||
|
||||
Bstrcat(tempbuf,apptitle);
|
||||
wm_setapptitle(tempbuf);
|
||||
|
||||
|
@ -1625,12 +1619,25 @@ int enterlevel(char g)
|
|||
clearsoundlocks();
|
||||
FX_SetReverb(0);
|
||||
|
||||
if (level_names[(ud.volume_number*MAXLEVELS)+ud.level_number] == NULL || level_file_names[(ud.volume_number*MAXLEVELS)+ud.level_number] == NULL)
|
||||
{
|
||||
initprintf("Map E%ldL%ld not defined!\n",ud.volume_number+1,ud.level_number+1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
i = ud.screen_size;
|
||||
ud.screen_size = 0;
|
||||
dofrontscreens(NULL);
|
||||
vscrn();
|
||||
ud.screen_size = i;
|
||||
|
||||
if (boardfilename[0] != 0 && ud.m_level_number == 7 && ud.m_volume_number == 0)
|
||||
{
|
||||
Bstrcpy(levname, boardfilename);
|
||||
Bsprintf(apptitle," - %s",levname);
|
||||
}
|
||||
else Bsprintf(apptitle," - %s",level_names[(ud.volume_number*MAXLEVELS)+ud.level_number]);
|
||||
|
||||
if (!VOLUMEONE)
|
||||
{
|
||||
if (boardfilename[0] != 0 && ud.m_level_number == 7 && ud.m_volume_number == 0)
|
||||
|
|
Loading…
Reference in a new issue