summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2019-09-27 17:51:44 +0200
committerpeterbell10 <peterbell10@live.co.uk>2019-09-27 17:51:44 +0200
commit180a43d09721a32ad502f5e583d3b2d797501c00 (patch)
tree3b70a9188246ce86b3846c5d9d783171efa1dec3 /src/Entities/Entity.cpp
parentFix clang8.0 build (#4399) (diff)
downloadcuberite-180a43d09721a32ad502f5e583d3b2d797501c00.tar
cuberite-180a43d09721a32ad502f5e583d3b2d797501c00.tar.gz
cuberite-180a43d09721a32ad502f5e583d3b2d797501c00.tar.bz2
cuberite-180a43d09721a32ad502f5e583d3b2d797501c00.tar.lz
cuberite-180a43d09721a32ad502f5e583d3b2d797501c00.tar.xz
cuberite-180a43d09721a32ad502f5e583d3b2d797501c00.tar.zst
cuberite-180a43d09721a32ad502f5e583d3b2d797501c00.zip
Diffstat (limited to 'src/Entities/Entity.cpp')
-rw-r--r--src/Entities/Entity.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index 55f5ba144..efeff5d66 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -288,7 +288,7 @@ void cEntity::TakeDamage(eDamageType a_DamageType, cEntity * a_Attacker, int a_R
}
ApplyArmorDamage(ArmorCover);
- cEntity::TakeDamage(a_DamageType, a_Attacker, a_RawDamage, FinalDamage, a_KnockbackAmount);
+ cEntity::TakeDamage(a_DamageType, a_Attacker, a_RawDamage, static_cast<float>(FinalDamage), a_KnockbackAmount);
}
@@ -518,7 +518,7 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI)
if (Random.RandBool(Chance / 100.0))
{
- a_TDI.Attacker->TakeDamage(dtAttack, this, 0, Random.RandInt(1, 4), 0);
+ a_TDI.Attacker->TakeDamage(dtAttack, this, 0, Random.RandReal(1.0f, 4.0f), 0);
}
}