1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 21:42:13 +00:00

Show the target HP bar also when casting a heal effect (same as MCP)

This commit is contained in:
scrawl 2014-01-04 04:21:44 +01:00
parent 12691040d1
commit 557652112f

View File

@ -68,6 +68,12 @@ namespace MWMechanics
MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find (
effectIt->mEffectID);
// If player is healing someone, show the target's HP bar
if (caster.getRefData().getHandle() == "player" && target != caster
&& effectIt->mEffectID == ESM::MagicEffect::RestoreHealth
&& target.getClass().isActor())
MWBase::Environment::get().getWindowManager()->setEnemy(target);
float magnitudeMult = 1;
if (magicEffect->mData.mFlags & ESM::MagicEffect::Harmful && target.getClass().isActor())
{