PRIVATE: Fix drug bag inventory item - #7031
Merged
Merged
Conversation
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.
Contributor
|
Good catch! |
Contributor
|
FYI, this PR introduced a bug in the demo. All the calls to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 in ScummVM even after the player takes it.This may be the only affected inventory item. Usually, the game scripts test an item's flag before calling
Inventory()or loading the mask that leads toInventory().Note that there is another unrelated problem with this inventory item; Marlowe's "I took it" sound effect doesn't play in ScummVM. It is immediately interrupted by a
SoundEffect()call in the next setting.