diff --git a/src/gamedata/g_mapinfo.h b/src/gamedata/g_mapinfo.h index 887d1c7b2..e96b1c458 100644 --- a/src/gamedata/g_mapinfo.h +++ b/src/gamedata/g_mapinfo.h @@ -476,6 +476,7 @@ enum ESkillProperty SKILLP_Infight, SKILLP_PlayerRespawn, SKILLP_SpawnMulti, + SKILLP_InstantReaction, }; enum EFSkillProperty // floating point properties { @@ -520,6 +521,7 @@ struct FSkillInfo double Aggressiveness; int SpawnFilter; bool SpawnMulti; + bool InstantReaction; int ACSReturn; FString MenuName; FString PicName; diff --git a/src/gamedata/g_skill.cpp b/src/gamedata/g_skill.cpp index 35b8b08d9..34dde60e1 100644 --- a/src/gamedata/g_skill.cpp +++ b/src/gamedata/g_skill.cpp @@ -77,6 +77,7 @@ void FMapInfoParser::ParseSkill () skill.Aggressiveness = 1.; skill.SpawnFilter = 0; skill.SpawnMulti = false; + skill.InstantReaction = false; skill.ACSReturn = 0; skill.MustConfirm = false; skill.Shortcut = 0; @@ -197,6 +198,10 @@ void FMapInfoParser::ParseSkill () { skill.SpawnMulti = true; } + else if (sc.Compare ("InstantReaction")) + { + skill.InstantReaction = true; + } else if (sc.Compare("ACSReturn")) { ParseAssign(); @@ -400,8 +405,12 @@ int G_SkillProperty(ESkillProperty prop) case SKILLP_PlayerRespawn: return AllSkills[gameskill].PlayerRespawn; + case SKILLP_SpawnMulti: return AllSkills[gameskill].SpawnMulti; + + case SKILLP_InstantReaction: + return AllSkills[gameskill].InstantReaction; } } return 0; @@ -540,6 +549,7 @@ FSkillInfo &FSkillInfo::operator=(const FSkillInfo &other) Aggressiveness= other.Aggressiveness; SpawnFilter = other.SpawnFilter; SpawnMulti = other.SpawnMulti; + InstantReaction = other.InstantReaction; ACSReturn = other.ACSReturn; MenuName = other.MenuName; PicName = other.PicName; diff --git a/src/playsim/p_mobj.cpp b/src/playsim/p_mobj.cpp index 308c58144..68583f8c8 100644 --- a/src/playsim/p_mobj.cpp +++ b/src/playsim/p_mobj.cpp @@ -4477,7 +4477,7 @@ void ConstructActor(AActor *actor, const DVector3 &pos, bool SpawningMapThing) FRandom &rng = Level->BotInfo.m_Thinking ? pr_botspawnmobj : pr_spawnmobj; - if (actor->isFast() && actor->flags3 & MF3_ISMONSTER) + if (!!G_SkillProperty(SKILLP_InstantReaction) && actor->flags3 & MF3_ISMONSTER) actor->reactiontime = 0; if (actor->flags3 & MF3_ISMONSTER) diff --git a/wadsrc/static/mapinfo/chex.txt b/wadsrc/static/mapinfo/chex.txt index 24a577b5c..48a49dd0d 100644 --- a/wadsrc/static/mapinfo/chex.txt +++ b/wadsrc/static/mapinfo/chex.txt @@ -183,6 +183,7 @@ skill nightmare { AmmoFactor = 2 FastMonsters + InstantReaction DisableCheats RespawnTime = 12 SpawnFilter = Nightmare diff --git a/wadsrc/static/mapinfo/doomcommon.txt b/wadsrc/static/mapinfo/doomcommon.txt index c4ebda685..5b468c1b6 100644 --- a/wadsrc/static/mapinfo/doomcommon.txt +++ b/wadsrc/static/mapinfo/doomcommon.txt @@ -217,6 +217,7 @@ skill nightmare { AmmoFactor = 2 FastMonsters + InstantReaction DisableCheats RespawnTime = 12 SpawnFilter = Nightmare diff --git a/wadsrc/static/mapinfo/heretic.txt b/wadsrc/static/mapinfo/heretic.txt index 3c8fba839..bdc68c62d 100644 --- a/wadsrc/static/mapinfo/heretic.txt +++ b/wadsrc/static/mapinfo/heretic.txt @@ -315,6 +315,7 @@ skill nightmare AmmoFactor = 1.5 DoubleAmmoFactor = 1.5 FastMonsters + InstantReaction DisableCheats SpawnFilter = Nightmare Name = "$MNU_BLACKPLAGUE" diff --git a/wadsrc/static/mapinfo/hexen.txt b/wadsrc/static/mapinfo/hexen.txt index 2e41f38ce..da727a6fc 100644 --- a/wadsrc/static/mapinfo/hexen.txt +++ b/wadsrc/static/mapinfo/hexen.txt @@ -456,6 +456,7 @@ skill nightmare AmmoFactor = 1.5 DoubleAmmoFactor = 1.5 FastMonsters + InstantReaction DisableCheats SpawnFilter = Nightmare Name = "$MNU_BLACKPLAGUE" diff --git a/wadsrc/static/zscript/constants.zs b/wadsrc/static/zscript/constants.zs index 4cfff28a9..4840b50e7 100644 --- a/wadsrc/static/zscript/constants.zs +++ b/wadsrc/static/zscript/constants.zs @@ -963,6 +963,7 @@ enum ESkillProperty SKILLP_Infight, SKILLP_PlayerRespawn, SKILLP_SpawnMulti, + SKILLP_InstantReaction, }; enum EFSkillProperty // floating point properties {