voicepool to avoid annoying me with the same sound over and over... and units now have a voice assigned.
This commit is contained in:
@@ -18,13 +18,21 @@ namespace OpenRa.Game
|
||||
{
|
||||
this.Unit = unit;
|
||||
this.Destination = destination;
|
||||
}
|
||||
|
||||
string GetVoiceSuffix()
|
||||
{
|
||||
var suffixes = new[] { ".r01", ".r03" };
|
||||
return suffixes[Unit.traits.Get<Traits.Mobile>().Voice];
|
||||
}
|
||||
|
||||
public override void Apply( bool leftMouseButton )
|
||||
{
|
||||
if (leftMouseButton) return;
|
||||
|
||||
if (Game.LocalPlayer == Unit.Owner)
|
||||
Game.PlaySound("ackno.r00", false);
|
||||
Game.PlaySound(Game.SovietVoices.First.GetNext() + GetVoiceSuffix(), false);
|
||||
|
||||
var mobile = Unit.traits.Get<Traits.Mobile>();
|
||||
mobile.destination = Destination;
|
||||
mobile.desiredFacing = null;
|
||||
|
||||
Reference in New Issue
Block a user