This repository has been archived by the owner on Apr 23, 2024. It is now read-only.
Better accessors, pt. 1
Couple of new convenience functions to use. Huzzah.
Added
- Natives
TF2Attrib_HookValueFloat
andTF2Attrib_HookValueInt
, which transforms an input value based on attributes matching the specified attribute class on a given entity (player or weapon).- If you're familiar with the third-party TF2 projects, this implements the
CALL_ATTRIB_HOOK_FLOAT
andCALL_ATTRIB_HOOK_INT
macros, orCAttributeManager::AttribHookValue<>
functions. - If you're not familiar with it, this means you don't have to collect all the attributes from runtime or item server that share the same functionality (e.g., "damage penalty", "damage bonus", "CARD: damage bonus", etc.) and determine how they stack — the game handles all of that for you.
- If you're familiar with the third-party TF2 projects, this implements the
Changed
- Error messages have been reworded to match SourceMod's style.
- Native functions now use
const char[]
instead of unconstedchar[]
. This allows the use of passed-inconst char[]
arguments from functions up the call chain.