mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-24 12:39:43 +00:00
Properly handle on target effects with mArea=0
This commit is contained in:
parent
bd34b61f2a
commit
42284603f7
1 changed files with 20 additions and 0 deletions
|
@ -2229,6 +2229,23 @@ namespace MWWorld
|
||||||
if (obstacle == ptr)
|
if (obstacle == ptr)
|
||||||
continue;
|
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;
|
explode = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2240,6 +2257,9 @@ 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)
|
||||||
|
continue; // Not an area effect
|
||||||
|
|
||||||
// Spawn the explosion orb effect
|
// Spawn the explosion orb effect
|
||||||
const ESM::Static* areaStatic;
|
const ESM::Static* areaStatic;
|
||||||
if (!effect->mCasting.empty())
|
if (!effect->mCasting.empty())
|
||||||
|
|
Loading…
Reference in a new issue