Browse Source

Clear held item when putting in an empty belt slot (#4490)

pull/4490/merge
Andrew James 4 years ago committed by GitHub
parent
commit
72cfdc31ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      Source/inv.cpp

3
Source/inv.cpp

@ -560,7 +560,8 @@ void CheckInvPaste(Player &player, Point cursorPosition)
case ILOC_BELT: {
int ii = r - SLOTXY_BELT_FIRST;
if (player.SpdList[ii].isEmpty()) {
player.SpdList[ii] = player.HoldItem;
player.SpdList[ii] = std::move(player.HoldItem);
player.HoldItem.Clear();
} else {
std::swap(player.SpdList[ii], player.HoldItem);
if (player.HoldItem._itype == ItemType::Gold)

Loading…
Cancel
Save