From 4900645b2838b8a953fba298c5001b4e2d242931 Mon Sep 17 00:00:00 2001 From: Jaume Aloy Date: Sat, 30 Aug 2014 00:27:33 +0200 Subject: Added a_Digger check --- src/Entities/Entity.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Entities/Entity.cpp') 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; -- cgit v1.2.3