Page MenuHomeWildfire Games

D13 collateral 4: change rally point code slightly for static obstructions
AbandonedPublic

Authored by wraitii on May 7 2017, 10:26 AM.

Details

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

This is something I did for D13 originally (iirc with d53 it behaves weirdly) but tbh I don't really remember.

Would be OK with abandoning this if people consider it's a bad idea.

Test Plan

check rallypoints for gold mines or trees or big buildings

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 1503
Build 2374: Vulcan BuildJenkins
Build 2373: arc lint + arc unit

Event Timeline

wraitii created this revision.May 7 2017, 10:26 AM
Vulcan added a subscriber: Vulcan.May 7 2017, 12:11 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!

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

Stan added a subscriber: Stan.May 7 2017, 1:14 PM
Stan added inline comments.
binaries/data/mods/public/gui/session/unit_actions.js
953

Caps at the start of the comment.

binaries/data/mods/public/simulation/components/RallyPoint.js
26

Why var here and let below ?

54

Caps at the beginning of the comments.

What's the reason this exists? Seems like working around a bug in other code, if even that.

@leper it's for niceness. On large objects, the "goal" with the new unitMotion ends up being inside the bounds of the building, so this moves it closer to us to reflect the usage in current 0 A.D.

That's a consequence of the unit Motion rewrite, and it's required to make things work. We could probably work around it by changing more how this flag works.

As said above, I don't care if we abandon this, but it does improve on the issue (when tested with D13)

elexis added a subscriber: elexis.Oct 29 2017, 2:39 PM

Perhaps you could show a screenshot comparison? To me the feature doesn't sound too bad from the GUI point of view.
Perhaps mimo or fatherbushido could judge best if it's preferable to have the rallypoint just before the building instead of inside the building.

I'm a bit dubious about the "keep in sync" part.
Unifying the two copies in globalscripts/ would make it impossible to get ouf ot sync.

The question would be how to unify targetTemplate.Obstruction.Static["@width"] and template.obstruction.shape.width, but I think globalscripts/Templates.js has the capabilities to get that data in both cases and also apply possible aura/tech changes (GetModifiedTemplateDataValue).

binaries/data/mods/public/gui/session/unit_actions.js
962

Why 0.49 and not 0.5?

971

(position = targetState.position.clone() after I broke reverted and changed that)

wraitii planned changes to this revision.Oct 29 2017, 2:46 PM

Mh, you're probably right. I'll change this if/when the D13 patch is to get committed, since it's sort of irrelevant before.

binaries/data/mods/public/gui/session/unit_actions.js
962

mh, honestly no idea, I suppose it might have failed oddly with 0.5, I'll need to test this.

wraitii abandoned this revision.May 25 2019, 4:41 PM

Not needed anymore I believe.