Add PlayLaunchSounds() to SupportPowers which are missing it.

This commit is contained in:
Mustafa Alperen Seki
2020-01-31 16:16:58 +03:00
committed by reaperrr
parent 85a5b6cc17
commit 6ab0ace9e1
5 changed files with 5 additions and 3 deletions

View File

@@ -45,6 +45,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override void Activate(Actor self, Order order, SupportPowerManager manager)
{
base.Activate(self, order, manager);
PlayLaunchSounds();
attack.AttackTarget(order.Target, AttackSource.Default, false, false, true);
}

View File

@@ -70,6 +70,7 @@ namespace OpenRA.Mods.Cnc.Traits
public override void Activate(Actor self, Order order, SupportPowerManager manager)
{
base.Activate(self, order, manager);
PlayLaunchSounds();
var info = (ChronoshiftPowerInfo)Info;
var targetDelta = self.World.Map.CellContaining(order.Target.CenterPosition) - order.ExtraLocation;

View File

@@ -79,9 +79,7 @@ namespace OpenRA.Mods.Cnc.Traits
self.World.AddFrameEndTask(w =>
{
Game.Sound.PlayToPlayer(SoundType.World, self.Owner, Info.LaunchSound);
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech",
Info.LaunchSpeechNotification, self.Owner.Faction.InternalName);
PlayLaunchSounds();
w.Add(new SatelliteLaunch(self, info));
});

View File

@@ -68,6 +68,7 @@ namespace OpenRA.Mods.Common.Traits
public override void Activate(Actor self, Order order, SupportPowerManager manager)
{
base.Activate(self, order, manager);
PlayLaunchSounds();
var wsb = self.TraitOrDefault<WithSpriteBody>();
if (wsb != null && wsb.DefaultAnimation.HasSequence(info.Sequence))

View File

@@ -58,6 +58,7 @@ namespace OpenRA.Mods.Common.Traits
public override void Activate(Actor self, Order order, SupportPowerManager manager)
{
base.Activate(self, order, manager);
PlayLaunchSounds();
var info = Info as ProduceActorPowerInfo;
var producers = self.World.ActorsWithTrait<Production>()