Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#4464 closed defect (fixed)

SAM: Game hangs when talking to bigfoot guard

Reported by: eriktorbjorn Owned by: Kirben
Priority: normal Component: Engine: SCUMM
Version: Keywords: script
Cc: Game: Sam and Max


English DOS CD version of the game Current SVN snapshot (though it probably happens in any version)

If you talk to the guard at the bigfoot party, after he's let you inside, the game will hang if you press the stop (hand) conversation button.

I believe this is a bug in the game script. This is what that part of the script looks like:

[01C7] (BA) talkActor(:sound:"Very much so.",5) [01E9] (A9) wait.waitForMessage() [01EB] (73) jump 9bd [01EE] (5D) } else if (dup[1] == 999) { [01F9] (73) /* jump 1fe; */ [01FD] (**) } [01FD] (**) } [01FE] (5D) if (bitvar98) { [0204] (5D) if (ifClassOfIs(481,[134])) {

This is what a different part of the script, which doesn't hang, looks like:

[04B5] (BA) talkActor(:sound:"Same old, same old.":wait:"My feet still hurt, and you two keep asking stupid questions.",5) [051C] (A9) wait.waitForMessage() [051E] (**) } [051E] (5D) } else if (dup[5] == 999) { [0529] (73) /* jump 52e; */ [052D] (**) } [052D] (73) jump 9bd [0531] (73) } else { [0534] (43) var171 = 0 [053A] (43) var169 = getRandomNumber(1)

I didn't see it at first, but the first case is missing the "jump 9bd" line. This jumps to the end of the script, which resumes the game. Without that, it probably falls into the next conversation case, where it waits for the player to click on of the conversation buttons. Which of course won't ever happen.

The following debugger command unlocks the game: scumm_vars[171] 999

But I don't know how to make this into a workaround.

Ticket imported from: #2826144. Ticket imported from: bugs/4464.

Attachments (2)

samnmax.s45 (43.3 KB ) - added by eriktorbjorn 13 years ago.
Savegame near the problem
script-101.dmp.txt (8.1 KB ) - added by eriktorbjorn 13 years ago.
The offending game script

Download all attachments as: .zip

Change History (7)

by eriktorbjorn, 13 years ago

Attachment: samnmax.s45 added

Savegame near the problem

by eriktorbjorn, 13 years ago

Attachment: script-101.dmp.txt added

The offending game script

comment:1 by eriktorbjorn, 13 years ago

Looking closer, the missing line is what makes the difference between

if (...) { } if (...) { }


if (...) { } else if (...) { }

So of course it continues with the next case.

comment:2 by Kirben, 13 years ago

I added a workaround that jumps to the end of the script, specifically when that '(dup[1] == 999)' segment is triggered, due to the missing jump.

Fixed in ScummVM SVN, use the next daily snapshot of ScummVM SVN.

comment:3 by Kirben, 13 years ago

Owner: set to Kirben
Resolution: fixed
Status: newclosed

comment:4 by eriktorbjorn, 13 years ago

The workaround uses a hard-coded offset into the script. Does that work in non-English versions?

comment:5 by Kirben, 13 years ago

Good point, I adjusted the hard coded offset for jump, so there are no string segments between, which should be safe in all language versions.

Note: See TracTickets for help on using tickets.