Opened 4 months ago
Closed 4 months ago
#15308 closed defect (fixed)
ULTIMA6: Pathfinding fails to detect some doors
Reported by: | PushmePullyu | Owned by: | |
---|---|---|---|
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:
- the door is facing E/W
- it is closed and unlocked
- 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:
- Start scummvm with debug logging enabled
- Load attached enhanced-mode save
- Press space a few times so Geoffrey will attempt to path to his bed
- 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)
Note:
See TracTickets
for help on using tickets.
PR for this is at https://github.com/scummvm/scummvm/pull/6004