Merge pull request #2459 from Capostrophic/fight

Don't clamp semi-final actor fight rating to 0 (bug #5105)
pull/541/head
Alexei Dobrohotov 5 years ago committed by GitHub
commit 56c9c72bc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -115,6 +115,7 @@
Bug #5092: NPCs with enchanted weapons play sound when out of charges
Bug #5093: Hand to hand sound plays on knocked out enemies
Bug #5099: Non-swimming enemies will enter water if player is water walking
Bug #5105: NPCs start combat with werewolves from any distance
Bug #5110: ModRegion with a redundant numerical argument breaks script execution
Feature #1774: Handle AvoidNode
Feature #2229: Improve pathfinding AI

@ -1785,8 +1785,8 @@ namespace MWMechanics
if (ptr.getClass().isNpc())
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))));
int fight = ptr.getClass().getCreatureStats(ptr).getAiSetting(CreatureStats::AI_Fight).getModified()
+ static_cast<int>(getFightDistanceBias(ptr, target) + getFightDispositionBias(static_cast<float>(disposition)));
if (ptr.getClass().isNpc() && target.getClass().isNpc())
{

Loading…
Cancel
Save