Fixed crash with healrate

This commit is contained in:
smallmodel 2023-08-16 19:14:05 +02:00
parent 467802c466
commit 7e113359b3
No known key found for this signature in database
GPG key ID: A96F163ED4891440

View file

@ -7073,7 +7073,7 @@ void Player::UpdateStats(void)
// Healing // Healing
// //
if (m_fHealRate && (!m_pVehicle || m_pTurret || m_pVehicle->isSubclassOf(FixedTurret))) { 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 { } else {
healfrac = 0; healfrac = 0;
} }