[Scummvm-tracker] [ScummVM :: Bugs] #13196: SCUMM: Invalid phrase with GIVE crashes the game (Demo)
ScummVM :: Bugs
trac at scummvm.org
Sat Feb 26 13:14:26 UTC 2022
#13196: SCUMM: Invalid phrase with GIVE crashes the game (Demo)
-----------------------+------------------------------
Reporter: antoniou79 | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: SCUMM
Version: | Resolution:
Keywords: crash | Game: Monkey Island 1
-----------------------+------------------------------
Comment (by r41k0u):
Why this bug occurs:
breathe mint is meant to be given to actors. In a playthrough of the EGA
Demo, I found out that this is given to a prisoner in jail. before getting
the mint the prisoner paces up and down in the cell. But when the give
sentence is passed, both guybrush and the prisoner face each other.
During debugging I found that giving breath mint to something calls
[https://github.com/scummvm/scummvm/blob/547993d966f14907e16130deef7b4075a68924c1/engines/scumm/script_v5.cpp#L1024
o5_faceActor] twice: Once to make guybrush face the receiving object, then
again to make the receiving object face guybrush.
But as in the reported bug's case; pot, red herring and hunk o' meat are
not actors, so this results in an error.
Now this error also occurs when pot or red herring is given to breath
mint, as they reverse the sentence in their scripts (they call
[https://github.com/scummvm/scummvm/blob/547993d966f14907e16130deef7b4075a68924c1/engines/scumm/script_v5.cpp#L872
o5_doSentence] again) with objectA and objectB reversed. This behaviour
results in the sentence "give breath mint to pot/red herring" being
actually executed, which results in the error.
Giving hunk o' meat to breath mint doesn't trigger this error becuase it
doesn't reverse the sentence.
Attaching the "opcodes" logs I made during debugging.
--
Ticket URL: <https://bugs.scummvm.org/ticket/13196#comment:6>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list