Opened 9 years ago

Last modified 5 years ago

#3538 closed defect

Longrange-pathfinder allows goals inside new obstructions when moving big units — at Version 1

Reported by: elexis Owned by:
Priority: Release Blocker Milestone: Alpha 19
Component: Core engine Keywords: pathfinding
Cc: Patch:

Description (last modified by elexis)

Units can go through obstructions, as reported in #3410. This ticket should deal with one particular case.

Reproduce:

  1. Build something
  2. Create a big unit (siege or ship)
  3. Tell the big unit to move inside the new building (make sure it's a longpath)

http://trac.wildfiregames.com/raw-attachment/ticket/3538/siege_inside_obstruction.gif

By showing the pathfinder overlay in the developer menu, you see that the returned longpath has a goal inside the obstruction. The unit will follow that longpath and enter the building.

Notice the bug only applies to obstructions that are added after the game has started. If the building existed when the game started, the goal of the longpath will be outside the obstruction and the unit will not enter the building (besides #3532)

(Units in formation count as a single big unit (clearance 4) and also get a goal point inside the obstruction. But they disband when hitting the obstruction and don't enter it.)


Together with #3532, this bug accounts for the "ship on land" thing, which has been reported here http://wildfiregames.com/forum/index.php?showtopic=20083 and happened to me in some games (uploaded in #3513 and #3471). Replaying those games showed that ships always entered the land by moving through the obstructions of docks.

The bug occurs with all obstructions that are added after the game started: http://trac.wildfiregames.com/raw-attachment/ticket/3538/newly_constructed_dock.jpg

While obstructions that exist when the game started are handled correctly: http://trac.wildfiregames.com/raw-attachment/ticket/3538/prebuilt_dock.jpg

Result ingame: http://trac.wildfiregames.com/raw-attachment/ticket/3410/ship.gif

Change History (6)

by elexis, 9 years ago

by elexis, 9 years ago

Attachment: newly_constructed_dock.jpg added

The ship receives a longpath with the goal inside the obstruction (both goals inisde the clearance and inside the building are available).

by elexis, 9 years ago

Attachment: prebuilt_dock.jpg added

But if the dock existed when the game started, it works as expected (besides #3532).

comment:1 by elexis, 9 years ago

Description: modified (diff)
Summary: Longrange-pathfinder ignoring new obstructions when moving big unitsLongrange-pathfinder allows goals inside new obstructions when moving big units

by elexis, 9 years ago

Attachment: commands_path_too_long.txt added

Minimal replay for r17144 where a catapult was ordered to move near to the center of the temple. The longpathfinder returns a path allowing to enter the obstruction. Strangely the chosen path is about 3 times as long as it should be (i.e. chosen path is not a shortest path). The catapult receives only one walk-command. Hopefully only occurs when having this obstruction bug.

by elexis, 9 years ago

Attachment: path_too_long.jpg added
Note: See TracTickets for help on using tickets.