1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 22:23:51 +00:00

Create area effect visual for non-area spells

This commit is contained in:
Allofich 2016-09-08 00:05:45 +09:00
parent 03a35c38df
commit 88d992a020

View file

@ -3162,9 +3162,8 @@ namespace MWWorld
{ {
const ESM::MagicEffect* effect = getStore().get<ESM::MagicEffect>().find(effectIt->mEffectID); const ESM::MagicEffect* effect = getStore().get<ESM::MagicEffect>().find(effectIt->mEffectID);
if (effectIt->mArea <= 0 || effectIt->mRange != rangeType) if (effectIt->mRange != rangeType)
continue; // Not an area effect or not right range type continue; // Not right range type
// Spawn the explosion orb effect // Spawn the explosion orb effect
const ESM::Static* areaStatic; const ESM::Static* areaStatic;
@ -3173,6 +3172,12 @@ namespace MWWorld
else else
areaStatic = getStore().get<ESM::Static>().find ("VFX_DefaultArea"); areaStatic = getStore().get<ESM::Static>().find ("VFX_DefaultArea");
if (effectIt->mArea <= 0)
{
mRendering->spawnEffect("meshes\\" + areaStatic->mModel, "", origin, 1.0f);
continue;
}
else
mRendering->spawnEffect("meshes\\" + areaStatic->mModel, "", origin, static_cast<float>(effectIt->mArea * 2)); mRendering->spawnEffect("meshes\\" + areaStatic->mModel, "", origin, static_cast<float>(effectIt->mArea * 2));
// Play explosion sound (make sure to use NoTrack, since we will delete the projectile now) // Play explosion sound (make sure to use NoTrack, since we will delete the projectile now)