Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Commit

Permalink
Stop hardcoding Warrior's Spirit health penalty
Browse files Browse the repository at this point in the history
  • Loading branch information
winstliu committed Oct 14, 2015
1 parent 80277b3 commit 0afc39d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion addons/sourcemod/scripting/tf2x10.sp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 0afc39d

Please sign in to comment.