[Scummvm-tracker] [ScummVM] #10844: QFG4: Ad Avis' death is interrupted, he returns and kills hero

Vhati trac at scummvm.org
Wed Dec 19 04:14:20 CET 2018


#10844: QFG4: Ad Avis' death is interrupted, he returns and kills hero
--------------------------------+----------------------------
  Reporter:  Vhati              |      Owner:  (none)
      Type:  defect             |     Status:  new
  Priority:  normal             |  Component:  Engine: SCI
Resolution:                     |   Keywords:  SCI32 original
      Game:  Quest for Glory 4  |
--------------------------------+----------------------------

Comment (by Vhati):

 When hero kills Ad Avis, a local2 is set to 1. His sprite isn't disposed
 until a few states later.
 \\
 \\
 script 730 - sAdavisDies::changeState()
 {{{
 (0 (= seconds 1))
 (1
         (g1_Glory handsOff:)
         (= loc2_avisDied 1)
         (heroTeller dispose:)
         (avis setScript: 0)
         (avis view: 748 setLoop: 0 1 setCel: 0 posn: 91 141)
         (self cue:)
 )
 # ...
 (6
         (avis dispose:)
         (g103_longSong number: 107 loop: 1 play: self)
 )
 }}}
 \\
 \\
 Meanwhile, a background script waits an amount of time based on the skill
 slider (values: 1,2,3).
 After the countdown expires, it makes Ad Avis launch a fireball and kill
 hero instantly.
 \\
 \\
 CD, script 730 - sTimeItOut::changeState()
 {{{
 (0
         (switch g439_mySkillSlider
                 (1 (= ticks 2400))
                 (2 (= ticks 1800))
                 (3 (= ticks 1200))
         )
 )
 (1
         (avis
                 view: 677
                 setLoop: 0 1
                 setCel: 0
                 setCycle: CT 5 1 self
         )
 )
 # ...
 }}}
 If a tick is 1/60th of a second, that's between 40 and 20 seconds.
 At state 1, it mistakenly assumes if there's still a sprite, Ad Avis must
 be alive.

 If the sprite had already been disposed at that point, the cycle would
 never complete, and the background script would stall harmlessly.
 \\
 \\
 Floppy, script 730 - sTimeItOut::changeState()
 {{{
 (0
         (switch g439_mySkillSlider
                 (1 (= seconds 600))
                 (2 (= seconds 500))
                 (3 (= seconds 400))
         )
 )
 (1
         (avis
                 view: 677
                 setLoop: 0 1
                 setCel: 0
                 setCycle: CT 5 1 self
         )
 )
 # ...
 }}}
 The floppy edition waited in seconds instead of ticks.
 Up to ten minutes!?

--
Ticket URL: <https://bugs.scummvm.org/ticket/10844#comment:3>
ScummVM <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list