diff options
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/verbs.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp index ea9d361e81..9f31bd33f9 100644 --- a/scumm/verbs.cpp +++ b/scumm/verbs.cpp @@ -150,12 +150,18 @@ void Scumm::checkV2MouseOver(ScummVM::Point pos) { void Scumm::checkV2Inventory(int x, int y) { int object = 0; + static int egoVar; y -= virtscr[2].topline; if ((y < 34) || !(_mouseButStat & MBS_LEFT_CLICK)) return; + if (_scummVars[VAR_EGO] != egoVar) { + egoVar = _scummVars[VAR_EGO]; + _inventoryOffset = 0; + } + if (v2_mouseover_boxes[kInventoryUpArrow].rect.contains(x, y)) { _inventoryOffset -= 2; if (_inventoryOffset < 0) |