Page MenuHomeWildfire Games

Treat min range in the same manner as max range when computing goal
ClosedPublic

Authored by Silier on Dec 23 2019, 5:05 PM.

Details

Summary

Reason of reported behaviour by gameboy https://wildfiregames.com/forum/index.php?/topic/27384-strange-landing-on-the-island-and-unable-to-attack/ when units were trying to move "left and right" and they never reached destination was that they got command to move to the range exactly X units from some point/entity. What means minRange == maxRange. That case triggered computing goal when distance < minRange with result dist(goal, target) > maxRange, because minRange computation used clearance even when was treating target as circle.

Removing that is ok, because target is treated as circle only if is enough far away from moving entity, what is 3 times of obstruction of target.

Test Plan

Test dancing unit in place do not happen.
Check it did not break anything else regarding minimal and maximum distance.

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

Silier created this revision.Dec 23 2019, 5:05 PM
Owners added a subscriber: Restricted Owners Package.Dec 23 2019, 5:05 PM

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

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/881/display/redirect

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

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

This revision was not accepted when it landed; it landed in state Needs Review.Dec 26 2019, 10:03 PM
This revision was automatically updated to reflect the committed changes.