mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-01 00:45:32 +00:00
Fix a bug with equipping using the quick keys: when item is already equipped, equipping it again would cause the slot to get unequipped first, possibly restacking and destroying the Ptr that was supposed to be equipped in the first place
This commit is contained in:
parent
d32fcb99b5
commit
b8c358df63
1 changed files with 3 additions and 0 deletions
|
@ -60,6 +60,9 @@ namespace MWWorld
|
|||
for (std::vector<int>::const_iterator slot=slots_.first.begin();
|
||||
slot!=slots_.first.end(); ++slot)
|
||||
{
|
||||
// if the item is equipped already, nothing to do
|
||||
if (invStore.getSlot(*slot) == it)
|
||||
return;
|
||||
|
||||
// if all slots are occupied, replace the last slot
|
||||
if (slot == --slots_.first.end())
|
||||
|
|
Loading…
Reference in a new issue