New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the Enter activity use the closest target position. #13495

Merged
merged 2 commits into from Jun 17, 2017

Conversation

Projects
None yet
3 participants
@pchote
Member

pchote commented Jun 11, 2017

Closes #8064.
Closes #11416.

@pchote pchote added this to the Playtest featuring updated HitShapes milestone Jun 11, 2017

if ((target.CenterPosition - self.CenterPosition).HorizontalLengthSquared <= (t.CenterPosition - self.CenterPosition).HorizontalLengthSquared)
var targetPosition = target.Positions.PositionClosestTo(self.CenterPosition);
var alternatePosition = t.Positions.PositionClosestTo(self.CenterPosition);

This comment has been minimized.

@rob-v

rob-v Jun 11, 2017

Contributor

Shouldn't we use here Enter's field targetCenter to decide the target pos?
or in this code
inner = move.MoveToTarget(self, targetCenter ? Target.FromPos(target.CenterPosition) : target); // Approach
also use PositionClosestTo? Though for ReserveStatus.TooFar it probably doesn't matter too much.

@rob-v

rob-v Jun 11, 2017

Contributor

Shouldn't we use here Enter's field targetCenter to decide the target pos?
or in this code
inner = move.MoveToTarget(self, targetCenter ? Target.FromPos(target.CenterPosition) : target); // Approach
also use PositionClosestTo? Though for ReserveStatus.TooFar it probably doesn't matter too much.

This comment has been minimized.

@pchote

pchote Jun 17, 2017

Member

Actually, it turns out that targetCenter has nothing to do with the position to target. It is used to suppress repathing during group-transport orders.

I added a commit to replace that variable to make this clearer.

@pchote

pchote Jun 17, 2017

Member

Actually, it turns out that targetCenter has nothing to do with the position to target. It is used to suppress repathing during group-transport orders.

I added a commit to replace that variable to make this clearer.

@pchote

This comment has been minimized.

Show comment
Hide comment
@pchote

pchote Jun 17, 2017

Member

Updated.

Member

pchote commented Jun 17, 2017

Updated.

@rob-v

rob-v approved these changes Jun 17, 2017

👍

@obrakmann

👍

@obrakmann obrakmann merged commit 4b4172f into OpenRA:bleed Jun 17, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@obrakmann

This comment has been minimized.

Show comment
Hide comment
@obrakmann
Contributor

obrakmann commented Jun 17, 2017

@pchote pchote deleted the pchote:enter-target-positions branch Oct 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment