Add DetonationAltitude to NukePower

And RemoveMissileOnDetonation boolean.

Allows airburst, and optionally missile continuing
until it hits the ground (without a second explosion).
This commit is contained in:
reaperrr
2019-03-29 17:02:10 +01:00
committed by Paul Chote
parent 2648764ee3
commit 9e91232ca7
2 changed files with 30 additions and 8 deletions

View File

@@ -35,6 +35,13 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Offset from the actor the missile spawns on.")]
public readonly WVec SpawnOffset = WVec.Zero;
[Desc("Altitude offset from the target position at which the warhead should detonate.")]
public readonly WDist DetonationAltitude = WDist.Zero;
[Desc("Should nuke missile projectile be removed on detonation above ground.",
"'False' will make the missile continue until it hits the ground and disappears (without triggering another explosion).")]
public readonly bool RemoveMissileOnDetonation = true;
[Desc("Palette to use for the missile weapon image.")]
[PaletteReference("IsPlayerPalette")] public readonly string MissilePalette = "effect";
@@ -133,7 +140,7 @@ namespace OpenRA.Mods.Common.Traits
var palette = info.IsPlayerPalette ? info.MissilePalette + self.Owner.InternalName : info.MissilePalette;
var missile = new NukeLaunch(self.Owner, info.MissileWeapon, info.WeaponInfo, palette, info.MissileUp, info.MissileDown,
self.CenterPosition + body.LocalToWorld(info.SpawnOffset),
targetPosition,
targetPosition, info.DetonationAltitude, info.RemoveMissileOnDetonation,
info.FlightVelocity, info.MissileDelay, info.FlightDelay, info.SkipAscent,
info.FlashType,
info.TrailImage, info.TrailSequences, info.TrailPalette, info.TrailUsePlayerPalette, info.TrailDelay, info.TrailInterval);