summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Entities/Entity.cpp')
-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);