aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-05-01 10:24:53 -1000
committerPaul Gilbert2015-05-01 10:24:53 -1000
commit3f5c159068fdee253883e300cae524282db5b167 (patch)
treec67690d3187e15977d4c8b4b587336afd69930dc
parentb8372695ebc3b266f9fbe074dbbdd8e3015ce547 (diff)
downloadscummvm-rg350-3f5c159068fdee253883e300cae524282db5b167.tar.gz
scummvm-rg350-3f5c159068fdee253883e300cae524282db5b167.tar.bz2
scummvm-rg350-3f5c159068fdee253883e300cae524282db5b167.zip
SHERLOCK: Fix opening pocketwatch
-rw-r--r--engines/sherlock/scene.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp
index 55cdde2f56..cd913f8515 100644
--- a/engines/sherlock/scene.cpp
+++ b/engines/sherlock/scene.cpp
@@ -527,7 +527,7 @@ void Scene::checkSceneFlags(bool flag) {
}
}
- // Check inventory
+ // Check inventory for items to remove based on flag changes
for (int idx = 0; idx < _vm->_inventory->_holdings; ++idx) {
InventoryItem &ii = (*_vm->_inventory)[idx];
if (ii._requiredFlag && !_vm->readFlags(ii._requiredFlag)) {
@@ -536,10 +536,10 @@ void Scene::checkSceneFlags(bool flag) {
_vm->_inventory->insert_at(_vm->_inventory->_holdings, tempItem);
_vm->_inventory->remove_at(idx);
_vm->_inventory->_holdings--;
- break;
}
}
+ // Check inactive inventory items for ones to reactivate based on flag changes
for (uint idx = _vm->_inventory->_holdings; idx < _vm->_inventory->size(); ++idx) {
InventoryItem &ii = (*_vm->_inventory)[idx];
if (ii._requiredFlag && _vm->readFlags(ii._requiredFlag)) {
@@ -548,7 +548,6 @@ void Scene::checkSceneFlags(bool flag) {
_vm->_inventory->remove_at(idx);
_vm->_inventory->insert_at(_vm->_inventory->_holdings, tempItem);
_vm->_inventory->_holdings++;
- break;
}
}
}