Skip to content

Commit

Permalink
Merge branch 'smoothbraincriminal' into 'master'
Browse files Browse the repository at this point in the history
End pursue package if the target doesn't have a bounty

See merge request OpenMW/openmw!3677
  • Loading branch information
jvoisin committed Dec 26, 2023
2 parents 851bad4 + af40d7c commit b39a6ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/openmw/mwmechanics/actors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
4 changes: 4 additions & 0 deletions apps/openmw/mwmechanics/aipursue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "actorutil.hpp"
#include "character.hpp"
#include "creaturestats.hpp"
#include "npcstats.hpp"

namespace MWMechanics
{
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b39a6ae

Please sign in to comment.