mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
Show the target HP bar also when casting a heal effect (same as MCP)
This commit is contained in:
parent
12691040d1
commit
557652112f
@ -68,6 +68,12 @@ namespace MWMechanics
|
|||||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find (
|
MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find (
|
||||||
effectIt->mEffectID);
|
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;
|
float magnitudeMult = 1;
|
||||||
if (magicEffect->mData.mFlags & ESM::MagicEffect::Harmful && target.getClass().isActor())
|
if (magicEffect->mData.mFlags & ESM::MagicEffect::Harmful && target.getClass().isActor())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user