mirror of
https://github.com/OpenMW/openmw.git
synced 2025-11-08 17:46:40 +00:00
Merge pull request #1049 from Allofich/explosion
Create area effect visual for non-area spells
This commit is contained in:
commit
57ca2ab5ba
1 changed files with 9 additions and 4 deletions
|
|
@ -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->mArea <= 0 && !ignore.isEmpty() && ignore.getClass().isActor()) || effectIt->mRange != rangeType)
|
||||||
continue; // Not an area effect or not right range type
|
continue; // Not right range type, or not area effect and hit an actor
|
||||||
|
|
||||||
|
|
||||||
// Spawn the explosion orb effect
|
// Spawn the explosion orb effect
|
||||||
const ESM::Static* areaStatic;
|
const ESM::Static* areaStatic;
|
||||||
|
|
@ -3173,7 +3172,13 @@ namespace MWWorld
|
||||||
else
|
else
|
||||||
areaStatic = getStore().get<ESM::Static>().find ("VFX_DefaultArea");
|
areaStatic = getStore().get<ESM::Static>().find ("VFX_DefaultArea");
|
||||||
|
|
||||||
mRendering->spawnEffect("meshes\\" + areaStatic->mModel, "", origin, static_cast<float>(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<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)
|
||||||
static const std::string schools[] = {
|
static const std::string schools[] = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue