Skip to content

Commit

Permalink
Fixed no fall damage when ff_damage_reduction_other set 0 (also damag…
Browse files Browse the repository at this point in the history
…e with ITBD_POISON)
  • Loading branch information
s1lentq committed Sep 29, 2023
1 parent 71c4e21 commit 1e49d94
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions regamedll/dlls/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1e49d94

Please sign in to comment.