From 0afc39db6c0a43c0c2126cac707f560c41fa2e8f Mon Sep 17 00:00:00 2001 From: Wliu Date: Wed, 14 Oct 2015 19:26:19 -0400 Subject: [PATCH] Stop hardcoding Warrior's Spirit health penalty --- addons/sourcemod/scripting/tf2x10.sp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/sourcemod/scripting/tf2x10.sp b/addons/sourcemod/scripting/tf2x10.sp index 2d97584..e700f85 100644 --- a/addons/sourcemod/scripting/tf2x10.sp +++ b/addons/sourcemod/scripting/tf2x10.sp @@ -879,7 +879,9 @@ public Action:Timer_DalokohX10(Handle:timer, any:userid) new newHealth, maxHealth; if(index == 310) //Warrior's Spirit { - maxHealth = DALOKOH_MAXHEALTH - 200; //Warrior's Spirit subtracts 200 health + new Address:attribute = TF2Attrib_GetByName(index, "max health additive penalty"); + new healthPenalty = RoundFloat(FloatAbs(TF2Attrib_GetValue(attribute))); //Absolute value this since it's negative and then make it an int + maxHealth = DALOKOH_MAXHEALTH - healthPenalty; //Warrior's Spirit has a health penalty } else {