Quote:
Originally Posted by Zethax
also if I could get some criticism on the code itself that'd be GREAT
|
Since you asked, I'd highly recommend using my fork of
TF2Attributes. It's able to use the game's own functions for calculating attribute values in aggregate, so you don't have to iterate over client / weapons for the same effect nor retrieve the values manually.
e.g. with
kill_with_any_weapon_heals, you could drop the loop and simplify the code down to
Code:
int iHealAmount = TF2Attrib_HookValueInt(0, "health_on_kill_any_weapon", iAttacker);
HealPlayer(iAttacker, iHealAmount, 1.5);
__________________