- Fixed: Monster reaction time was always zero with fast monsters and not just on nightmare.

This commit is contained in:
drfrag 2021-01-13 11:33:58 +01:00
parent d2d4c8c7c1
commit b40aedde19
8 changed files with 17 additions and 1 deletions

View file

@ -547,6 +547,7 @@ enum ESkillProperty
SKILLP_SlowMonsters, SKILLP_SlowMonsters,
SKILLP_Infight, SKILLP_Infight,
SKILLP_PlayerRespawn, SKILLP_PlayerRespawn,
SKILLP_InstantReaction,
}; };
enum EFSkillProperty // floating point properties enum EFSkillProperty // floating point properties
{ {
@ -590,6 +591,7 @@ struct FSkillInfo
int RespawnLimit; int RespawnLimit;
double Aggressiveness; double Aggressiveness;
int SpawnFilter; int SpawnFilter;
bool InstantReaction;
int ACSReturn; int ACSReturn;
FString MenuName; FString MenuName;
FString PicName; FString PicName;

View file

@ -79,6 +79,7 @@ void FMapInfoParser::ParseSkill ()
skill.RespawnLimit = 0; skill.RespawnLimit = 0;
skill.Aggressiveness = 1.; skill.Aggressiveness = 1.;
skill.SpawnFilter = 0; skill.SpawnFilter = 0;
skill.InstantReaction = false;
skill.ACSReturn = 0; skill.ACSReturn = 0;
skill.MustConfirm = false; skill.MustConfirm = false;
skill.Shortcut = 0; skill.Shortcut = 0;
@ -195,6 +196,10 @@ void FMapInfoParser::ParseSkill ()
else if (sc.Compare("nightmare")) skill.SpawnFilter |= 16; else if (sc.Compare("nightmare")) skill.SpawnFilter |= 16;
} }
} }
else if (sc.Compare ("InstantReaction"))
{
skill.InstantReaction = true;
}
else if (sc.Compare("ACSReturn")) else if (sc.Compare("ACSReturn"))
{ {
ParseAssign(); ParseAssign();
@ -401,6 +406,9 @@ int G_SkillProperty(ESkillProperty prop)
case SKILLP_PlayerRespawn: case SKILLP_PlayerRespawn:
return AllSkills[gameskill].PlayerRespawn; return AllSkills[gameskill].PlayerRespawn;
case SKILLP_InstantReaction:
return AllSkills[gameskill].InstantReaction;
} }
} }
return 0; return 0;
@ -538,6 +546,7 @@ FSkillInfo &FSkillInfo::operator=(const FSkillInfo &other)
RespawnLimit= other.RespawnLimit; RespawnLimit= other.RespawnLimit;
Aggressiveness= other.Aggressiveness; Aggressiveness= other.Aggressiveness;
SpawnFilter = other.SpawnFilter; SpawnFilter = other.SpawnFilter;
InstantReaction = other.InstantReaction;
ACSReturn = other.ACSReturn; ACSReturn = other.ACSReturn;
MenuName = other.MenuName; MenuName = other.MenuName;
PicName = other.PicName; PicName = other.PicName;

View file

@ -4503,7 +4503,7 @@ AActor *AActor::StaticSpawn (PClassActor *type, const DVector3 &pos, replace_t a
FRandom &rng = bglobal.m_Thinking ? pr_botspawnmobj : pr_spawnmobj; FRandom &rng = bglobal.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; actor->reactiontime = 0;
if (actor->flags3 & MF3_ISMONSTER) if (actor->flags3 & MF3_ISMONSTER)

View file

@ -177,6 +177,7 @@ skill nightmare
{ {
AmmoFactor = 2 AmmoFactor = 2
FastMonsters FastMonsters
InstantReaction
DisableCheats DisableCheats
RespawnTime = 12 RespawnTime = 12
SpawnFilter = Nightmare SpawnFilter = Nightmare

View file

@ -211,6 +211,7 @@ skill nightmare
{ {
AmmoFactor = 2 AmmoFactor = 2
FastMonsters FastMonsters
InstantReaction
DisableCheats DisableCheats
RespawnTime = 12 RespawnTime = 12
SpawnFilter = Nightmare SpawnFilter = Nightmare

View file

@ -309,6 +309,7 @@ skill nightmare
AmmoFactor = 1.5 AmmoFactor = 1.5
DoubleAmmoFactor = 1.5 DoubleAmmoFactor = 1.5
FastMonsters FastMonsters
InstantReaction
DisableCheats DisableCheats
SpawnFilter = Nightmare SpawnFilter = Nightmare
Name = "$MNU_BLACKPLAGUE" Name = "$MNU_BLACKPLAGUE"

View file

@ -455,6 +455,7 @@ skill nightmare
AmmoFactor = 1.5 AmmoFactor = 1.5
DoubleAmmoFactor = 1.5 DoubleAmmoFactor = 1.5
FastMonsters FastMonsters
InstantReaction
DisableCheats DisableCheats
SpawnFilter = Nightmare SpawnFilter = Nightmare
Name = "$MNU_BLACKPLAGUE" Name = "$MNU_BLACKPLAGUE"

View file

@ -1018,6 +1018,7 @@ enum ESkillProperty
SKILLP_SlowMonsters, SKILLP_SlowMonsters,
SKILLP_Infight, SKILLP_Infight,
SKILLP_PlayerRespawn, SKILLP_PlayerRespawn,
SKILLP_InstantReaction,
}; };
enum EFSkillProperty // floating point properties enum EFSkillProperty // floating point properties
{ {