Merge pull request #12634 from GraionDilach/bullet-airburst
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.")]
|
[Desc("Delay in ticks until trail animation is spawned.")]
|
||||||
public readonly int TrailDelay = 1;
|
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.")]
|
[Desc("Palette used to render the trail sequence.")]
|
||||||
[PaletteReference("TrailUsePlayerPalette")] public readonly string TrailPalette = "effect";
|
[PaletteReference("TrailUsePlayerPalette")] public readonly string TrailPalette = "effect";
|
||||||
|
|
||||||
@@ -142,6 +145,9 @@ namespace OpenRA.Mods.Common.Projectiles
|
|||||||
target += WVec.FromPDF(world.SharedRandom, 2) * maxOffset / 1024;
|
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;
|
facing = (target - pos).Yaw.Facing;
|
||||||
length = Math.Max((target - pos).Length / speed.Length, 1);
|
length = Math.Max((target - pos).Length / speed.Length, 1);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user