From 1a073ca6426de17c259e7b395333bc4287bd198a Mon Sep 17 00:00:00 2001 From: Assumeru Date: Tue, 3 Jan 2017 22:02:23 +0100 Subject: [PATCH] Fix teleportation being unreachable --- apps/openmw/mwmechanics/spellcasting.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/openmw/mwmechanics/spellcasting.cpp b/apps/openmw/mwmechanics/spellcasting.cpp index 1d1d8cf25..489ab83ec 100644 --- a/apps/openmw/mwmechanics/spellcasting.cpp +++ b/apps/openmw/mwmechanics/spellcasting.cpp @@ -613,13 +613,10 @@ namespace MWMechanics return true; } } - else if (target.getClass().isActor()) + else if (target.getClass().isActor() && effectId == ESM::MagicEffect::Dispel) { - if (effectId == ESM::MagicEffect::Dispel) - { - target.getClass().getCreatureStats(target).getActiveSpells().purgeAll(magnitude); - return true; - } + target.getClass().getCreatureStats(target).getActiveSpells().purgeAll(magnitude); + return true; } else if (target.getClass().isActor() && target == getPlayer()) {