From d26558da120478204b60ea817333953212124c35 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sat, 12 Dec 2009 21:20:18 +1300 Subject: [PATCH] fixed bug where silent weapons (e.g. grenade) would crash trying to load '.aud' --- OpenRa.Game/Effects/Bullet.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRa.Game/Effects/Bullet.cs b/OpenRa.Game/Effects/Bullet.cs index 784795b346..fab47ac7ac 100644 --- a/OpenRa.Game/Effects/Bullet.cs +++ b/OpenRa.Game/Effects/Bullet.cs @@ -51,7 +51,8 @@ namespace OpenRa.Game.Effects public void Tick() { if (t == 0) - Sound.Play(Weapon.Report + ".aud"); + if (!string.IsNullOrEmpty(Weapon.Report)) + Sound.Play(Weapon.Report + ".aud"); t += 40;