1
0

Change TakeDamageInfo::FinalDamage from int to float (#4359)

Closes #4357
This commit is contained in:
Aplaus228
2019-08-08 13:51:38 +03:00
committed by peterbell10
parent f0cd34357e
commit 466d986e5e
3 changed files with 9 additions and 9 deletions

View File

@@ -1039,12 +1039,12 @@ bool cMinecart::DoTakeDamage(TakeDamageInfo & TDI)
if ((TDI.Attacker != nullptr) && TDI.Attacker->IsPlayer() && static_cast<cPlayer *>(TDI.Attacker)->IsGameModeCreative())
{
Destroy();
TDI.FinalDamage = static_cast<int>(GetMaxHealth()); // Instant hit for creative
TDI.FinalDamage = GetMaxHealth(); // Instant hit for creative
SetInvulnerableTicks(0);
return super::DoTakeDamage(TDI); // No drops for creative
}
m_LastDamage = TDI.FinalDamage;
m_LastDamage = static_cast<int>(TDI.FinalDamage);
if (!super::DoTakeDamage(TDI))
{
return false;