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

Cancel Rearm activity when the host goes away. #15178

Merged
merged 1 commit into from May 30, 2018

Conversation

Projects
None yet
3 participants
@pchote
Copy link
Member

pchote commented May 28, 2018

Fixes #14992, which was caused by the combination of two issues:

  • The outer Tick method did not check for the host remaining alive, so the unit would get stuck in a loop calling the inner Reload which decrements ammoPool.RemainingTicks until the player notices and manually cancels the order.
  • The ammoPool.RemainingTicks check requires exactly 0, so even after a player manually orders the unit to a new depot it will continue to loop indefinitely because ammoPool.RemainingTicks will generally be a large negative number.
Cancel Rearm activity when the host goes away.
This also ensures that the first reload tick always
takes the correct amount of time.

@pchote pchote added this to the Next release milestone May 28, 2018

// Reset the ReloadDelay to avoid any issues with early cancellation
// from previous reload attempts (explicit order, host building died, etc).
// HACK: this really shouldn't be managed from here
foreach (var pool in ammoPools)

This comment has been minimized.

@GraionDilach

GraionDilach May 30, 2018

Contributor

Please filter this for ammopools with SelfReload enabled. IIRC we are properly supporting such cases.

This comment has been minimized.

@GraionDilach

GraionDilach May 30, 2018

Contributor

Oh, it's filtered already, nevermind.

@GraionDilach
Copy link
Contributor

GraionDilach left a comment

👍 then.

@pchote pchote added the PR: Needs +2 label May 30, 2018

@reaperrr reaperrr merged commit 10aaa8e into OpenRA:bleed May 30, 2018

2 checks passed

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

@pchote pchote deleted the pchote:fix-ammopool-rearm branch Jul 9, 2018

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