fixed various sound bugs
This commit is contained in:
@@ -34,7 +34,8 @@ namespace OpenRa.Traits
|
|||||||
if (order.OrderString == "PowerDown")
|
if (order.OrderString == "PowerDown")
|
||||||
{
|
{
|
||||||
IsDisabled = !IsDisabled;
|
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;
|
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 )
|
public void Selling( Actor self )
|
||||||
{
|
{
|
||||||
anim.PlayBackwardsThen( "make", null );
|
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); }
|
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 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) { }
|
public SonarPulsePower(Actor self, SonarPulsePowerInfo info) : base(self, info) { }
|
||||||
|
|
||||||
protected override void OnBeginCharging() { }
|
protected override void OnBeginCharging() { }
|
||||||
protected override void OnFinishCharging() { Sound.Play("pulse1.aud"); }
|
protected override void OnFinishCharging() { Sound.Play("pulse1.aud"); }
|
||||||
|
|
||||||
protected override void OnActivate()
|
protected override void OnActivate()
|
||||||
{
|
{
|
||||||
// Question: Is this method synced? or does it have to go via an order?
|
Game.orderManager.IssueOrder(new Order("SonarPulse", Owner.PlayerActor));
|
||||||
|
}
|
||||||
// TODO: Reveal submarines
|
|
||||||
|
public void ResolveOrder(Actor self, Order order)
|
||||||
// Should this play for all players?
|
{
|
||||||
Sound.Play("sonpulse.aud");
|
if (order.OrderString == "SonarPulse")
|
||||||
FinishActivate();
|
{
|
||||||
|
// TODO: Reveal submarines
|
||||||
|
|
||||||
|
// Should this play for all players?
|
||||||
|
Sound.Play("sonpulse.aud");
|
||||||
|
FinishActivate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user