From e9009f8d10e5dc32687d76b408492c7c6d4982b0 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Thu, 10 Oct 2019 17:18:28 +0300 Subject: [PATCH] Make sure summoned creatures are removed upon caster death --- apps/openmw/mwmechanics/summoning.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/summoning.cpp b/apps/openmw/mwmechanics/summoning.cpp index b3f7afc531..e2cbace702 100644 --- a/apps/openmw/mwmechanics/summoning.cpp +++ b/apps/openmw/mwmechanics/summoning.cpp @@ -86,9 +86,10 @@ namespace MWMechanics } // Update summon effects + bool casterDead = creatureStats.isDead(); for (std::map::iterator it = creatureMap.begin(); it != creatureMap.end(); ) { - bool found = mActiveEffects.find(it->first) != mActiveEffects.end(); + bool found = !casterDead && mActiveEffects.find(it->first) != mActiveEffects.end(); if (!found) { // Effect has ended