Skip to content
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 ReturnToBase order queueable #16207

Merged
merged 2 commits into from Feb 22, 2019

Conversation

@tovl
Copy link
Contributor

commented Feb 15, 2019

Split from #16065.

@tovl tovl force-pushed the tovl:queue-rtb branch from b250ba9 to 7734b83 Feb 21, 2019

@@ -820,12 +820,10 @@ public void ResolveOrder(Actor self, Order order)
}
else if (order.OrderString == "ReturnToBase" && rearmableInfo != null && rearmableInfo.RearmActors.Any())
{
UnReserve();

This comment has been minimized.

Copy link
@reaperrr

reaperrr Feb 21, 2019

Contributor

I think it would be safer to keep this unconditional UnReserve, in case a queued RTB is cancelled before running.

This comment has been minimized.

Copy link
@tovl

tovl Feb 22, 2019

Author Contributor

Removing this line entirely seems to have been an oversight, but shouldn't it be conditional on not being queued? That is how it works for the other orders as well. I have added this in the new commit.

This comment has been minimized.

Copy link
@pchote

pchote Feb 22, 2019

Member

I'm not convinced here - IMO it doesn't make sense to hold the reservation and block other actors from using the airfield until the current activities are completed. Do we know why the other orders do it like this?

This comment has been minimized.

Copy link
@pchote

pchote Feb 22, 2019

Member

The queued unreserve was introduced in #8886. There is no explicit mention of the reservation, so it may not have been intentional.

This comment has been minimized.

Copy link
@tovl

tovl Feb 22, 2019

Author Contributor

Hmm, it may be because of the TakeOff order in UnReserve? Because it only checks the height at the moment the order is given, not when the queued order is executed this may lead to odd behaviour.

This comment has been minimized.

Copy link
@pchote

pchote Feb 22, 2019

Member

I see. That's a rather ugly hack.

Lets take this as it is then, and look into improving the UnReserve behaviour in a future PR.

@pchote
pchote approved these changes Feb 22, 2019

@pchote pchote merged commit dc9c758 into OpenRA:bleed Feb 22, 2019

2 checks passed

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

@tovl tovl deleted the tovl:queue-rtb branch Feb 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.