Merge branch 'impartialplayerbelike' into 'master'

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

Closes #7645

See merge request OpenMW/openmw!3650
macos_ci_fix
Alexei Kotov 4 months ago
commit 78459314bf

@ -2095,6 +2095,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());
}

Loading…
Cancel
Save