[Scummvm-tracker] [ScummVM] #10860: QFG4: Lock up when casting Trigger after Summon Staff
ScummVM
trac at scummvm.org
Sun Jan 6 13:30:05 CET 2019
#10860: QFG4: Lock up when casting Trigger after Summon Staff
--------------------------------+----------------------------
Reporter: tomasz89 | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: SCI
Resolution: | Keywords: SCI32 original
Game: Quest for Glory 4 |
--------------------------------+----------------------------
Comment (by Vhati):
I tried some other spells and found that the Open spell has a similar
effect without getting stuck.
I had to manually decompile that too, and it is indeed VERY similar.
It's attached. I'll quote the important difference.
\\
\\
script 13 - castOpenScript::changeState(2)
{{{
(2
# ...
(if (not (and (> (go_hero view?) 17) (< (go_hero view?) 21)))
# hero's NOT holding the staff.
(g0_hero setCycle: Beg)
# Unlike castTriggerScript, there's self arg to cue.
)
(soundFX number: 934 play:)
# Use seconds to cue, with or without the staff.
(= seconds 3)
)
}}}
\\
\\
Another interesting difference: After state 4's doVerb(), it disposes the
three arrays in the same block.
\\
\\
I realized there is no cue there - in either Trigger or Open. The called
doVerb() method is expected to do the handsOn() and replace the room
script... otherwise the stalled script would block any further
spellcasting.
Example: script 800 - pSquidStone::doVerb()
{{{
(82
(g2_myCurrentRoom setScript: (ScriptID 11) 0 self) #
castTriggerScript
(return 1)
)
(-82
(if (== (pSquidStone cel?) 0)
(pSquidStone setPri: 110)
(g2_myCurrentRoom setScript: (ScriptID 806 0)) #
sToppleSquid
else
(g2_myCurrentRoom setScript: 0)
# "The standing stone has fallen to form a sort of
# stone bridge up to the ledge."
(g91_gloryMessager say: 4 1 41 0)
(g1_Glory handsOn:)
)
)
}}}
--
Ticket URL: <https://bugs.scummvm.org/ticket/10860#comment:10>
ScummVM <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list