[Scummvm-tracker] [ScummVM] #10860: QFG4: Lock up when casting Trigger after Summon Staff
ScummVM
trac at scummvm.org
Tue Jan 1 04:57:24 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):
SCI Companion got confused, so I decompiled by hand.
Raw disasm from ScummVM is attached.
\\
\\
script 11 - castTriggerScript::changeState()
{{{
(switch (= state param1)
(0
(= local4 (IntArray with: 0 0 0 1 0 0 2 3))
(= local5 (IntArray with: 2 3 6 7))
(= local6 (IntArray with: 2 3 0 3 0 1 2 3))
(g1_Glory handsOff:)
(g0_hero setHeading: (GetAngle (g0_hero x?) (g0_hero y?)
g441_myX g442_myY) self)
)
(1
(= local1 (go_hero loop?))
(if (and (> (go_hero view?) 17) (< (go_hero view?) 21))
# hero's holding the staff.
(= local2 (go_hero cel?))
(g0_hero
view: 19
loop: (local4 at: local1)
setCel: 0
setCycle: End self
)
else
(g0_hero
view: 14
loop: (local6 at: local1)
setCel: 0
setCycle End self
)
)
)
(2
(triggerEffect
x: g441_myX
y: g442_myY
setScaler: g0_hero
cycleSpeed: 0
setPri: 180
init:
setCycle: Fwd
)
(if register
(if (register onMe: g441_myX g442_myY)
(= local0 register)
)
(= register 0)
)
(if (not (and (> (go_hero view?) 17) (< (go_hero view?)
21)))
# hero's NOT holding the staff.
(g0_hero setCycle: Beg self)
)
# No else!?
(soundFX number: 934 play:)
)
(3
(triggerEffect dispose:)
(= cycles 2)
)
(4
(if (and (> (go_hero view?) 17) (< (go_hero view?) 21))
# hero's holding the staff.
(g0_hero
view: 20
loop: (local5 at: (g0_hero loop?))
cel: (if (< (g0_hero loop?) 6) 4 else 5)
)
)
(g0_hero normalize:)
(cond
((not (proc64999_5 global11 270 290 340 440 460
520 580 593 600 641 643 650 750 800))
# "Nothing seems to have been triggered."
(g91_gloryMessager say: 0 0 1 0 self 11)
)
(local0
(local0 doVerb: 174)
)
(else
# "Nothing seems to have been triggered."
(g91_gloryMessager say: 0 0 1 0 self 11)
)
)
)
(5
(g1_Glory handsOn:)
(self dispose:)
)
)
}}}
It doesn't seem to have any means to advance if hero IS holding the staff.
--
Ticket URL: <https://bugs.scummvm.org/ticket/10860#comment:9>
ScummVM <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list