Stop guards trying to arrest player when calm

(Fixes #3863)
pull/356/head
Allofich 7 years ago
parent d2b3f902c7
commit e0c54b3f39

@ -1009,7 +1009,8 @@ namespace MWMechanics
if (player.getClass().getNpcStats(player).isWerewolf())
return;
if (ptr.getClass().isClass(ptr, "Guard") && creatureStats.getAiSequence().getTypeId() != AiPackage::TypeIdPursue && !creatureStats.getAiSequence().isInCombat())
if (ptr.getClass().isClass(ptr, "Guard") && creatureStats.getAiSequence().getTypeId() != AiPackage::TypeIdPursue && !creatureStats.getAiSequence().isInCombat()
&& creatureStats.getMagicEffects().get(ESM::MagicEffect::CalmHumanoid).getMagnitude() == 0)
{
const MWWorld::ESMStore& esmStore = MWBase::Environment::get().getWorld()->getStore();
static const int cutoff = esmStore.get<ESM::GameSetting>().find("iCrimeThreshold")->getInt();

Loading…
Cancel
Save