diff --git a/OpenRA.Mods.Common/Traits/Render/WithCrateBody.cs b/OpenRA.Mods.Common/Traits/Render/WithCrateBody.cs index cdaa033580..45cdc4e63c 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithCrateBody.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithCrateBody.cs @@ -37,7 +37,7 @@ namespace OpenRA.Mods.Common.Traits } } - class WithCrateBody : INotifyParachuteLanded + class WithCrateBody : INotifyParachuteLanded, INotifyAddedToWorld { readonly Actor self; readonly Animation anim; @@ -57,7 +57,21 @@ namespace OpenRA.Mods.Common.Traits rs.Add(anim); } - public void OnLanded() + void INotifyAddedToWorld.AddedToWorld(Actor self) + { + // Don't change animations while still in air + if (!self.IsAtGroundLevel()) + return; + + PlaySequence(); + } + + void INotifyParachuteLanded.OnLanded() + { + PlaySequence(); + } + + void PlaySequence() { var sequence = self.World.Map.GetTerrainInfo(self.Location).IsWater ? info.WaterSequence : info.LandSequence; if (!string.IsNullOrEmpty(sequence))