diff --git a/regamedll/dlls/player.cpp b/regamedll/dlls/player.cpp index 2ddd36dd..22ae674e 100644 --- a/regamedll/dlls/player.cpp +++ b/regamedll/dlls/player.cpp @@ -916,7 +916,7 @@ LINK_HOOK_CLASS_CHAIN(int, CBasePlayer, TakeDamage, (entvars_t *pevInflictor, en // NOTE: each call to TakeDamage with bitsDamageType set to a time-based damage // type will cause the damage time countdown to be reset. Thus the ongoing effects of poison, radiation // etc are implemented with subsequent calls to TakeDamage using DMG_GENERIC. -int CBasePlayer::__API_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) +int CBasePlayer::__API_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pevAttacker, FloatRef flDamage, int bitsDamageType) { int fTookDamage; float flRatio = ARMOR_RATIO; diff --git a/regamedll/dlls/player.h b/regamedll/dlls/player.h index fa3ff887..f0f581f2 100644 --- a/regamedll/dlls/player.h +++ b/regamedll/dlls/player.h @@ -379,7 +379,7 @@ public: int Save_(CSave &save); int Restore_(CRestore &restore); void TraceAttack_(entvars_t *pevAttacker, float flDamage, VectorRef vecDir, TraceResult *ptr, int bitsDamageType); - int TakeDamage_(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType); + int TakeDamage_(entvars_t *pevInflictor, entvars_t *pevAttacker, FloatRef flDamage, int bitsDamageType); int TakeHealth_(float flHealth, int bitsDamageType); void Killed_(entvars_t *pevAttacker, int iGib); void AddPoints_(int score, BOOL bAllowNegativeScore); diff --git a/regamedll/hookers/hooker_impl.h b/regamedll/hookers/hooker_impl.h index bbc364c3..b95ef89a 100644 --- a/regamedll/hookers/hooker_impl.h +++ b/regamedll/hookers/hooker_impl.h @@ -64,6 +64,7 @@ class CRestore; class CSaveRestoreBuffer; typedef Vector VectorRef; +typedef float FloatRef; #define __API_HOOK(fname)\ fname diff --git a/regamedll/public/regamedll/regamedll_api.h b/regamedll/public/regamedll/regamedll_api.h index 716c5f12..8b0e5a97 100644 --- a/regamedll/public/regamedll/regamedll_api.h +++ b/regamedll/public/regamedll/regamedll_api.h @@ -55,8 +55,8 @@ typedef IVoidHookChain IReGameHookRegistry_CBasePlayer_TraceAttack; // CBasePlayer::TakeDamage hook -typedef IHookChain IReGameHook_CBasePlayer_TakeDamage; -typedef IHookChainRegistryClass IReGameHookRegistry_CBasePlayer_TakeDamage; +typedef IHookChain IReGameHook_CBasePlayer_TakeDamage; +typedef IHookChainRegistryClass IReGameHookRegistry_CBasePlayer_TakeDamage; // CBasePlayer::TakeHealth hook typedef IHookChain IReGameHook_CBasePlayer_TakeHealth; diff --git a/regamedll/regamedll/dlls.h b/regamedll/regamedll/dlls.h index 338c4d5e..de378901 100644 --- a/regamedll/regamedll/dlls.h +++ b/regamedll/regamedll/dlls.h @@ -34,6 +34,7 @@ #include "hooker_impl.h" #else typedef Vector& VectorRef; +typedef float& FloatRef; #endif // HOOK_GAMEDLL #include "h_export.h" diff --git a/regamedll/regamedll/regamedll_api_impl.h b/regamedll/regamedll/regamedll_api_impl.h index 7279c491..a78940fd 100644 --- a/regamedll/regamedll/regamedll_api_impl.h +++ b/regamedll/regamedll/regamedll_api_impl.h @@ -52,8 +52,8 @@ typedef IVoidHookChainClassImpl CReGameHookRegistry_CBasePlayer_TraceAttack; // CBasePlayer::TakeDamage hook -typedef IHookChainClassImpl CRegameHook_CBasePlayer_TakeDamage; -typedef IHookChainRegistryClassImpl CReGameHookRegistry_CBasePlayer_TakeDamage; +typedef IHookChainClassImpl CRegameHook_CBasePlayer_TakeDamage; +typedef IHookChainRegistryClassImpl CReGameHookRegistry_CBasePlayer_TakeDamage; // CBasePlayer::TakeHealth hook typedef IHookChainClassImpl CRegameHook_CBasePlayer_TakeHealth;