mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:53:50 +00:00
Consider reflected/absorbed hostile spells as assaults
This commit is contained in:
parent
a81a04e6d0
commit
e78f02aaf2
1 changed files with 4 additions and 4 deletions
|
@ -411,6 +411,10 @@ namespace MWMechanics
|
||||||
float magnitudeMult = 1;
|
float magnitudeMult = 1;
|
||||||
if (magicEffect->mData.mFlags & ESM::MagicEffect::Harmful && target.getClass().isActor())
|
if (magicEffect->mData.mFlags & ESM::MagicEffect::Harmful && target.getClass().isActor())
|
||||||
{
|
{
|
||||||
|
// Notify the target actor they've been hit
|
||||||
|
if (target != caster && !caster.isEmpty())
|
||||||
|
target.getClass().onHit(target, 0.0f, true, MWWorld::Ptr(), caster, osg::Vec3f(), true);
|
||||||
|
|
||||||
if (absorbed)
|
if (absorbed)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -443,10 +447,6 @@ namespace MWMechanics
|
||||||
// If player is attempting to cast a harmful spell, show the target's HP bar
|
// If player is attempting to cast a harmful spell, show the target's HP bar
|
||||||
if (castByPlayer && target != caster)
|
if (castByPlayer && target != caster)
|
||||||
MWBase::Environment::get().getWindowManager()->setEnemy(target);
|
MWBase::Environment::get().getWindowManager()->setEnemy(target);
|
||||||
|
|
||||||
// Notify the target actor they've been hit
|
|
||||||
if (target != caster && !caster.isEmpty())
|
|
||||||
target.getClass().onHit(target, 0.0f, true, MWWorld::Ptr(), caster, osg::Vec3f(), true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (magnitudeMult > 0 && !absorbed)
|
if (magnitudeMult > 0 && !absorbed)
|
||||||
|
|
Loading…
Reference in a new issue