play launch / incoming sounds in air strike power, too

This commit is contained in:
Matthias Mailänder
2013-08-20 19:20:46 +02:00
parent 615ac2504a
commit b2d37ba754

View File

@@ -30,12 +30,19 @@ namespace OpenRA.Mods.RA
class AirstrikePower : SupportPower
{
public AirstrikePower(Actor self, AirstrikePowerInfo info) : base(self, info) { }
public override void Activate(Actor self, Order order)
{
var startPos = self.World.ChooseRandomEdgeCell();
self.World.AddFrameEndTask(w =>
{
var info = (Info as AirstrikePowerInfo);
if (self.Owner.IsAlliedWith(self.World.RenderPlayer))
Sound.Play(Info.LaunchSound);
else
Sound.Play(Info.IncomingSound);
var flare = info.FlareType != null ? w.CreateActor(info.FlareType, new TypeDictionary
{
new LocationInit( order.TargetLocation ),