support '-skill 0' command line parameter (does not spawn any map objects) (#653)

* support '-skill 0' command line parameter (does not spawn any map objects)

* enable just for demo_compatibility

* distinguish between skill "none" and default skill
This commit is contained in:
Fabian Greffrath 2022-07-12 18:55:57 +02:00 committed by GitHub
parent 994a4e8971
commit 028b00c2c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 4 deletions

View File

@ -2118,7 +2118,7 @@ void D_DoomMain(void)
// get skill / episode / map from parms
startskill = sk_none; // jff 3/24/98 was sk_medium, just note not picked
startskill = sk_default; // jff 3/24/98 was sk_medium, just note not picked
startepisode = 1;
startmap = 1;
autostart = false;

View File

@ -140,6 +140,7 @@ typedef enum {
#define MTF_RESERVED 256
typedef enum {
sk_default=-2,
sk_none=-1, //jff 3/24/98 create unpicked skill setting
sk_baby=0,
sk_easy,

View File

@ -2739,7 +2739,7 @@ void G_ReloadDefaults(void)
//jff 3/24/98 set startskill from defaultskill in config file, unless
// it has already been set by a -skill parameter
if (startskill==sk_none)
if (startskill==sk_default)
startskill = (skill_t)(defaultskill-1);
demoplayback = false;

View File

@ -1209,10 +1209,11 @@ void P_SpawnMapThing (mapthing_t* mthing)
return;
// killough 11/98: simplify
if (gameskill == sk_baby || gameskill == sk_easy ?
if ((gameskill == sk_none && demo_compatibility) ||
(gameskill == sk_baby || gameskill == sk_easy ?
!(mthing->options & MTF_EASY) :
gameskill == sk_hard || gameskill == sk_nightmare ?
!(mthing->options & MTF_HARD) : !(mthing->options & MTF_NORMAL))
!(mthing->options & MTF_HARD) : !(mthing->options & MTF_NORMAL)))
return;
// [crispy] support MUSINFO lump (dynamic music changing)