Opened 5 years ago

Closed 5 years ago

#10757 closed defect (fixed)

QFG4: Pathfinding in castle stairways by Tanya's room, Iron safe

Reported by: Vhati Owned by: bluegr
Priority: normal Component: Engine: SCI
Version: Keywords: SCI32 has-pull-request
Cc: Game: Quest for Glory 4

Description

ScummVM 2.1.0git3770-g15306581ab (Oct 18 2018 04:27:32)
Windows 7 64bit
QFG4 CD (English)

In the castle after getting kicked out of Tanya's room for letting daylight in... The hero is standing near the top of a stairway. If you click HAND on the lower door, the hero floats straight *through* the stone pillar instead of winding down the stairs.

File - 5kb MD5 - Full MD5
RESOURCE.000 - 263dce4aa34c49d3ad29bec889007b1c - 1364ba69e3c0abb68cc0170650a56692
RESOURCE.AUD - c39521bffb1d8b19a57394866184a0ca - 71098b9e97e20c8941c0e4812d5f906f
RESOURCE.MAP - aba367f2102e81782d961b14fbe3d630 - 801a04cc6aa5d437681a2dd0b6545248
RESOURCE.SFX - 3cf95e09dab8b11d675e0537e18b499a - 7c858d7253f86dab4cc6066013c5ecec

Attachments (6)

sci.055 (82.3 KB ) - added by Vhati 5 years ago.
SavedGame - TanyaStairway
sci.040 (50.1 KB ) - added by Vhati 5 years ago.
SavedGame (Floppy) - TanyaStairway
sci.054 (81.3 KB ) - added by Vhati 5 years ago.
SavedGame (CD) - Safe stairway
sci.091 (65.9 KB ) - added by Vhati 5 years ago.
SavedGame (Floppy) - Safe stairway
Polygon - Room 620 stairway.png (56.6 KB ) - added by Vhati 5 years ago.
Polygon - Room 620 stairway
Polygon (Fixed) - Room 620 stairway.png (56.6 KB ) - added by Vhati 5 years ago.
Polygon (Fixed) - Room 620 stairway

Download all attachments as: .zip

Change History (18)

by Vhati, 5 years ago

Attachment: sci.055 added

SavedGame - TanyaStairway

comment:1 by Vhati, 5 years ago

Summary: Pathfinding in castle stairway by Tanya's roomQFG4: Pathfinding in castle stairway by Tanya's room

comment:2 by digitall, 5 years ago

@Vhati: Thanks for the bug report. Could you try testing this with the original SCI interpreter to see if this occurs in the original as well?

comment:3 by Vhati, 5 years ago

The original interpreter did not have this bug.

comment:4 by Vhati, 5 years ago

Occurs in the floppy edition under ScummVM.

The floppy edition's original interpreter did not have this bug.


ScummVM 2.1.0git3797-ge7d23d2cd9 (Oct 25 2018 04:17:12)
Windows 7 64bit
QFG4 Floppy 1.1a + note patch (English)

File - 5kb MD5 - Full MD5
RESOURCE.000 - f64fd6aa3977939a86ff30783dd677e1 - ff42260a665995a85aeb277ad80aac8a
RESOURCE.MAP - d10a4cc177d2091d744e2ad8c049b0ae - 3695b1b0a1d15f3d324ea9f0cc325245
RESOURCE.SFX - 3cf95e09dab8b11d675e0537e18b499a - 7c858d7253f86dab4cc6066013c5ecec

by Vhati, 5 years ago

Attachment: sci.040 added

SavedGame (Floppy) - TanyaStairway

comment:5 by Vhati, 5 years ago

Another stairway is affected: the one leading down to the iron safe.

As above, that occurs in both the CD and floppy editions under ScummVM.

Their original interpreters did not have this bug.

by Vhati, 5 years ago

Attachment: sci.054 added

SavedGame (CD) - Safe stairway

by Vhati, 5 years ago

Attachment: sci.091 added

SavedGame (Floppy) - Safe stairway

comment:6 by Vhati, 5 years ago

Summary: QFG4: Pathfinding in castle stairway by Tanya's roomQFG4: Pathfinding in castle stairways by Tanya's room, Iron safe

comment:7 by Vhati, 5 years ago

Scripts 620 (Tanya) and 624 (safe) don't have much in them. They both let script 633 do all the work. Disregard the inaccurate name of the Code object below.


script 633 - rm620Code::init()

(if (< (g0_hero y?) 64)
	(g0_hero setScaler: Scaler 100 37 189 31)
	(= loc3_fromUpstairs 1)
# ...
(if (!= (g2_myCurrentRoom style?) 0)
	(= loc4_flipped 1)
	(g2_myCurrentRoom
		addObstacle:
			((Polygon new:)
				type: 3
				init:
					226 32
					237 38
					250 51
					260 66
					261 81
					253 108
					233 136
					180 163
					108 184
					63 202
					63 157
					0 168
					0 189
					62 204
					113 187
					189 164
					262 128
					276 93
					267 58
					233 32
				yourself:
			)
	)



script 633 - sEnter::changeState(2)

(if loc3_fromUpstairs
	(g0_hero ignoreActors: 1)
	(if loc4_flipped
		(g0_hero setMotion: MoveTo 252 44 self)

When entering from above in the flipped stairway, hero is sent to a point outside the walkable polygon.

by Vhati, 5 years ago

Polygon - Room 620 stairway

comment:8 by Vhati, 5 years ago

I wrote a python script to take Polygon init args and plot the points for inspection.

by Vhati, 5 years ago

Polygon (Fixed) - Room 620 stairway

comment:9 by Vhati, 5 years ago

Pull Request: SCI32: Fix QFG4 stairway pathfinding

comment:10 by digitall, 5 years ago

Keywords: has-pull-request added

comment:11 by bluegr, 5 years ago

ScummVM can show the pathfinding polygons. Just type “debugflags enable pathfinding” in the debugger

comment:12 by bluegr, 5 years ago

Owner: set to bluegr
Resolution: fixed
Status: newclosed

Nice work! The PR has been merged, so this can be closed now

Note: See TracTickets for help on using tickets.