diff --git a/src/d_main.cpp b/src/d_main.cpp index 7462f4250..4f0916a72 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -555,6 +555,7 @@ CVAR (Flag, sv_cooplosearmor, dmflags, DF_COOP_LOSE_ARMOR); CVAR (Flag, sv_cooplosepowerups, dmflags, DF_COOP_LOSE_POWERUPS); CVAR (Flag, sv_cooploseammo, dmflags, DF_COOP_LOSE_AMMO); CVAR (Flag, sv_coophalveammo, dmflags, DF_COOP_HALVE_AMMO); +CVAR (Flag, sv_instantreaction, dmflags, DF_INSTANT_REACTION); // Some (hopefully cleaner) interface to these settings. CVAR (Mask, sv_crouch, dmflags, DF_NO_CROUCH|DF_YES_CROUCH); diff --git a/src/doomdef.h b/src/doomdef.h index df4d55999..1adf81d7d 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -136,6 +136,7 @@ enum DF_COOP_LOSE_POWERUPS = 1 << 28, // Lose powerups when respawning in coop DF_COOP_LOSE_AMMO = 1 << 29, // Lose ammo when respawning in coop DF_COOP_HALVE_AMMO = 1 << 30, // Lose half your ammo when respawning in coop (but not less than the normal starting amount) + DF_INSTANT_REACTION = 1 << 31, // Monsters react instantly }; // [BC] More dmflags. w00p! diff --git a/src/playsim/p_mobj.cpp b/src/playsim/p_mobj.cpp index 68583f8c8..fade8e640 100644 --- a/src/playsim/p_mobj.cpp +++ b/src/playsim/p_mobj.cpp @@ -4477,7 +4477,8 @@ void ConstructActor(AActor *actor, const DVector3 &pos, bool SpawningMapThing) FRandom &rng = Level->BotInfo.m_Thinking ? pr_botspawnmobj : pr_spawnmobj; - if (!!G_SkillProperty(SKILLP_InstantReaction) && actor->flags3 & MF3_ISMONSTER) + if (!!(G_SkillProperty(SKILLP_InstantReaction) || !!(dmflags & DF_INSTANT_REACTION)) + && actor->flags3 & MF3_ISMONSTER) actor->reactiontime = 0; if (actor->flags3 & MF3_ISMONSTER) diff --git a/src/sound/s_advsound.cpp b/src/sound/s_advsound.cpp index cdc84b0a7..c0729bba6 100644 --- a/src/sound/s_advsound.cpp +++ b/src/sound/s_advsound.cpp @@ -1174,9 +1174,11 @@ static void S_AddSNDINFO (int lump) if (lump >= 0) { // do not set the alias if a later WAD defines its own music of this name + // internal files (up to and including iwads) can always be set for musicalias int file = fileSystem.GetFileContainer(lump); int sndifile = fileSystem.GetFileContainer(sc.LumpNum); - if (!(sndifile == 1 && file <= fileSystem.GetIwadNum()) && (file > sndifile)) + if ( (file > sndifile) && + !(sndifile <= fileSystem.GetIwadNum() && file <= fileSystem.GetIwadNum()) ) { sc.MustGetString(); continue; diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 8341eba31..b2c5e58e5 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -1641,6 +1641,7 @@ OptionMenu GameplayOptions protected Option "$GMPLYMNU_ITEMSRESPAWN", "sv_itemrespawn", "YesNo" Option "$GMPLYMNU_SUPERRESPAWN", "sv_respawnsuper", "YesNo" Option "$GMPLYMNU_FASTMONSTERS", "sv_fastmonsters", "YesNo" + Option "$GMPLYMNU_INSTANTREACTION", "sv_instantreaction", "YesNo" Option "$GMPLYMNU_DEGENERATION", "sv_degeneration", "YesNo" Option "$GMPLYMNU_NOAUTOAIM", "sv_noautoaim", "NoYes" Option "$GMPLYMNU_ALLOWSUICIDE", "sv_disallowsuicide", "NoYes"