Page MenuHomeWildfire Games

Improve vertex pathfinder consistency with long-range pathfinder
Needs ReviewPublic

Authored by wraitii on Wed, May 8, 5:41 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

A longstanding issue of the 2 pathfinders in 0 A.D. has been that the vertex pathfinder, being more exact, is more permissive than the long-range pathfinder.
This has led to a number of glitches and units being stuck.

Using Global Regions from D1835, we can almost put this to the rest.

This does two new things:

  • Remove non-goal vertices that are on another global region (since those are never reachable).
  • Let us only target reachable navcells on the goal, so that we don't end up on impassable terrain (which has terrible consequences for pathfinding).

I've ran some quick tests and this appears to work just fine. There are still cases where the vertex pathfinder will take paths over impassable navcells (that structurally cannot be prevented unless we make it less tolerant the the long-range pathfinder, which... sounds somewhat possible. I'll test both approaches, but this ones changes fewer things).

Test Plan

Review the code. There are no tests for this code I think.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
D13_outtakes
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 7388
Build 12037: Vulcan BuildJenkins
Build 12036: arc lint + arc unit