1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-07-02 21:41:34 +00:00

Combat AI: Prefer picking reachable/visible targets (bug #6932)

This commit is contained in:
Alexei Kotov 2023-10-21 16:22:15 +03:00
parent a08ca11c34
commit 3330907d7b
2 changed files with 4 additions and 1 deletions

View file

@ -33,6 +33,7 @@
Bug #6807: Ultimate Galleon is not working properly
Bug #6893: Lua: Inconsistent behavior with actors affected by Disable and SetDelete commands
Bug #6894: Added item combines with equipped stack instead of creating a new unequipped stack
Bug #6932: Creatures flee from my followers and we have to chase after them
Bug #6939: OpenMW-CS: ID columns are too short
Bug #6949: Sun Damage effect doesn't work in quasi exteriors
Bug #6964: Nerasa Dralor Won't Follow

View file

@ -272,7 +272,9 @@ namespace MWMechanics
}
else
{
float rating = MWMechanics::getBestActionRating(actor, target);
float rating = 0.f;
if (MWMechanics::canFight(actor, target))
rating = MWMechanics::getBestActionRating(actor, target);
const ESM::Position& targetPos = target.getRefData().getPosition();