From af40d7ce8077d88a50109cb8f5258c04d9c74506 Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Sat, 23 Dec 2023 15:50:36 +0100 Subject: [PATCH] End pursue package if the target doens't have a bounty --- apps/openmw/mwmechanics/actors.cpp | 2 +- apps/openmw/mwmechanics/aipursue.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index 12282a515d..e0baac0764 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -1152,7 +1152,7 @@ namespace MWMechanics if (npcStats.getCrimeId() != -1) { // if you've paid for your crimes and I haven't noticed - if (npcStats.getCrimeId() <= world->getPlayer().getCrimeId() || playerStats.getBounty() <= 0) + if (npcStats.getCrimeId() <= world->getPlayer().getCrimeId()) { // Calm witness down if (ptr.getClass().isClass(ptr, "Guard")) diff --git a/apps/openmw/mwmechanics/aipursue.cpp b/apps/openmw/mwmechanics/aipursue.cpp index 2ae4ce5def..699e96cd32 100644 --- a/apps/openmw/mwmechanics/aipursue.cpp +++ b/apps/openmw/mwmechanics/aipursue.cpp @@ -12,6 +12,7 @@ #include "actorutil.hpp" #include "character.hpp" #include "creaturestats.hpp" +#include "npcstats.hpp" namespace MWMechanics { @@ -47,6 +48,9 @@ namespace MWMechanics if (target.getClass().getCreatureStats(target).isDead()) return true; + if (target.getClass().getNpcStats(target).getBounty() <= 0) + return true; + actor.getClass().getCreatureStats(actor).setDrawState(DrawState::Nothing); // Set the target destination