]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use it in mage code too
authorMario <mario@smbclan.net>
Sat, 16 Jun 2018 18:07:05 +0000 (04:07 +1000)
committerMario <mario@smbclan.net>
Sat, 16 Jun 2018 18:07:05 +0000 (04:07 +1000)
qcsrc/common/monsters/monster/mage.qc

index cbc6c5f062044e1c637e00336b55ecf48e539e8d..b26328a54593fc325c9b940a6eb21c5fb4062c28 100644 (file)
@@ -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;
                        }