[Scummvm-git-logs] scummvm master -> b4d6ae97ba6cbb582055ca3872a6f47681384954
neuromancer
noreply at scummvm.org
Sat Nov 15 14:30:35 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
b4d6ae97ba PRIVATE: Fix drug bag inventory item
Commit: b4d6ae97ba6cbb582055ca3872a6f47681384954
https://github.com/scummvm/scummvm/commit/b4d6ae97ba6cbb582055ca3872a6f47681384954
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-11-15T15:30:31+01:00
Commit Message:
PRIVATE: Fix drug bag inventory item
If an item is already in inventory, then calling Inventory() with a mask
should do nothing. This fixes the drug bag in the doctor's office.
It has been reappearing even after the player takes it.
This may be the only inventory item affected by this behavior. Usually,
the game scripts test the item's flag before calling Inventory() or
loading the mask that leads to the Inventory() call.
Changed paths:
engines/private/funcs.cpp
diff --git a/engines/private/funcs.cpp b/engines/private/funcs.cpp
index 7f92d02afaf..ce59bcfd73d 100644
--- a/engines/private/funcs.cpp
+++ b/engines/private/funcs.cpp
@@ -391,6 +391,10 @@ static void fInventory(ArgArray args) {
debugC(1, kPrivateDebugScript, "Inventory(...)");
Common::String mask(b1.u.str);
if (mask != "\"\"") {
+ if (g_private->inInventory(bmp)) {
+ return;
+ }
+
MaskInfo m;
m.surf = g_private->loadMask(mask, 0, 0, true);
More information about the Scummvm-git-logs
mailing list