Page MenuHomeWildfire Games

Fix a rare case of units getting stuck
ClosedPublic

Authored by wraitii on May 21 2020, 12:47 PM.

Details

Reviewers
None
Commits
rP23699: Fix some cases of units getting stuck.
Trac Tickets
#5586
#5624
Summary

Entities can get stuck inside short-pathfinder obstruction boundaries, making them compute short paths that they actually can't take. This was first reported here. It's pretty much unfixable.
However, the stuckiness can be fixed by computing a long-path occasionally.
Because of an off-by-one error, that sometimes never worked. This fixes it.

It also reintroduces larger max_range as a value of 6 is rather low.


This is a mixup for rP22609, which contained the off-by-one error, and a partial 'revert' of rP22526 (for the max range).


Reported by Freagarach along with a very helpful minimal replay.

Test Plan

Compare replays on both provided tickets.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

wraitii created this revision.May 21 2020, 12:47 PM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/simulation2/components/CCmpUnitMotion.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2181/display/redirect

This revision was not accepted when it landed; it landed in state Needs Review.May 25 2020, 10:14 PM
This revision was automatically updated to reflect the committed changes.