|
|
|
@ -289,13 +289,8 @@ namespace MWMechanics
|
|
|
|
|
MWWorld::Ptr ptr = getPlayer();
|
|
|
|
|
MWBase::WindowManager *winMgr = MWBase::Environment::get().getWindowManager();
|
|
|
|
|
|
|
|
|
|
// Update the equipped weapon icon
|
|
|
|
|
MWWorld::InventoryStore& inv = ptr.getClass().getInventoryStore(ptr);
|
|
|
|
|
MWWorld::ContainerStoreIterator weapon = inv.getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
|
|
|
|
|
if (weapon == inv.end())
|
|
|
|
|
winMgr->unsetSelectedWeapon();
|
|
|
|
|
else
|
|
|
|
|
winMgr->setSelectedWeapon(*weapon);
|
|
|
|
|
|
|
|
|
|
// Update the selected spell icon
|
|
|
|
|
MWWorld::ContainerStoreIterator enchantItem = inv.getSelectedEnchantItem();
|
|
|
|
@ -310,6 +305,12 @@ namespace MWMechanics
|
|
|
|
|
winMgr->unsetSelectedSpell();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Update the equipped weapon icon
|
|
|
|
|
if (weapon == inv.end())
|
|
|
|
|
winMgr->unsetSelectedWeapon();
|
|
|
|
|
else
|
|
|
|
|
winMgr->setSelectedWeapon(*weapon);
|
|
|
|
|
|
|
|
|
|
if (mUpdatePlayer)
|
|
|
|
|
{
|
|
|
|
|
mUpdatePlayer = false;
|
|
|
|
|