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

This commit is contained in:
drfrag 2021-01-12 23:37:45 +01:00 committed by Rachael Alexanderson
parent f384c7bc1f
commit 4ff72e937f
8 changed files with 18 additions and 1 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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)

View File

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

View File

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

View File

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

View File

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

View File

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