Make Map Hell a 1% chance

This commit is contained in:
TehRealSalt 2018-11-19 23:41:15 -05:00
parent 9b7eea408d
commit 9b1c2b8dc0
1 changed files with 4 additions and 2 deletions

View File

@ -3272,12 +3272,15 @@ INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean dontadd, boolean ignoreb
{
INT32 numokmaps = 0;
INT16 ix, bufx;
boolean usehellmaps; // Only consider Hell maps in this pick
if (!okmaps)
okmaps = Z_Malloc(NUMMAPS * sizeof(INT16), PU_STATIC, NULL);
tryagain:
usehellmaps = (maphell == 0 ? false : (maphell == 2 || M_RandomChance(FRACUNIT/100))); // 1% chance of Hell
// Find all the maps that are ok and and put them in an array.
for (ix = 0; ix < NUMMAPS; ix++)
{
@ -3289,8 +3292,7 @@ tryagain:
if ((mapheaderinfo[ix]->typeoflevel & tolflags) != tolflags
|| ix == pprevmap
|| (!dedicated && M_MapLocked(ix+1))
|| (!maphell && (mapheaderinfo[ix]->menuflags & LF2_HIDEINMENU)) // this is bad
|| ((maphell == 2) && !(mapheaderinfo[ix]->menuflags & LF2_HIDEINMENU))) // gasp
|| (usehellmaps != (mapheaderinfo[ix]->menuflags & LF2_HIDEINMENU))) // this is bad
continue; //isokmap = false;
if (!ignorebuffer)