#10857 closed defect (fixed)
QFG4: Pathfinding in forest 1S 1W from town, east entry
Reported by: | tomasz89 | Owned by: | bluegr |
---|---|---|---|
Priority: | normal | Component: | Engine: SCI |
Version: | Keywords: | SCI32 has-pull-request | |
Cc: | Game: | Quest for Glory 4 |
Description
The room south of the town entrance has a pathing error when then going west (towards the castle). The path should take you straight west rather than going back and forth.
Attachments (6)
Change History (16)
by , 6 years ago
Attachment: | qfg4-cd-gog.017 added |
---|
comment:1 by , 6 years ago
Component: | --Unset-- → Engine: SCI |
---|---|
Game: | → Quest for Glory 4 |
comment:2 by , 6 years ago
by , 6 years ago
Attachment: | Polygons - Room 557.png added |
---|
comment:3 by , 6 years ago
I can reproduce this in both the CD and floppy editions under ScummVM.
It does not occur in the original interpreters.
QFG4 CD (English)
File - 5kb MD5 - Full MD5
RESOURCE.000 - 263dce4aa34c49d3ad29bec889007b1c - 1364ba69e3c0abb68cc0170650a56692
RESOURCE.AUD - c39521bffb1d8b19a57394866184a0ca - 71098b9e97e20c8941c0e4812d5f906f
RESOURCE.MAP - aba367f2102e81782d961b14fbe3d630 - 801a04cc6aa5d437681a2dd0b6545248
RESOURCE.SFX - 3cf95e09dab8b11d675e0537e18b499a - 7c858d7253f86dab4cc6066013c5ecec
QFG4 Floppy 1.1a + note patch (English)
File - 5kb MD5 - Full MD5
RESOURCE.000 - f64fd6aa3977939a86ff30783dd677e1 - ff42260a665995a85aeb277ad80aac8a
RESOURCE.MAP - d10a4cc177d2091d744e2ad8c049b0ae - 3695b1b0a1d15f3d324ea9f0cc325245
RESOURCE.SFX - 3cf95e09dab8b11d675e0537e18b499a - 7c858d7253f86dab4cc6066013c5ecec
comment:4 by , 6 years ago
Keywords: | SCI32 added |
---|---|
Summary: | QFG4 path west results in walking NW then SW → QFG4: Pathfinding in forest 1S 1W from town, east entry |
by , 6 years ago
Attachment: | Disasm (CD) - Script 50, forest init.txt added |
---|
by , 6 years ago
Attachment: | Decomp (CD) - Script 50, forest init.txt added |
---|
comment:5 by , 6 years ago
SCI Companion got confused, so I decompiled forest::init() by hand.
It was quite long and, as it turns out, not especially relevant to this bug.
The decompiled code and raw disasm from ScummVM are attached.
It's primarily concerned with random monster encounters.
script 50 - forest::init()
(switch myPrevRoomNum # ... ((g2_myCurrentRoom east?) (g0_hero posn: 335 136 setHeading: 270) (= loc1 (- 313 (if g365_myFoeScriptNum 1 else 21) ) ) (= loc2 136) (g2_myCurrentRoom setScript: enterRoomScr) ) # ... )
loc1 and loc2 are x,y coords that hero is moved to by enterRoomScr::changeState(1).
In this case, hero starts at (335,136) and is sent to (292,136).
by , 6 years ago
Attachment: | Polygon - Room 557 Stream.png added |
---|
by , 6 years ago
Attachment: | Polygon (Fixed) - Room 557 Stream.png added |
---|
comment:6 by , 6 years ago
There's an unwalkable stream in the SE corner.
Entry coordinates were on the edge of the stream's poly.
I shrank the poly by a couple pixels, and hero enters properly.
comment:7 by , 6 years ago
Keywords: | has-pull-request added |
---|
Pull Request: SCI32: Fix QFG4 forest pathfinding
comment:8 by , 6 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Room 557, 1S 1W from town entrance
script 557 - rm557::init()
That Room method invokes forest::init() in script 50, which schedules enterRoomScr on the room.