Opened 6 weeks ago

Closed 6 weeks ago

#15308 closed defect (fixed)

ULTIMA6: Pathfinding fails to detect some doors

Reported by: PushmePullyu Owned by: PushmePullyu <127053144+PushmePullyu@…>
Priority: normal Component: Engine: Ultima
Version: Keywords:
Cc: PushmePullyu Game: Ultima VI: The False Prophet

Description

Tested with e28c0d5e37a0d4e83c8ec08e28e12b4ea3f3e725 on Fedora Linux Workstation 40 x86_64

When NPCs do pathfinding as part of their schedule, they fail to open/detect doors if all of the following conditions are true:

  1. the door is facing E/W
  2. it is closed and unlocked
  3. there is an adjacent object S of it

This can be observed when Geoffrey is attempting to path from the castle's dining hall to his bed in the room S of it:
The steel door at 312, 370, 0 will not be detected because there is a chest of drawers at 313, 371, 0 and consequently pathfinding will fail.

To reproduce:

  1. Start scummvm with debug logging enabled
  2. Load attached enhanced-mode save
  3. Press space a few times so Geoffrey will attempt to path to his bed
  4. The following message will appear in the log: "actor 7 failed to find a path to 13f,171"

The cause of the problem is an incorrect check in

engines/ultima/nuvie/pathfinder/u6_astar_path.cpp:
sint32 U6AStarPath::step_cost(const MapCoord &c1, const MapCoord &c2)

Attachments (1)

ultima6_enh.026 (176.6 KB ) - added by PushmePullyu 6 weeks ago.

Download all attachments as: .zip

Change History (3)

by PushmePullyu, 6 weeks ago

Attachment: ultima6_enh.026 added

comment:2 by PushmePullyu <127053144+PushmePullyu@…>, 6 weeks ago

Owner: set to PushmePullyu <127053144+PushmePullyu@…>
Resolution: fixed
Status: newclosed

In 09e8ef68:

ULTIMA: NUVIE: Fix pathfinding not detecting some doors

U6 NPCs following their schedule can open doors in the way.
However, E/W facing doors would not be detected if an object was
directly S of them, causing pathing to fail in some cases.

Fix and simplify door detection.

Closes #15308

Note: See TracTickets for help on using tickets.