Browse Source

Drop held item when closing inventory

Previously the item was just destroyed instead
pull/420/head
Gleb Mazovetskiy 7 years ago committed by Anders Jenbo
parent
commit
b949b77d53
  1. 3
      SourceX/miniwin/misc_msg.cpp

3
SourceX/miniwin/misc_msg.cpp

@ -438,6 +438,9 @@ WINBOOL PeekMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilter
HideCursorIfNotNeeded();
break;
case GameActionType::TOGGLE_INVENTORY:
if (pcurs >= CURSOR_FIRSTITEM && invflag)
// Drop item so that it does not get destroyed.
DropItemBeforeTrig();
sbookflag = false;
invflag = !invflag;
if (invflag)

Loading…
Cancel
Save