- changed infighting check so that the static skill checker does not access the level

Instead the level needs to be queried now.
This commit is contained in:
Christoph Oelckers 2019-01-28 14:31:23 +01:00
commit 1dc11c5032
6 changed files with 16 additions and 7 deletions

View file

@ -393,9 +393,6 @@ int G_SkillProperty(ESkillProperty prop)
return AllSkills[gameskill].NoPain;
case SKILLP_Infight:
// This property also needs to consider the level flags for the same info.
if (level.flags2 & LEVEL2_TOTALINFIGHTING) return 1;
if (level.flags2 & LEVEL2_NOINFIGHTING) return -1;
if (AllSkills[gameskill].Infighting == LEVEL2_TOTALINFIGHTING) return 1;
if (AllSkills[gameskill].Infighting == LEVEL2_NOINFIGHTING) return -1;
return infighting;