|
|
|
@ -37,23 +37,6 @@ namespace MWClass
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Actor::block(const MWWorld::Ptr& ptr) const
|
|
|
|
|
{
|
|
|
|
|
const MWWorld::InventoryStore& inv = getInventoryStore(ptr);
|
|
|
|
|
MWWorld::ConstContainerStoreIterator shield = inv.getSlot(MWWorld::InventoryStore::Slot_CarriedLeft);
|
|
|
|
|
if (shield == inv.end())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
MWBase::SoundManager* sndMgr = MWBase::Environment::get().getSoundManager();
|
|
|
|
|
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)
|
|
|
|
|
sndMgr->playSound3D(ptr, ESM::RefId::stringRefId("Medium Armor Hit"), 1.0f, 1.0f);
|
|
|
|
|
else if (skill == ESM::Skill::HeavyArmor)
|
|
|
|
|
sndMgr->playSound3D(ptr, ESM::RefId::stringRefId("Heavy Armor Hit"), 1.0f, 1.0f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
osg::Vec3f Actor::getRotationVector(const MWWorld::Ptr& ptr) const
|
|
|
|
|
{
|
|
|
|
|
MWMechanics::Movement& movement = getMovementSettings(ptr);
|
|
|
|
|