From 6d5d0039ecfe03268c4ab68e037b23de2b0736ab Mon Sep 17 00:00:00 2001
From: Andrei Kortunov <andrei.kortunov@yandex.ru>
Date: Tue, 24 Jul 2018 23:52:05 +0400
Subject: [PATCH] Make sure we apply OT_Murder only once

---
 apps/openmw/mwmechanics/actors.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp
index 36ba77cfb..768d9e37a 100644
--- a/apps/openmw/mwmechanics/actors.cpp
+++ b/apps/openmw/mwmechanics/actors.cpp
@@ -766,6 +766,8 @@ namespace MWMechanics
 
             for (ActiveSpells::TIterator it = spells.begin(); it != spells.end(); ++it)
             {
+                bool actorKilled = false;
+
                 const ActiveSpells::ActiveSpellParams& spell = it->second;
                 MWWorld::Ptr caster = MWBase::Environment::get().getWorld()->searchPtrViaActorId(spell.mCasterActorId);
                 for (std::vector<ActiveSpells::ActiveEffect>::const_iterator effectIt = spell.mEffects.begin();
@@ -793,10 +795,14 @@ namespace MWMechanics
                                 caster.getClass().getNpcStats(caster).addWerewolfKill();
 
                             MWBase::Environment::get().getMechanicsManager()->actorKilled(ptr, player);
+                            actorKilled = true;
                             break;
                         }
                     }
                 }
+
+                if (actorKilled)
+                    break;
             }
         }