Skip to content

Commit

Permalink
Fix drown damage not restoring health
Browse files Browse the repository at this point in the history
  • Loading branch information
SamVanheer committed Nov 5, 2023
1 parent 19d94e4 commit 7fbcced
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dlls/player.cpp
Expand Up @@ -1109,7 +1109,7 @@ void CBasePlayer::WaterMove()

// Account for god mode, the unkillable flag, potential damage mitigation
// and gaining health from drowning to avoid counting damage not actually taken.
const float drownDamageTaken = std::min(0.f, std::floor(oldHealth - pev->health));
const float drownDamageTaken = std::max(0.f, std::floor(oldHealth - pev->health));

m_idrowndmg += drownDamageTaken;
}
Expand Down

0 comments on commit 7fbcced

Please sign in to comment.