From 7d1f7670b9626c2904ad28e9942f393ce5109a3a Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Thu, 22 Oct 2009 23:48:19 +1300 Subject: [PATCH] unit lost sound when local player's units die --- OpenRa.Game/Actor.cs | 3 +++ OpenRa.Game/Game.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenRa.Game/Actor.cs b/OpenRa.Game/Actor.cs index 86c3e095f9..15ab9a168c 100755 --- a/OpenRa.Game/Actor.cs +++ b/OpenRa.Game/Actor.cs @@ -98,6 +98,9 @@ namespace OpenRa.Game Game.world.AddFrameEndTask(w => w.Remove(this)); + if (Owner == Game.LocalPlayer) + Game.PlaySound("unitlst1.aud", false); + /* todo: explosion */ } } diff --git a/OpenRa.Game/Game.cs b/OpenRa.Game/Game.cs index 774edf2bc6..da37156139 100644 --- a/OpenRa.Game/Game.cs +++ b/OpenRa.Game/Game.cs @@ -23,7 +23,7 @@ namespace OpenRa.Game public static WorldRenderer worldRenderer; public static Controller controller; - static int localPlayerIndex = 0; + static int localPlayerIndex = 1; public static Dictionary players = new Dictionary();