Fix classic co-op auto-shot death animation ordering - #186
Open
xcomcoopdev wants to merge 2 commits into
Open
xcomcoopdev wants to merge 2 commits into
xcomcoopdev wants to merge 2 commits into
Conversation
…it_death to queue the client UnitDieBState before the subject-less auto-shot release advances the next projectile. Keep after_unit_death behind the normal receive gate so its final dead status cannot skip the queued collapse animation. Restrict the newer opener-order barrier to parallel turns, whose unit_casualty and death-ghost paths remain unchanged. Add a harness regression test that verifies the client starts collapsing after the lethal round and before the remaining auto-shot rounds consume their ammunition.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a classic-turn co-op regression where the client could fire the remaining rounds of an auto shot before displaying the target unit's collapse animation.
The client could consequently show later rounds hitting a unit that had already fallen on the host, then change the target directly from standing to dead after the burst.
Cause
The receive-order barrier treated the classic
unit_deathpacket as unable to overtake its pendinghit_unitopener. Both packets could remain behind the active projectile gate while the subject-lesshasHitUnitpacket was still allowed through.This released
ExplosionBStateand allowedProjectileFlyBStateto create the next round before the client had queued its authoritativeUnitDieBState.In addition, allowing
after_unit_deaththrough as a chain closer could apply the final dead status before the queued client death animation started.UnitDieBStatewould then see an already-out unit and skip its collapse frames.Changes
unit_deathto queue the authoritative clientUnitDieBStatewhile the shot is waiting.after_unit_deathas a gate-bypassing chain closer, so it cannot apply the final dead status ahead of the collapse animation.unit_deathreleasing the parked explosion immediately after the death state has been queued.fallPhasethrough the test harness battle state for animation-order assertions.The parallel
unit_casualtyand death-ghost paths are unchanged.Testing
Added:
The test stages a deterministic lethal first round in a three-round auto shot and verifies that the client enters intermediate collapse frames while two rounds still remain.
RED result without the fix:
GREEN result with the fix:
The corrected behavior was also verified manually in classic turns.