1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-16 16:10:58 +00:00

Take in account a temporary disposition in isAggressive check (bug #3987)

This commit is contained in:
Andrei Kortunov 2017-08-03 19:12:21 +04:00
parent 6301fb8497
commit d1489f5b42

View File

@ -1490,7 +1490,7 @@ namespace MWMechanics
{
int disposition = 50;
if (ptr.getClass().isNpc())
disposition = getDerivedDisposition(ptr, false);
disposition = getDerivedDisposition(ptr, true);
int fight = std::max(0, ptr.getClass().getCreatureStats(ptr).getAiSetting(CreatureStats::AI_Fight).getModified()
+ static_cast<int>(getFightDistanceBias(ptr, target) + getFightDispositionBias(static_cast<float>(disposition))));