Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#5547 closed defect (fixed)

Pathfinding A24.

Reported by: Freagarach Owned by: wraitii
Priority: Should Have Milestone: Alpha 24
Component: Simulation Keywords: pathfinder, regression
Cc: wraitii Patch:

Description

Some more pathfinding issues on A24 SVN 22574. Entity 456 stuck in walking state (also not moving after first order) (40 seconds, turn 200). Entity 554 stuck despite looking quite happy (35 seconds, turn 193). Entity 507 stuck when moving past houses (~1:55, turn 575).

Attachments (1)

commands.txt (17.5 KB ) - added by Freagarach 5 years ago.
Replay.

Download all attachments as: .zip

Change History (4)

by Freagarach, 5 years ago

Attachment: commands.txt added

Replay.

comment:1 by wraitii, 5 years ago

Entity 456 and entity 507 are both victims of the same, horrible bug: they are almost exactly on the obstruction's edge, and the short-pathfinder think it can go through the obstruction. And thus that path fails.

I've actually noticed this before, and I don't have a fix :/ I think I have to get rid of the short-pathfinder to fix this, possibly with unit pushing I could do something clever.

--

Entity 554 is a slightly worse case of #5545, here the unit is colliding with another so my "reject path" checks are not even taken into account. I also don't have a fix for this particular issue, though it should be rare than the others, it's fairly obvious and in general it shouldn't prevent units from going to their next state if there is one.

--

Sadly at the moment I can't do much about either of these issues. I'm hoping unit-pushing will allow new workarounds and help fix those ultimately.

comment:2 by wraitii, 5 years ago

Owner: set to wraitii
Resolution: fixed
Status: newclosed

In 22609:

Unit Motion - Improve behaviour around obstructions and unreachable goals

Use the "pretend correct path" behaviour for short goals too. This is a fix for #5545, since the position check now works correctly without needing to add a tricky check for path-vs-path distance.

Simplify HandleObstructedMove to use ComputePathToGoal more. This means we occasionally compute a long path when stuck, which fixes two cases of stuck units reported in #5547.

Move some common calls into functions for convenience.

Make sure the short-path-waypoint-range-relaxing introduced in rP22526 doesn't happen for the last waypoint, which caused units to occasionally never get in range of the last waypoint.

Clear short path waypoints when computing a long path.

This won't fix all instances of unit dancing, but it should improve most of them.

Fixes #5545, Fixes #5547

Differential Revision: https://code.wildfiregames.com/D2135

comment:3 by elexis, 5 years ago

Keywords: regression added
Note: See TracTickets for help on using tickets.