Implement airburst support to Bullet.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user