This commit is contained in:
Chris Forbes
2009-11-09 18:08:19 +13:00
parent 5d9b9e037e
commit 831d474f51

View File

@@ -69,6 +69,14 @@ namespace OpenRa.Game
else
orderGenerator = new UnitOrderGenerator(
Game.SelectUnitOrBuilding(Game.CellSize * xy));
var voicedUnit = ((UnitOrderGenerator)orderGenerator).selection
.Select(a => a.traits.GetOrDefault<Mobile>())
.Where(m => m != null && m.self.Owner == Game.LocalPlayer)
.FirstOrDefault();
if (voicedUnit != null)
Game.PlaySound(Game.SovietVoices.Second.GetNext() + GetVoiceSuffix(voicedUnit.self), false);
}
dragStart = dragEnd = xy;