aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel
diff options
context:
space:
mode:
authorPaul Gilbert2018-04-20 22:27:33 -0400
committerPaul Gilbert2018-04-20 22:27:33 -0400
commitea524fa7928813585f666d2f64e57253c464bb60 (patch)
tree256563253fde09b491027f1886dc7dbef534480d /engines/tinsel
parent030582af001507e441429fb1f2215fe246198624 (diff)
downloadscummvm-rg350-ea524fa7928813585f666d2f64e57253c464bb60.tar.gz
scummvm-rg350-ea524fa7928813585f666d2f64e57253c464bb60.tar.bz2
scummvm-rg350-ea524fa7928813585f666d2f64e57253c464bb60.zip
TINSEL: Fix held items not in either inventory being lost
Diffstat (limited to 'engines/tinsel')
-rw-r--r--engines/tinsel/dialogs.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp
index b5d090ec15..755b9275c6 100644
--- a/engines/tinsel/dialogs.cpp
+++ b/engines/tinsel/dialogs.cpp
@@ -1907,6 +1907,11 @@ extern void HoldItem(int item, bool bKeepFilm) {
invObj = GetInvObject(item);
SetAuxCursor(invObj->hIconFilm); // and is aux. cursor
}
+
+ // WORKAROUND: If a held item is being removed that's not in either inventory (i.e. it was picked up
+ // but never put in them), then when removing it from being held, drop it in the luggage
+ if (g_heldItem != INV_NOICON && InventoryPos(g_heldItem) == INV_HELDNOTIN)
+ AddToInventory(INV_1, g_heldItem);
}
g_heldItem = item; // Item held