1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-24 18:39:59 +00:00

Merge branch 'smoothbraincriminal' into 'master'

End pursue package if the target doesn't have a bounty

See merge request OpenMW/openmw!3677
This commit is contained in:
jvoisin 2023-12-26 09:59:24 +00:00
commit b39a6ae9cd
2 changed files with 5 additions and 1 deletions

View File

@ -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"))

View File

@ -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