forked from mirror/openmw-tes3mp
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)
|
||||
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<ESM::MagicEffect>().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())
|
||||
|
|
Loading…
Reference in a new issue