Opened 5 years ago

Closed 2 years ago

#10841 closed defect (fixed)

SHERLOCK: Scalpel inventory not updated when item is added

Reported by: eriktorbjorn Owned by: dreammaster
Priority: normal Component: Engine: Sherlock
Version: Keywords:
Cc: Game: Sherlock Holmes: Case of the Serrated Scalpel

Description

If I use the attached savegame, open the inventory and examine the pendant (the last object in the inventory), I find a folded piece of stationary. But the inventory isn't updated with the new object until I click somewhere in the inventory.

Attachments (1)

scalpel.019.gz (17.9 KB ) - added by eriktorbjorn 5 years ago.
Gzipped savegame after finding the pendant

Download all attachments as: .zip

Change History (4)

by eriktorbjorn, 5 years ago

Attachment: scalpel.019.gz added

Gzipped savegame after finding the pendant

comment:1 by eriktorbjorn, 2 years ago

This does not happen in the original game.

comment:2 by eriktorbjorn, 2 years ago

One small observation: The problem goes away if I remove the call to ui.banishWindow() from line 443 in talk.cpp. This is the last call to ui.banishWindow() in Talk::talkTo().

What seems to be happening is that the object is added to your inventory. This happens because Talk::talkTo() calls _vm->setFlags(statement._modified[idx]). This flag is then checked by Scene::setSceneFlags().

Then the inventory window is closed twice, for some reason. And the first time is before the engine has had the time to redraw the inventory on the second back buffer.

However, I don't think removing that banishWindow() call is the correct solution.

comment:3 by dreammaster, 2 years ago

Owner: set to dreammaster
Resolution: fixed
Status: newclosed

Actually, I checked and removing the banishWindow call is correct.. Rose Tattoo has a BanishWindow call, but Serrated Scalpel didn't. At least, not outside of the !ui._lookScriptFlag block, but the drawInterface call takes care of it.

Note: See TracTickets for help on using tickets.