From: Mario Date: Sat, 16 Jun 2018 18:07:05 +0000 (+1000) Subject: Use it in mage code too X-Git-Tag: xonotic-v0.8.5~2031 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ae38ad9f1d5b48760cfe7461bbfdce1443aa5e4b;p=xonotic%2Fxonotic-data.pk3dir.git Use it in mage code too --- diff --git a/qcsrc/common/monsters/monster/mage.qc b/qcsrc/common/monsters/monster/mage.qc index cbc6c5f06..b26328a54 100644 --- a/qcsrc/common/monsters/monster/mage.qc +++ b/qcsrc/common/monsters/monster/mage.qc @@ -257,7 +257,7 @@ void M_Mage_Defend_Heal(entity this) break; case 3: float hp = ((it == this) ? autocvar_g_monster_mage_heal_self : autocvar_g_monster_mage_heal_allies); - SetResourceAmount(it, RESOURCE_HEALTH, GetResourceAmount(it, RESOURCE_HEALTH) - hp); // TODO: use regular damage functions? needs a way to bypass friendly fire checks + TakeResource(it, RESOURCE_HEALTH, hp); // TODO: use regular damage functions? needs a way to bypass friendly fire checks fx = EFFECT_RAGE; break; }