summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-05-18 22:49:27 +0200
committermadmaxoft <github@xoft.cz>2014-05-18 22:49:27 +0200
commita651c865e40ad80b52ddf69004b40a580e7069ea (patch)
treeac379cd96e56c7a3478f4b90b4b7c0dd01cca89c /src/Entities/Entity.cpp
parentFixed datatype truncation in Diff() template. (diff)
downloadcuberite-a651c865e40ad80b52ddf69004b40a580e7069ea.tar
cuberite-a651c865e40ad80b52ddf69004b40a580e7069ea.tar.gz
cuberite-a651c865e40ad80b52ddf69004b40a580e7069ea.tar.bz2
cuberite-a651c865e40ad80b52ddf69004b40a580e7069ea.tar.lz
cuberite-a651c865e40ad80b52ddf69004b40a580e7069ea.tar.xz
cuberite-a651c865e40ad80b52ddf69004b40a580e7069ea.tar.zst
cuberite-a651c865e40ad80b52ddf69004b40a580e7069ea.zip
Diffstat (limited to 'src/Entities/Entity.cpp')
-rw-r--r--src/Entities/Entity.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index c393f89fd..31ad66779 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -321,7 +321,7 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI)
m_World->BroadcastEntityAnimation(*this, 4); // Critical hit
}
- Player->GetStatManager().AddValue(statDamageDealt, round(a_TDI.FinalDamage * 10));
+ Player->GetStatManager().AddValue(statDamageDealt, (StatValue)floor(a_TDI.FinalDamage * 10 + 0.5));
}
m_Health -= (short)a_TDI.FinalDamage;