From 0ce5e9774e4187e448a3f5d103bee024a0877ddb Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Thu, 20 May 2010 14:34:53 +0200 Subject: [PATCH] execute merge commands after inventory is closed --- engines/parallaction/input.cpp | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/engines/parallaction/input.cpp b/engines/parallaction/input.cpp index 1b0e5c5..62eb192 100644 --- a/engines/parallaction/input.cpp +++ b/engines/parallaction/input.cpp @@ -381,16 +381,16 @@ void Input::exitInventoryMode() { int pos = _vm->getHoverInventoryItem(mousePos.x, mousePos.y); _vm->highlightInventoryItem(-1); // disable + ZonePtr z; if ((_engineFlags & kEngineDragging)) { _engineFlags &= ~kEngineDragging; - ZonePtr z = _vm->hitZone(kZoneMerge, _activeItem._index, _vm->getInventoryItemIndex(pos)); + z = _vm->hitZone(kZoneMerge, _activeItem._index, _vm->getInventoryItemIndex(pos)); if (z) { _vm->dropItem(z->u._mergeObj1); _vm->dropItem(z->u._mergeObj2); _vm->addInventoryItem(z->u._mergeObj3); - _vm->_cmdExec->run(z->_commands); } } @@ -408,6 +408,10 @@ void Input::exitInventoryMode() { _vm->resumeJobs(); _inputMode = kInputModeGame; + + if (z) { + _vm->_cmdExec->run(z->_commands); + } } bool Input::updateInventoryInput() { -- 1.6.3.3