Page MenuHomeWildfire Games

Petra: use moveToRange() instead of move() in some cases
ClosedPublic

Authored by Sandarac on Jun 25 2017, 11:25 AM.

Details

Summary

The use of move() for the EntityCollection that holds the units in attackplan.js, and for sending units in a transport plan to the boardingPos, can be problematic. It is fine for small plans (or small groups of units), but for larger plans/groups that have an increasing amount of units, it is not possible for the units to all move to the exact location specified, and so units endlessly try to move to the position, and they are blocked by other units already there. This is undesirable behavior and can cause lag. In many cases for attackplans it is not an issue, as the EntityCollection moves quickly, but it is especially noticeable with transport plans.

Test Plan

Large armies and large groups of units waiting for a transport ship will no longer "bunch up" near rally-points.

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

Sandarac created this revision.Jun 25 2017, 11:25 AM
Owners added a subscriber: Restricted Owners Package.Jun 25 2017, 11:25 AM
Vulcan added a subscriber: Vulcan.Jun 25 2017, 12:22 PM

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...

http://jw:8080/job/phabricator/1620/ for more details.

mimo accepted this revision.Jun 26 2017, 8:07 PM
This revision is now accepted and ready to land.Jun 26 2017, 8:07 PM
This revision was automatically updated to reflect the committed changes.