From 7e113359b3665fd8cae223a8afb832968d870eb7 Mon Sep 17 00:00:00 2001 From: smallmodel <15067410+smallmodel@users.noreply.github.com> Date: Wed, 16 Aug 2023 19:14:05 +0200 Subject: [PATCH] Fixed crash with healrate --- code/fgame/player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/fgame/player.cpp b/code/fgame/player.cpp index 315cafb3..6c7d53fb 100644 --- a/code/fgame/player.cpp +++ b/code/fgame/player.cpp @@ -7073,7 +7073,7 @@ void Player::UpdateStats(void) // Healing // if (m_fHealRate && (!m_pVehicle || m_pTurret || m_pVehicle->isSubclassOf(FixedTurret))) { - healfrac = (m_pVehicle->health + m_fHealRate) / m_pVehicle->max_health * 100.f; + healfrac = (health + m_fHealRate) / max_health * 100.f; } else { healfrac = 0; }