diff --git a/OpenRA.Mods.Common/Projectiles/Bullet.cs b/OpenRA.Mods.Common/Projectiles/Bullet.cs index 461454e983..c5666d2d88 100644 --- a/OpenRA.Mods.Common/Projectiles/Bullet.cs +++ b/OpenRA.Mods.Common/Projectiles/Bullet.cs @@ -79,6 +79,9 @@ namespace OpenRA.Mods.Common.Projectiles [Desc("Delay in ticks until trail animation is spawned.")] public readonly int TrailDelay = 1; + [Desc("Altitude above terrain below which to explode. Zero effectively deactivates airburst.")] + public readonly WDist AirburstAltitude = WDist.Zero; + [Desc("Palette used to render the trail sequence.")] [PaletteReference("TrailUsePlayerPalette")] public readonly string TrailPalette = "effect"; @@ -142,6 +145,9 @@ namespace OpenRA.Mods.Common.Projectiles target += WVec.FromPDF(world.SharedRandom, 2) * maxOffset / 1024; } + if (info.AirburstAltitude > WDist.Zero) + target += new WVec(WDist.Zero, WDist.Zero, info.AirburstAltitude); + facing = (target - pos).Yaw.Facing; length = Math.Max((target - pos).Length / speed.Length, 1);