File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1571,9 +1571,8 @@ namespace MWMechanics
15711571 const MWWorld::Class& cls = target.getClass ();
15721572 const MWMechanics::CreatureStats& stats = cls.getCreatureStats (target);
15731573 const MWMechanics::AiSequence& seq = stats.getAiSequence ();
1574- return cls.isNpc () && !attacker.isEmpty () && !seq.isInCombat (attacker) && !isAggressive (target, attacker)
1575- && !seq.isEngagedWithActor () && !stats.getAiSequence ().isInPursuit ()
1576- && !cls.getNpcStats (target).isWerewolf ()
1574+ return cls.isNpc () && !attacker.isEmpty () && !isAggressive (target, attacker) && !seq.isEngagedWithActor ()
1575+ && !stats.getAiSequence ().isInPursuit () && !cls.getNpcStats (target).isWerewolf ()
15771576 && stats.getMagicEffects ().getOrDefault (ESM::MagicEffect::Vampirism).getMagnitude () <= 0 ;
15781577 }
15791578
@@ -1864,6 +1863,10 @@ namespace MWMechanics
18641863
18651864 bool MechanicsManager::isAggressive (const MWWorld::Ptr& ptr, const MWWorld::Ptr& target)
18661865 {
1866+ // If already in combat with target, consider aggressive
1867+ if (ptr.getClass ().getCreatureStats (ptr).getAiSequence ().isInCombat (target))
1868+ return true ;
1869+
18671870 // Don't become aggressive if a calm effect is active, since it would cause combat to cycle on/off as
18681871 // combat is activated here and then canceled by the calm effect
18691872 if ((ptr.getClass ().isNpc ()
You can’t perform that action at this time.
0 commit comments