From 1636fd66dba12330c122f60b1ab5432b5d65f88d Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 20 Jul 2014 22:26:26 +0200 Subject: [PATCH] Don't add creature base damage to weapon damage (UESP was wrong) --- apps/openmw/mwclass/creature.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/openmw/mwclass/creature.cpp b/apps/openmw/mwclass/creature.cpp index c93fcc2981..ffd9eda26a 100644 --- a/apps/openmw/mwclass/creature.cpp +++ b/apps/openmw/mwclass/creature.cpp @@ -308,13 +308,13 @@ namespace MWClass attack = weapon.get()->mBase->mData.mThrust; if(attack) { - float weaponDamage = attack[0] + ((attack[1]-attack[0])*stats.getAttackStrength()); - weaponDamage *= 0.5f + (stats.getAttribute(ESM::Attribute::Luck).getModified() / 100.0f); + damage = attack[0] + ((attack[1]-attack[0])*stats.getAttackStrength()); + damage *= 0.5f + (stats.getAttribute(ESM::Attribute::Luck).getModified() / 100.0f); if(weaphashealth) { int weapmaxhealth = weapon.getClass().getItemMaxHealth(weapon); int weaphealth = weapon.getClass().getItemHealth(weapon); - weaponDamage *= float(weaphealth) / weapmaxhealth; + damage *= float(weaphealth) / weapmaxhealth; if (!MWBase::Environment::get().getWorld()->getGodModeState()) { @@ -329,8 +329,6 @@ namespace MWClass if (weapon.getCellRef().getCharge() == 0) weapon = *getInventoryStore(ptr).unequipItem(weapon, ptr); } - - damage += weaponDamage; } // Apply "On hit" enchanted weapons