mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 12:21:19 +00:00
Make Map Hell a 1% chance
This commit is contained in:
parent
9b7eea408d
commit
9b1c2b8dc0
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue