diff --git a/OpenRA.Mods.RA/Effects/NukeLaunch.cs b/OpenRA.Mods.RA/Effects/NukeLaunch.cs index 973aff753f..bbbf87ec70 100755 --- a/OpenRA.Mods.RA/Effects/NukeLaunch.cs +++ b/OpenRA.Mods.RA/Effects/NukeLaunch.cs @@ -25,7 +25,7 @@ namespace OpenRA.Mods.RA.Effects bool goingUp = true; string weapon; - public NukeLaunch(Actor silo, string weapon, int2 targetLocation) + public NukeLaunch(Actor silo, string weapon, int2 spawnOffset, int2 targetLocation) { this.silo = silo; this.targetLocation = targetLocation; @@ -39,7 +39,7 @@ namespace OpenRA.Mods.RA.Effects StartDescent(Game.world); } else - pos = silo.CenterLocation; + pos = silo.CenterLocation + spawnOffset; } void StartDescent(World world) diff --git a/OpenRA.Mods.RA/SupportPowers/NukePower.cs b/OpenRA.Mods.RA/SupportPowers/NukePower.cs index 38d4844da3..f9dcc007d4 100755 --- a/OpenRA.Mods.RA/SupportPowers/NukePower.cs +++ b/OpenRA.Mods.RA/SupportPowers/NukePower.cs @@ -60,15 +60,20 @@ namespace OpenRA.Mods.RA { [WeaponReference] public readonly string MissileWeapon = ""; - public object Create(ActorInitializer init) { return new NukeSilo(init.self); } + public readonly int2 SpawnOffset = int2.Zero; + + public object Create(ActorInitializer init) { return new NukeSilo(init.self, this); } } class NukeSilo { Actor self; - public NukeSilo(Actor self) + NukeSiloInfo info; + + public NukeSilo(Actor self, NukeSiloInfo info) { this.self = self; + this.info = info; } public void Attack(int2 targetLocation) @@ -78,7 +83,7 @@ namespace OpenRA.Mods.RA self.World.AddFrameEndTask(w => { //FIRE ZE MISSILES - w.Add(new NukeLaunch(self, self.Info.Traits.Get().MissileWeapon, targetLocation)); + w.Add(new NukeLaunch(self, info.MissileWeapon, info.SpawnOffset, targetLocation)); }); } } diff --git a/mods/ra/structures.yaml b/mods/ra/structures.yaml index 362681668a..905211acf7 100644 --- a/mods/ra/structures.yaml +++ b/mods/ra/structures.yaml @@ -2,6 +2,7 @@ MSLO: Category: Defense NukeSilo: MissileWeapon: atomic + SpawnOffset: 10,0 Inherits: ^Building Buildable: BuildPaletteOrder: 130