Create a PlayLaunchSounds method in SupportPower.cs
This commit is contained in:
@@ -153,14 +153,7 @@ namespace OpenRA.Mods.RA.Traits
|
||||
|
||||
self.World.AddFrameEndTask(w =>
|
||||
{
|
||||
var renderPlayer = self.World.RenderPlayer;
|
||||
var isAllied = self.Owner.IsAlliedWith(renderPlayer);
|
||||
Game.Sound.Play(isAllied ? Info.LaunchSound : Info.IncomingSound);
|
||||
|
||||
// IsAlliedWith returns true if renderPlayer is null, so we are safe here.
|
||||
var toPlayer = isAllied ? renderPlayer ?? self.Owner : renderPlayer;
|
||||
var speech = isAllied ? Info.LaunchSpeechNotification : Info.IncomingSpeechNotification;
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, toPlayer, "Speech", speech, toPlayer.Faction.InternalName);
|
||||
PlayLaunchSounds();
|
||||
|
||||
Actor distanceTestActor = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user