From c750c4e55fb103a99cc36ed76e247ae41a323581 Mon Sep 17 00:00:00 2001 From: Mat Date: Sun, 22 Mar 2020 12:39:32 +0200 Subject: Fix armor protection (#4506) * Fix armor protection * Check min damage * Check min damage * Commit missing changes * Convert to int * Use float * Float some more --- src/Entities/Entity.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Entities/Entity.h') diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index 563db7b9e..a6404a128 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -357,10 +357,10 @@ public: virtual bool ArmorCoversAgainst(eDamageType a_DamageType); /** Returns the hitpoints out of a_RawDamage that the currently equipped armor would cover */ - virtual int GetArmorCoverAgainst(const cEntity * a_Attacker, eDamageType a_DamageType, int a_RawDamage); + virtual float GetArmorCoverAgainst(const cEntity * a_Attacker, eDamageType a_DamageType, int a_RawDamage); /** Returns the hitpoints that the currently equipped armor's enchantments would cover */ - virtual int GetEnchantmentCoverAgainst(const cEntity * a_Attacker, eDamageType a_DamageType, int a_Damage); + virtual float GetEnchantmentCoverAgainst(const cEntity * a_Attacker, eDamageType a_DamageType, int a_Damage); /** Returns explosion knock back reduction percent from blast protection level @return knock back reduce percent */ -- cgit v1.2.3