From f6c1e78ae27a393faa15feac184b07d241fd3b60 Mon Sep 17 00:00:00 2001 From: KJeff01 Date: Thu, 31 Aug 2023 13:07:41 -0500 Subject: [PATCH] Fix damage formula against structures and features Since level defaulted to 1 it meant structures/features here would set actualDamage to 94% as the base damage value. --- src/combat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/combat.cpp b/src/combat.cpp index 193cd0e0eb3..b39fc544589 100644 --- a/src/combat.cpp +++ b/src/combat.cpp @@ -402,7 +402,7 @@ int objArmour(const BASE_OBJECT *psObj, WEAPON_CLASS weaponClass) */ int32_t objDamage(BASE_OBJECT *psObj, unsigned damage, unsigned originalhp, WEAPON_CLASS weaponClass, WEAPON_SUBCLASS weaponSubClass, bool isDamagePerSecond, int minDamage, bool empRadiusHit) { - int level = 1; + int level = 0; int armour = objArmour(psObj, weaponClass); const int lastHit = psObj->timeLastHit; @@ -499,7 +499,7 @@ int32_t objDamage(BASE_OBJECT *psObj, unsigned damage, unsigned originalhp, WEAP unsigned int objGuessFutureDamage(WEAPON_STATS *psStats, unsigned int player, BASE_OBJECT *psTarget) { unsigned int damage; - int actualDamage, armour, level = 1; + int actualDamage, armour, level = 0; if (psTarget == nullptr) {