From 83a607e08944deb41c9a0fe1b26f816f0ef7ea59 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Tue, 16 Jul 2019 23:08:40 +0200 Subject: [PATCH] Fix resupply anim continuing if docked actor dies during resupply --- OpenRA.Mods.Common/Traits/Render/WithResupplyAnimation.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenRA.Mods.Common/Traits/Render/WithResupplyAnimation.cs b/OpenRA.Mods.Common/Traits/Render/WithResupplyAnimation.cs index 7aaab3039c..2a97dc4732 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithResupplyAnimation.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithResupplyAnimation.cs @@ -63,6 +63,12 @@ namespace OpenRA.Mods.Common.Traits.Render wsb.CancelCustomAnimation(self); animPlaying = false; } + + // If an actor died before finishing resupply, there will never be a ResupplyTick call + // with ResupplyType.None (as activities tick before ITick), so reset here every tick + // to prevent the animation from continuing after the resupplied actor died. + repairing = false; + rearming = false; } void INotifyResupply.BeforeResupply(Actor self, Actor target, ResupplyType types)