- allow specifying infighting through skills.

This commit is contained in:
Christoph Oelckers 2015-11-29 12:10:12 +01:00
commit 1ad02a6ce8
4 changed files with 22 additions and 8 deletions

View file

@ -1639,10 +1639,8 @@ bool AActor::OkayToSwitchTarget (AActor *other)
int infight;
if (flags5 & MF5_NOINFIGHTING) infight=-1;
else if (level.flags2 & LEVEL2_TOTALINFIGHTING) infight=1;
else if (level.flags2 & LEVEL2_NOINFIGHTING) infight=-1;
else infight = infighting;
else infight = G_SkillProperty(SKILLP_Infight);
if (infight < 0 && other->player == NULL && !IsHostile (other))
{
return false; // infighting off: Non-friendlies don't target other non-friendlies