mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 16:19:41 +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
1 changed files with 6 additions and 0 deletions
|
@ -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…
Reference in a new issue