summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.cpp
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2019-08-11 11:39:43 +0200
committerpeterbell10 <peterbell10@live.co.uk>2019-08-11 11:39:43 +0200
commite0ca4d83991d80865781c1dbbbfa1f92259a366a (patch)
tree7a1ee18692772befe2c60bd304474fae99d51e1b /src/Entities/Entity.cpp
parentWake up redstone simulator on slot changes for blockentities (#4348) (diff)
downloadcuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.tar
cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.tar.gz
cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.tar.bz2
cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.tar.lz
cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.tar.xz
cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.tar.zst
cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Entity.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index 7546cc402..55f5ba144 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -414,7 +414,7 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI)
{
if ((a_TDI.DamageType == dtAttack) || (a_TDI.DamageType == dtArrowAttack))
{
- a_TDI.FinalDamage *= 1.5; // 150% damage
+ a_TDI.FinalDamage *= 1.5f; // 150% damage
m_World->BroadcastEntityAnimation(*this, 4); // Critical hit
}
}
@@ -427,7 +427,7 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI)
if (SharpnessLevel > 0)
{
- a_TDI.FinalDamage += 1.25 * SharpnessLevel;
+ a_TDI.FinalDamage += 1.25f * SharpnessLevel;
}
else if (SmiteLevel > 0)
{
@@ -441,7 +441,7 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI)
case mtWither:
case mtZombiePigman:
{
- a_TDI.FinalDamage += 2.5 * SmiteLevel;
+ a_TDI.FinalDamage += 2.5f * SmiteLevel;
break;
}
default: break;
@@ -459,7 +459,7 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI)
case mtCaveSpider:
case mtSilverfish:
{
- a_TDI.FinalDamage += 2.5 * BaneOfArthropodsLevel;
+ a_TDI.FinalDamage += 2.5f * BaneOfArthropodsLevel;
// The duration of the effect is a random value between 1 and 1.5 seconds at level I,
// increasing the max duration by 0.5 seconds each level
// Ref: https://minecraft.gamepedia.com/Enchanting#Bane_of_Arthropods
@@ -868,7 +868,7 @@ void cEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
}
// Position changed -> super::Tick() called:
- GET_AND_VERIFY_CURRENT_CHUNK(NextChunk, POSX_TOINT, POSZ_TOINT)
+ GET_AND_VERIFY_CURRENT_CHUNK(NextChunk, POSX_TOINT, POSZ_TOINT);
// Set swim states (water, lava, and fire):
SetSwimState(*NextChunk);
@@ -920,7 +920,7 @@ void cEntity::HandlePhysics(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
int BlockZ = POSZ_TOINT;
// Position changed -> super::HandlePhysics() called
- GET_AND_VERIFY_CURRENT_CHUNK(NextChunk, BlockX, BlockZ)
+ GET_AND_VERIFY_CURRENT_CHUNK(NextChunk, BlockX, BlockZ);
// TODO Add collision detection with entities.
auto DtSec = std::chrono::duration_cast<std::chrono::duration<double>>(a_Dt);