fixed various sound bugs
This commit is contained in:
@@ -34,7 +34,8 @@ namespace OpenRa.Traits
|
||||
if (order.OrderString == "PowerDown")
|
||||
{
|
||||
IsDisabled = !IsDisabled;
|
||||
Sound.Play((IsDisabled) ? "bleep12.aud" : "bleep11.aud");
|
||||
if (self.Owner == self.World.LocalPlayer)
|
||||
Sound.Play(IsDisabled ? "bleep12.aud" : "bleep11.aud");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,9 @@ namespace OpenRa.Traits
|
||||
}
|
||||
}
|
||||
isPrimary = true;
|
||||
Sound.Play("pribldg1.aud");
|
||||
|
||||
if (self.Owner == self.World.LocalPlayer)
|
||||
Sound.Play("pribldg1.aud");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,9 @@ namespace OpenRa.Traits
|
||||
public void Selling( Actor self )
|
||||
{
|
||||
anim.PlayBackwardsThen( "make", null );
|
||||
Sound.Play("cashturn.aud");
|
||||
|
||||
if (self.Owner == self.World.LocalPlayer)
|
||||
Sound.Play("cashturn.aud");
|
||||
}
|
||||
|
||||
public void Sold(Actor self) { DoBib(self, true); }
|
||||
|
||||
@@ -10,21 +10,28 @@ namespace OpenRa.Traits
|
||||
public override object Create(Actor self) { return new SonarPulsePower(self, this); }
|
||||
}
|
||||
|
||||
public class SonarPulsePower : SupportPower
|
||||
public class SonarPulsePower : SupportPower, IResolveOrder
|
||||
{
|
||||
public SonarPulsePower(Actor self, SonarPulsePowerInfo info) : base(self, info) { }
|
||||
|
||||
protected override void OnBeginCharging() { }
|
||||
protected override void OnFinishCharging() { Sound.Play("pulse1.aud"); }
|
||||
|
||||
protected override void OnActivate()
|
||||
{
|
||||
// Question: Is this method synced? or does it have to go via an order?
|
||||
|
||||
// TODO: Reveal submarines
|
||||
|
||||
// Should this play for all players?
|
||||
Sound.Play("sonpulse.aud");
|
||||
FinishActivate();
|
||||
Game.orderManager.IssueOrder(new Order("SonarPulse", Owner.PlayerActor));
|
||||
}
|
||||
|
||||
public void ResolveOrder(Actor self, Order order)
|
||||
{
|
||||
if (order.OrderString == "SonarPulse")
|
||||
{
|
||||
// TODO: Reveal submarines
|
||||
|
||||
// Should this play for all players?
|
||||
Sound.Play("sonpulse.aud");
|
||||
FinishActivate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user