From 1e49d947927e7f6f2fd70d8398e4a9519a34450a Mon Sep 17 00:00:00 2001 From: s1lentq Date: Sat, 30 Sep 2023 00:18:37 +0700 Subject: [PATCH] Fixed no fall damage when ff_damage_reduction_other set 0 (also damage with ITBD_POISON) --- regamedll/dlls/player.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/regamedll/dlls/player.cpp b/regamedll/dlls/player.cpp index a0b0d744..be3fd3d1 100644 --- a/regamedll/dlls/player.cpp +++ b/regamedll/dlls/player.cpp @@ -1086,16 +1086,18 @@ BOOL EXT_FUNC CBasePlayer::__API_HOOK(TakeDamage)(entvars_t *pevInflictor, entva pAttack->m_flLastAttackedTeammate = gpGlobals->time; } - } #ifdef REGAMEDLL_ADD - // bullets hurt teammates less - flDamage *= clamp(((bitsDamageType & DMG_BULLET) ? - ff_damage_reduction_bullets.value : - ff_damage_reduction_other.value), 0.0f, 1.0f); -#else - flDamage *= 0.35; + // bullets hurt teammates less + flDamage *= clamp(((bitsDamageType & DMG_BULLET) ? + ff_damage_reduction_bullets.value : + ff_damage_reduction_other.value), 0.0f, 1.0f); #endif // #ifdef REGAMEDLL_ADD + } + +#ifndef REGAMEDLL_ADD + flDamage *= 0.35; +#endif } if (pAttack->m_pActiveItem)