mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-22 18:09:41 +00:00
Added 1.5 bonus for ranged weapons when weapons are rated
This commit is contained in:
parent
3dce406829
commit
256439f884
1 changed files with 5 additions and 1 deletions
|
@ -109,6 +109,10 @@ namespace MWMechanics
|
||||||
return 0.f;
|
return 0.f;
|
||||||
|
|
||||||
float rating=0.f;
|
float rating=0.f;
|
||||||
|
float bonus=0.f;
|
||||||
|
|
||||||
|
if (weapon->mData.mType >= ESM::Weapon::MarksmanBow && weapon->mData.mType <= ESM::Weapon::MarksmanThrown)
|
||||||
|
bonus+=1.5f;
|
||||||
|
|
||||||
if (weapon->mData.mType >= ESM::Weapon::MarksmanBow)
|
if (weapon->mData.mType >= ESM::Weapon::MarksmanBow)
|
||||||
{
|
{
|
||||||
|
@ -160,7 +164,7 @@ namespace MWMechanics
|
||||||
if (skill != -1)
|
if (skill != -1)
|
||||||
rating *= actor.getClass().getSkill(actor, skill) / 100.f;
|
rating *= actor.getClass().getSkill(actor, skill) / 100.f;
|
||||||
|
|
||||||
return rating;
|
return rating + bonus;
|
||||||
}
|
}
|
||||||
|
|
||||||
float rateSpell(const ESM::Spell *spell, const MWWorld::Ptr &actor, const MWWorld::Ptr& enemy)
|
float rateSpell(const ESM::Spell *spell, const MWWorld::Ptr &actor, const MWWorld::Ptr& enemy)
|
||||||
|
|
Loading…
Reference in a new issue