From 88d992a0200abd14f8b3814d0bd0a8f1d9259362 Mon Sep 17 00:00:00 2001 From: Allofich Date: Thu, 8 Sep 2016 00:05:45 +0900 Subject: [PATCH 1/2] Create area effect visual for non-area spells --- apps/openmw/mwworld/worldimp.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 4ebd416621..152a2f5b43 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -3162,9 +3162,8 @@ namespace MWWorld { const ESM::MagicEffect* effect = getStore().get().find(effectIt->mEffectID); - if (effectIt->mArea <= 0 || effectIt->mRange != rangeType) - continue; // Not an area effect or not right range type - + if (effectIt->mRange != rangeType) + continue; // Not right range type // Spawn the explosion orb effect const ESM::Static* areaStatic; @@ -3173,7 +3172,13 @@ namespace MWWorld else areaStatic = getStore().get().find ("VFX_DefaultArea"); - mRendering->spawnEffect("meshes\\" + areaStatic->mModel, "", origin, static_cast(effectIt->mArea * 2)); + if (effectIt->mArea <= 0) + { + mRendering->spawnEffect("meshes\\" + areaStatic->mModel, "", origin, 1.0f); + continue; + } + else + mRendering->spawnEffect("meshes\\" + areaStatic->mModel, "", origin, static_cast(effectIt->mArea * 2)); // Play explosion sound (make sure to use NoTrack, since we will delete the projectile now) static const std::string schools[] = { From 02610828c1e41739fbb757ca2c07c8a3a8639a6f Mon Sep 17 00:00:00 2001 From: Allofich Date: Thu, 8 Sep 2016 02:05:24 +0900 Subject: [PATCH 2/2] Don't play area vfx for non-area spells on actors. --- apps/openmw/mwworld/worldimp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 152a2f5b43..82f99b7ea5 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -3162,8 +3162,8 @@ namespace MWWorld { const ESM::MagicEffect* effect = getStore().get().find(effectIt->mEffectID); - if (effectIt->mRange != rangeType) - continue; // Not right range type + if ((effectIt->mArea <= 0 && !ignore.isEmpty() && ignore.getClass().isActor()) || effectIt->mRange != rangeType) + continue; // Not right range type, or not area effect and hit an actor // Spawn the explosion orb effect const ESM::Static* areaStatic;