Opened 5 years ago

Closed 3 years ago

#6693 closed defect (fixed)

SCI: QFG3: Walking out of bounds at tree

Reported by: SF/diggly Owned by: bluegr
Priority: normal Component: Engine: SCI
Keywords: Cc:
Game: Quest for Glory 3

Description

using scummvm-1.7.0-win32 in Windows 7 64-bit

At the base of the giant tree, you can walk to parts of the screen you're not meant to walk on.

To replicate bug from savegame, click the bottom left corner of the screen, then click on the tree below where you are. From here you can walk to all kinds of places on the screen you're not meant to.

Bug 6691 also happens here, so ScummVM might crash when loading the attached save.

Ticket imported from: bugs/6693.

Attachments (2)

qfg3.012 (56.5 KB ) - added by SF/diggly 5 years ago.
qfg3glitch.png (160.1 KB ) - added by SF/diggly 5 years ago.

Download all attachments as: .zip

Change History (9)

by SF/diggly, 5 years ago

Attachment: qfg3.012 added

by SF/diggly, 5 years ago

Attachment: qfg3glitch.png added

comment:1 by SF/diggly, 5 years ago

screens

comment:2 by bluegr, 5 years ago

Looks like an edge case for our pathfinder. Our pathfinding algorithm (a star) is slightly different from Sierra, and there have been cases like this one (in QFG3 as well) where it chooses the wrong path

comment:3 by m-kiewitz, 4 years ago

According to waltervn this also happens in Sierra's SCI. Ego can enter that room with coordinates outside of the boundaries.

comment:4 by OmerMor, 3 years ago

I managed to repro:
Start in room #755 (east to the tree base), on the upper level.
Walk to the east as close to the bottom of the pathway as possible. The hero will exit the room at position (5,45) via exitWest::changeState().
The hero will transition to room #750 at (320,45).
enterEast::changeState() will be triggered:

(method (changeState newState)
   (switch (= state newState)
      (0
         (disableInput)
         (ego x: 320 setScale: 190 normalize: init:)
         (if (< (ego y?) 42) (ego x: 294 y: 29))
         (= cycles 1)
      )
      (1
         (if (< (ego y?) 42)
            (ego setMotion: MoveTo 282 29 self)
         else
            (ego
               setMotion: MoveTo (- (ego x?) 20) (- (ego y?) 4) self
            )
         )
      )
      (2 (enableInput) (self dispose:))
   )
)

Because hero.y >= 42, It will move the hero to (300,41).
Now, the hero is outside the polygon bounds, and can move freely.

I think it could be easily and safely fixed by changing the y cutoff value from 42 to 50.
I'll verify that later.

comment:5 by OmerMor, 3 years ago

Douglas, can you please test the game with the latest daily build?
It contains a fix for this bug: https://github.com/scummvm/scummvm/pull/766

comment:6 by Strangerke, 3 years ago

Resolution: fixed
Status: newpending

comment:7 by sev-, 3 years ago

Owner: set to bluegr
Status: pendingclosed
Note: See TracTickets for help on using tickets.