Opened 9 months ago

Closed 5 months ago

#10700 closed defect (fixed)

Police Quest: SWAT - Mirror Tool is not working?

Reported by: CTxCB Owned by: lskovlun
Priority: normal Component: Engine: SCI
Keywords: sci32 Cc:
Game: Police Quest: SWAT

Description

ScummVM Version: ScummVM 2.1.0git3670-g0893d6cd23 (Sep 7 2018 10:33:40)

Bug Details: The Mirror Tool is supposed to be used to check an area is safe to enter before you Slice The Pie to make your way inside that area. In the first mission, you're supposed to use this on the corner of the house to check the suspect (Lucy), isn't there... But, the tool just doesn't work? But it does in DOSBox. I've attached a screenshot of me attempting to Low Mirror Side 2.

Bug Reproduction: I've attached a Save Game as close as possible to where the bug happens. To reproduce this bug, simply get the Mirror Tool from the Bottom Bar and try to use it on the corner wall of the house (which you're supposed to do and works totally fine in DOSBox), nothing happens!

Game Language: English.

Game Version: GOG (CD-ROM Release?).

OS Version: Microsoft Windows 10 Pro (10.0.17134, Build 17134).

Attachments (7)

PQSMirrorCorner.png (120.0 KB) - added by CTxCB 9 months ago.
pqswat.006 (47.3 KB) - added by CTxCB 9 months ago.
pqswat-swatdata.001_medals.dat (26 bytes) - added by CTxCB 9 months ago.
pqswat-swatid.cat (43 bytes) - added by CTxCB 9 months ago.
PQSBug.mov (1.2 MB) - added by CTxCB 8 months ago.
pqswat.001 (43.5 KB) - added by CTxCB 8 months ago.
swat2.png (405.4 KB) - added by lskovlun 5 months ago.
Bounding rectangles for the player and cornerOfHouse

Download all attachments as: .zip

Change History (18)

Changed 9 months ago by CTxCB

Attachment: PQSMirrorCorner.png added

Changed 9 months ago by CTxCB

Attachment: pqswat.006 added

Changed 9 months ago by CTxCB

Changed 9 months ago by CTxCB

Attachment: pqswat-swatid.cat added

comment:1 Changed 9 months ago by CTxCB

Just to keep everyone updated and informed, this bug still happens with a newer ScummVM Daily Snapshot [ScummVM 2.1.0git3672-ga66e661df1 (Sep 9 2018 09:59:13)]; I've been considering What could be the cause of such a bug as somebody semi-experienced in SCI's Engine through several different projects I'm involved with, and I'm stumped. The other "tools" (Both Guns, Flash Bang and CS Gas) work totally fine, but the Mirror Tool doesn't? I'm guessing that each tool is a separate Mouse Mode and they react generally with the rooms, or with hotpoints in the rooms, but that still doesn't explain why ScummVM is having problems fulfilling the Player's actions?

Version 0, edited 9 months ago by CTxCB (next)

comment:2 Changed 8 months ago by CTxCB

I'm updating this Bug Report with the intention of notifying potential Bug Fixers that this Police Quest: SWAT bug still occurs in the latest ScummVM Daily Snapshot [ScummVM 2.1.0git3691-g4c25af8191 (Sep 17 2018 09:45:52)].

Changed 8 months ago by CTxCB

Attachment: PQSBug.mov added

comment:3 Changed 8 months ago by CTxCB

I've also included a short video highlighting the Police Quest: SWAT Mirror Bug. It's in the MOV Video Format to allow the clip's filesize to conform to ScummVM's 2MB Upload Limit, but it should be playable with QuickTime or VLC with the correct codecs installed.

comment:4 Changed 8 months ago by digitall

Tried replicating from your savegame with my 4CD version of PQ:SWAT ... but your version from GOG is v1.0c and will not load with the CD version which is v1.0. This is reported by ScummVM when you try and load.

I will have to playthrough the same point as you are indicating to see if the mirror tool works (but this is a bit annoying as PQ:SWAT is not my favourite game).

Changed 8 months ago by CTxCB

Attachment: pqswat.001 added

comment:5 Changed 8 months ago by CTxCB

I've included a Save File which SHOULD work with v1.0 of the game, which is at the same point where the bug happens.

comment:6 Changed 8 months ago by digitall

OK. Have replication from that savegame as you describe. Will probably need a SCI engine dev to do a deep investigation and debugging here, but using the CTRL-SHIFT-d to bring up the debugger, you can do a listing of the planes and then list the items per plane with their graphics bounding boxes. This could be a priority i.e. layering issue with those, but would need to make a modification to draw the bounding boxes on screen I think to see.

comment:7 Changed 5 months ago by lskovlun

This bug should be fixed now with commit 9ceb2e8. The problem was that the bounding box around the video of the officers was being incorrectly calculated, leading to a rectangle that covered the whole screen. This prevented the doVerb (click) from being sent to the right object. I'm not sure the fix is complete however, I am adding a drawing of the two rectangles; as can be seen they overlap considerably. @CTxCB can you check in the original interpreter that clicking inside the intersection of the two rectangles fails to work?

Changed 5 months ago by lskovlun

Attachment: swat2.png added

Bounding rectangles for the player and cornerOfHouse

comment:8 Changed 5 months ago by lskovlun

Another reason I'm unsure the fix is complete is that the same robot covers all three visible officers (the engine calculates the union of two separate rectangles), which means that the bounding rectangle stretches across the front of the house. I've opted to remove that bit in my illustration; the commit does it right. Is there supposed to be some code elsewhere handling clicks on the part in between the groups of officers? If so, I can't find it off-hand.

comment:9 Changed 5 months ago by CTxCB

@lskovlun I've tested this in DOSBox, and the Player Bounding Box seems to have priority over the CornerOfHouse Bounding Box, and so the overlapping area you've marked only works for interaction with the Player, and not the CornerOfHouse. Not sure if that's desirable, but allowing some kind of way to interact with either intersecting could cause issues somewhere, couldn't it?

comment:10 Changed 5 months ago by lskovlun

In that case, I guess we can close the bug? Do you want to do the honors or shall I?

comment:11 Changed 5 months ago by CTxCB

Owner: set to lskovlun
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.