- 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_Infight,
SKILLP_PlayerRespawn,
SKILLP_InstantReaction,
};
enum EFSkillProperty // floating point properties
{
@ -590,6 +591,7 @@ struct FSkillInfo
int RespawnLimit;
double Aggressiveness;
int SpawnFilter;
bool InstantReaction;
int ACSReturn;
FString MenuName;
FString PicName;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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