Page MenuHomeWildfire Games

Support infinite max range checks again in IsInXRange // Adapt unitMotion when moving
Needs ReviewPublic

Authored by wraitii on Tue, Jun 11, 9:43 PM.


Group Reviewers
Restricted Owners Package(Owns No Changed Paths)

D981/rP22345 changed IsInXChecks to use edge-to-edge distance instead of centre-to-edge, which broke UnitMotion's min-range movement (we need a certain buffer-zone to be safe). Furthermore, it missed introducing support for an infinite max range (when equal to -1), which broken unitAI.

This fixes both issues.

Following this revision, we can probably reduce min-ranges of a number of things.

Test Plan

This is a bit tricky to test. The unitMotion min_range buffer should probably be checked logically. Fleeing behaviour can be used to get some data, also walking away from foundations.

Diff Detail