Page MenuHomeWildfire Games

Fix gates reclosing upon garrison.
AbandonedPublic

Authored by Freagarach on Aug 21 2020, 7:45 PM.

Details

Reviewers
None
Summary

D2760 Allows garrisoning on gates, however when the gate is garrisoned it replays the closing animation, even when it is locked.
I'm not sure why that happens, but this introduces a hack that fixes it ^^

If anyone knows the proper fix, please let me know :)

Test Plan

Apply D2760 and see that upon garrisoning a gate the closing animation plays. Apply this patch and verify that that does not happen anymore :)

Event Timeline

Freagarach created this revision.Aug 21 2020, 7:45 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1390/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/3042/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/2489/display/redirect

Freagarach requested review of this revision.Aug 21 2020, 7:49 PM
Freagarach updated this revision to Diff 13267.Aug 21 2020, 8:02 PM

Also fix opening.

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/3043/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1391/display/redirect

Freagarach updated this revision to Diff 13268.Aug 21 2020, 8:05 PM

Fix test,,,

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/2490/display/redirect

bb added a subscriber: bb.EditedAug 24 2020, 5:52 PM

Here is what happens:
Note that first the closing animation of the gate has to be shown once, otherwise the bug does not occur (can be tested on fortress random map, by garrisonning a locked gate). This (perfectly normal and wanted!!) closing animation sets unitAnimation (via cmpVisual) to play the animation once. Now when a unit is ejected, we go over UpdateGarrisonFlag in the garrisonHolder, which will reload the animation (this is wanted for the garrison flag ofc, it needs to wave in the wind). But for gates, unitAnimation only knows about the closing anim, and will play that again.

I guess the proper fix is, to let unitAnimation clean up his animation data after a non-looping animation has ended or at least make it not replay the anim on whatever reloading occurs.

Freagarach planned changes to this revision.Aug 24 2020, 6:09 PM

What they said ^ ;)

Freagarach abandoned this revision.Jun 12 2022, 1:08 PM