Add OnTakeDamage_Alive hook support to SDKHooks (bug=6249).

This commit is contained in:
Nicholas Hastings
2014-09-03 17:45:34 -04:00
parent 40b1067ef7
commit be55587d70
3 changed files with 407 additions and 362 deletions
+7
View File
@@ -119,6 +119,8 @@ enum SDKHookType
SDKHook_GetMaxHealth, /**< ep2v and later */
SDKHook_Blocked,
SDKHook_BlockedPost,
SDKHook_OnTakeDamageAlive,
SDKHook_OnTakeDamageAlivePost,
};
/*
@@ -139,6 +141,9 @@ enum SDKHookType
SDKHook_OnTakeDamage,
SDKHook_OnTakeDamagePost,
SDKHook_OnTakeDamageAlive,
SDKHook_OnTakeDamageAlivePost,
SDKHook_PreThink,
SDKHook_PreThinkPost,
@@ -244,6 +249,7 @@ union SDKHookCB
function Action (int entity, int &maxhealth);
// OnTakeDamage
// OnTakeDamagAlive
// Note: The weapon parameter is not used by all games and damage sources.
// Note: Force application is dependent on game and damage type(s)
// SDKHooks 1.0+
@@ -256,6 +262,7 @@ union SDKHookCB
float[3] damageForce, float[3] damagePosition, int damagecustom);
// OnTakeDamagePost
// OnTakeDamageAlivePost
function void (int victim, int attacker, int inflictor, float damage, int damagetype);
function void (int victim, int attacker, int inflictor, float damage, int damagetype, const float[3] damageForce, const float[3] damagePosition);