1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 17:59:56 +00:00

Don't count the actor we're following as siding with us if we're in combat with them but they aren't in combat with us

This commit is contained in:
Evil Eye 2023-12-12 22:06:52 +01:00
parent abbb620ea2
commit f80cd06256

View file

@ -2090,6 +2090,10 @@ namespace MWMechanics
if (ally.getClass().getCreatureStats(ally).getAiSequence().getCombatTargets(enemies)
&& std::find(enemies.begin(), enemies.end(), actorPtr) != enemies.end())
break;
enemies.clear();
if (actorPtr.getClass().getCreatureStats(actorPtr).getAiSequence().getCombatTargets(enemies)
&& std::find(enemies.begin(), enemies.end(), ally) != enemies.end())
break;
}
list.push_back(package->getTarget());
}