1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-21 09:09:43 +00:00

Apply jvoisin's suggestions

This commit is contained in:
jvoisin 2023-06-08 16:34:45 +00:00 committed by Evil Eye
parent 3a888ef543
commit 583a0b4d04
2 changed files with 5 additions and 5 deletions

View file

@ -43,7 +43,7 @@ namespace MWClass
return;
MWBase::SoundManager* sndMgr = MWBase::Environment::get().getSoundManager();
ESM::RefId skill = shield->getClass().getEquipmentSkill(*shield);
const ESM::RefId skill = shield->getClass().getEquipmentSkill(*shield);
if (skill == ESM::Skill::LightArmor)
sndMgr->playSound3D(ptr, ESM::RefId::stringRefId("Light Armor Hit"), 1.0f, 1.0f);
else if (skill == ESM::Skill::MediumArmor)

View file

@ -178,7 +178,7 @@ namespace MWClass
const ESM::RefId& Armor::getUpSoundId(const MWWorld::ConstPtr& ptr) const
{
ESM::RefId es = getEquipmentSkill(ptr);
const ESM::RefId es = getEquipmentSkill(ptr);
static const ESM::RefId lightUp = ESM::RefId::stringRefId("Item Armor Light Up");
static const ESM::RefId mediumUp = ESM::RefId::stringRefId("Item Armor Medium Up");
static const ESM::RefId heavyUp = ESM::RefId::stringRefId("Item Armor Heavy Up");
@ -193,7 +193,7 @@ namespace MWClass
const ESM::RefId& Armor::getDownSoundId(const MWWorld::ConstPtr& ptr) const
{
ESM::RefId es = getEquipmentSkill(ptr);
const ESM::RefId es = getEquipmentSkill(ptr);
static const ESM::RefId lightDown = ESM::RefId::stringRefId("Item Armor Light Down");
static const ESM::RefId mediumDown = ESM::RefId::stringRefId("Item Armor Medium Down");
static const ESM::RefId heavyDown = ESM::RefId::stringRefId("Item Armor Heavy Down");
@ -232,7 +232,7 @@ namespace MWClass
}
else
{
ESM::RefId armorType = getEquipmentSkill(ptr);
const ESM::RefId armorType = getEquipmentSkill(ptr);
if (armorType == ESM::Skill::LightArmor)
typeText = "#{sLight}";
else if (armorType == ESM::Skill::MediumArmor)
@ -297,7 +297,7 @@ namespace MWClass
{
const MWWorld::LiveCellRef<ESM::Armor>* ref = ptr.get<ESM::Armor>();
ESM::RefId armorSkillType = getEquipmentSkill(ptr);
const ESM::RefId armorSkillType = getEquipmentSkill(ptr);
float armorSkill = actor.getClass().getSkill(actor, armorSkillType);
int iBaseArmorSkill = MWBase::Environment::get()