forked from teamnwah/openmw-tes3coop
Need to change draw state if use'd item is in player's right hand.
This commit is contained in:
parent
234903d93c
commit
bf97fe7b35
1 changed files with 2 additions and 2 deletions
|
@ -300,9 +300,9 @@ namespace MWGui
|
|||
{
|
||||
MWWorld::Ptr item = *button->getUserData<MWWorld::Ptr>();
|
||||
MWBase::Environment::get().getWindowManager()->getInventoryWindow()->useItem(item);
|
||||
|
||||
MWWorld::ContainerStoreIterator rightHand = store.getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
|
||||
// draw weapon only if the item *is* a weapon
|
||||
if (item.getTypeName() == typeid(ESM::Weapon).name())
|
||||
if (rightHand != store.end() && item == *rightHand)
|
||||
{
|
||||
MWBase::Environment::get().getWorld()->getPlayer().setDrawState(MWMechanics::DrawState_Weapon);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue