forked from teamnwah/openmw-tes3coop
Use the actual damage for deducting weapon rating
This commit is contained in:
parent
bec47dfb7c
commit
9d85b7c2d3
1 changed files with 12 additions and 5 deletions
|
@ -50,20 +50,27 @@ namespace MWMechanics
|
|||
|
||||
if (weapon->mData.mType >= ESM::Weapon::MarksmanBow)
|
||||
{
|
||||
rating = (weapon->mData.mChop[0] + weapon->mData.mChop[1]) / 2.f;
|
||||
float rangedDamage = weapon->mData.mChop[0] + weapon->mData.mChop[1];
|
||||
MWMechanics::adjustWeaponDamage(rangedDamage, item, actor);
|
||||
|
||||
rating = rangedDamage / 2.f;
|
||||
|
||||
if (weapon->mData.mType >= ESM::Weapon::MarksmanThrown)
|
||||
MWMechanics::resistNormalWeapon(enemy, actor, item, rating);
|
||||
}
|
||||
else
|
||||
{
|
||||
float meleeDamage = 0.f;
|
||||
|
||||
for (int i=0; i<2; ++i)
|
||||
{
|
||||
rating += weapon->mData.mSlash[i];
|
||||
rating += weapon->mData.mThrust[i];
|
||||
rating += weapon->mData.mChop[i];
|
||||
meleeDamage += weapon->mData.mSlash[i];
|
||||
meleeDamage += weapon->mData.mThrust[i];
|
||||
meleeDamage += weapon->mData.mChop[i];
|
||||
}
|
||||
rating /= 6.f;
|
||||
|
||||
MWMechanics::adjustWeaponDamage(meleeDamage, item, actor);
|
||||
rating = meleeDamage / 6.f;
|
||||
|
||||
MWMechanics::resistNormalWeapon(enemy, actor, item, rating);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue