summaryrefslogtreecommitdiffstats
path: root/src/Entities/Minecart.cpp
diff options
context:
space:
mode:
authorAplaus228 <33102433+Aplaus228@users.noreply.github.com>2019-08-08 12:51:38 +0200
committerpeterbell10 <peterbell10@live.co.uk>2019-08-08 12:51:38 +0200
commit466d986e5e7a01679e70a7affd5beaba401ae305 (patch)
treeef6ff0950dae65b531e4539abe55e0089444b3ff /src/Entities/Minecart.cpp
parentFixed compilation on VS2019 (diff)
downloadcuberite-466d986e5e7a01679e70a7affd5beaba401ae305.tar
cuberite-466d986e5e7a01679e70a7affd5beaba401ae305.tar.gz
cuberite-466d986e5e7a01679e70a7affd5beaba401ae305.tar.bz2
cuberite-466d986e5e7a01679e70a7affd5beaba401ae305.tar.lz
cuberite-466d986e5e7a01679e70a7affd5beaba401ae305.tar.xz
cuberite-466d986e5e7a01679e70a7affd5beaba401ae305.tar.zst
cuberite-466d986e5e7a01679e70a7affd5beaba401ae305.zip
Diffstat (limited to 'src/Entities/Minecart.cpp')
-rw-r--r--src/Entities/Minecart.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Entities/Minecart.cpp b/src/Entities/Minecart.cpp
index 1c1cc484e..83fbe56de 100644
--- a/src/Entities/Minecart.cpp
+++ b/src/Entities/Minecart.cpp
@@ -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;