Skip to content

Commit

Permalink
Fixed #869
Browse files Browse the repository at this point in the history
  • Loading branch information
s1lentq committed Sep 30, 2023
1 parent 1e49d94 commit b962e0e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions regamedll/dlls/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ BOOL EXT_FUNC CBasePlayer::__API_HOOK(TakeDamage)(entvars_t *pevInflictor, entva

pAttacker = GetClassPtr<CCSEntity>((CBaseEntity *)pevAttacker);

if (pAttacker->IsPlayer())
if (pAttacker->IsPlayer() && !(pAttacker == this && (bitsDamageType & DMG_FALL)))
{
pAttack = GetClassPtr<CCSPlayer>((CBasePlayer *)pevAttacker);

Expand Down Expand Up @@ -7372,7 +7372,10 @@ void EXT_FUNC CBasePlayer::__API_HOOK(UpdateClientData)()

if (pEntity)
{
damageOrigin = pEntity->Center();
if (pEntity == this && (m_bitsDamageType & DMG_FALL))
damageOrigin = Vector(0, 0, 0); // do not show direction of damage caused by fall
else
damageOrigin = pEntity->Center();
}
}

Expand Down

0 comments on commit b962e0e

Please sign in to comment.