Menu

#4464 SAM: Game hangs when talking to bigfoot guard

Sam and Max
closed-fixed
kirben
5
2009-07-24
2009-07-23
No

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(🔉"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(🔉"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.

Discussion

  • Torbjörn Andersson

    Savegame near the problem

     
  • Torbjörn Andersson

    The offending game script

     
  • Torbjörn Andersson

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

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

    and

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

    So of course it continues with the next case.

     
  • kirben

    kirben - 2009-07-24
    • assigned_to: nobody --> kirben
    • status: open --> closed-fixed
     
  • kirben

    kirben - 2009-07-24

    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.

     
  • Torbjörn Andersson

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

     
  • kirben

    kirben - 2009-07-24

    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.

     
MongoDB Logo MongoDB