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 2
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | Release Blocker | Milestone: | Alpha 19 |
Component: | Core engine | Keywords: | pathfinding |
Cc: | Patch: |
Description (last modified by )
Units can go through obstructions, as reported in #3410. This ticket should deal with one particular case.
Reproduce:
- Build something
- Create a big unit (siege or ship)
- Tell the big unit to move inside the new building (make sure it's a longpath)
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:
While obstructions that exist when the game started are handled correctly:
Sometimes the chosen path is too long (hopefully only occurs when having this obstruction bug. The catapult started near the fortress and was ordered to move near the center of the temple, see attachment:commands_path_too_long.txt):
Change History (7)
by , 9 years ago
Attachment: | siege_inside_obstruction.gif added |
---|
by , 9 years ago
Attachment: | newly_constructed_dock.jpg added |
---|
by , 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 , 9 years ago
Description: | modified (diff) |
---|---|
Summary: | Longrange-pathfinder ignoring new obstructions when moving big units → Longrange-pathfinder allows goals inside new obstructions when moving big units |
by , 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 , 9 years ago
Attachment: | path_too_long.jpg added |
---|
comment:2 by , 9 years ago
Description: | modified (diff) |
---|
The ship receives a longpath with the goal inside the obstruction (both goals inisde the clearance and inside the building are available).