diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index ccb16d5fb..419558387 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -2229,6 +2229,23 @@ namespace MWWorld if (obstacle == ptr) continue; + MWWorld::Ptr caster = searchPtrViaHandle(it->second.mActorHandle); + if (caster.isEmpty()) + caster = obstacle; + + if (obstacle.isEmpty()) + { + // Terrain + } + else + { + MWMechanics::CastSpell cast(caster, obstacle); + cast.mId = it->second.mId; + cast.mSourceName = it->second.mSourceName; + cast.mStack = it->second.mStack; + cast.inflict(obstacle, caster, it->second.mEffects, ESM::RT_Target); + } + explode = true; } @@ -2240,6 +2257,9 @@ namespace MWWorld { const ESM::MagicEffect* effect = getStore().get().find(effectIt->mEffectID); + if (effectIt->mArea <= 0) + continue; // Not an area effect + // Spawn the explosion orb effect const ESM::Static* areaStatic; if (!effect->mCasting.empty())