1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00

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
This commit is contained in:
Alexei Kotov 2023-12-31 17:33:08 +00:00
commit 78459314bf

View File

@ -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());
}