- 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

@ -1163,7 +1163,7 @@ static bool CanAttackHurt(AActor *victim, AActor *shooter)
// to harm / be harmed by anything.
if (!victim->player && !shooter->player)
{
int infight = G_SkillProperty(SKILLP_Infight);
int infight = victim->Level->GetInfighting();
if (infight < 0 && (victim->flags7 & MF7_FORCEINFIGHTING)) infight = 0; // This must override the 'no infight' setting to take effect.
if (infight < 0)