diff --git a/OpenRA.Mods.Common/Projectiles/NukeLaunch.cs b/OpenRA.Mods.Common/Projectiles/NukeLaunch.cs index 274f49b929..8d9ae46eaa 100644 --- a/OpenRA.Mods.Common/Projectiles/NukeLaunch.cs +++ b/OpenRA.Mods.Common/Projectiles/NukeLaunch.cs @@ -19,7 +19,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Effects { - public class NukeLaunch : IProjectile + public class NukeLaunch : IProjectile, ISpatiallyPartitionable { readonly Player firedBy; readonly Animation anim; @@ -64,6 +64,8 @@ namespace OpenRA.Mods.Common.Effects if (skipAscent) ticks = turn; + + firedBy.World.ScreenMap.Add(this, pos, anim.Image); } public void Tick(World world) @@ -81,12 +83,14 @@ namespace OpenRA.Mods.Common.Effects if (ticks == delay) Explode(world); + world.ScreenMap.Update(this, pos, anim.Image); + ticks++; } void Explode(World world) { - world.AddFrameEndTask(w => w.Remove(this)); + world.AddFrameEndTask(w => { w.Remove(this); w.ScreenMap.Remove(this); }); weapon.Impact(Target.FromPos(pos), firedBy.PlayerActor, Enumerable.Empty()); world.WorldActor.Trait().AddEffect(20, pos, 5);