Unhardcode more sounds

This commit is contained in:
pchote
2010-02-27 17:01:54 +13:00
parent 3a0c7fc274
commit 1d9f5c8362
8 changed files with 44 additions and 21 deletions

View File

@@ -1,4 +1,4 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
* This file is part of OpenRA.
@@ -40,9 +40,10 @@ namespace OpenRa.Traits
public void Damaged(Actor self, AttackInfo e)
{
var eva = self.Owner.PlayerActor.Info.Traits.Get<EvaAlertsInfo>();
if (e.DamageState == DamageState.Dead)
Sound.PlayToPlayer(self.Owner,
self.Info.Traits.Get<OwnedActorInfo>().WaterBound ? "navylst1.aud" : "unitlst1.aud");
self.Info.Traits.Get<OwnedActorInfo>().WaterBound ? eva.NavalUnitLost : eva.UnitLost);
}
}
}