summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.cpp
diff options
context:
space:
mode:
authorJaume Aloy <hircine45@gmail.com>2014-08-30 00:27:33 +0200
committerJaume Aloy <hircine45@gmail.com>2014-08-30 00:27:33 +0200
commit4900645b2838b8a953fba298c5001b4e2d242931 (patch)
tree207c7975baee75fa1dfae196c72b74f7a288955f /src/Entities/Entity.cpp
parentMore Enchantments (diff)
downloadcuberite-4900645b2838b8a953fba298c5001b4e2d242931.tar
cuberite-4900645b2838b8a953fba298c5001b4e2d242931.tar.gz
cuberite-4900645b2838b8a953fba298c5001b4e2d242931.tar.bz2
cuberite-4900645b2838b8a953fba298c5001b4e2d242931.tar.lz
cuberite-4900645b2838b8a953fba298c5001b4e2d242931.tar.xz
cuberite-4900645b2838b8a953fba298c5001b4e2d242931.tar.zst
cuberite-4900645b2838b8a953fba298c5001b4e2d242931.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 760401cc2..10a0f8920 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -400,9 +400,9 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI)
for (size_t i = 0; i < ARRAYCOUNT(ArmorItems); i++)
{
cItem Item = ArmorItems[i];
- if (Item.m_Enchantments.GetLevel(cEnchantments::enchThorns) > ThornsLevel) ThornsLevel = Item.m_Enchantments.GetLevel(cEnchantments::enchThorns);
+ ThornsLevel = std::max(ThornsLevel, Item.m_Enchantments.GetLevel(cEnchantments::enchThorns));
}
-
+
if (ThornsLevel > 0)
{
int Chance = ThornsLevel * 15;