Restore radar enable/disable sounds.
This commit is contained in:
@@ -135,6 +135,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
return Color.LimeGreen;
|
||||
};
|
||||
|
||||
var cachedRadarActive = false;
|
||||
var sidebarTicker = playerWidgets.Get<LogicTickerWidget>("SIDEBAR_TICKER");
|
||||
sidebarTicker.OnTick = () =>
|
||||
{
|
||||
@@ -142,6 +143,10 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
radarActive = world.ActorsWithTrait<ProvidesRadar>()
|
||||
.Any(a => a.Actor.Owner == world.LocalPlayer && a.Trait.IsActive);
|
||||
|
||||
if (radarActive != cachedRadarActive)
|
||||
Sound.PlayNotification(null, "Sounds", (radarActive ? "RadarUp" : "RadarDown"), null);
|
||||
cachedRadarActive = radarActive;
|
||||
|
||||
// Switch to observer mode after win/loss
|
||||
if (world.LocalPlayer.WinState != WinState.Undefined)
|
||||
Game.RunAfterTick(() =>
|
||||
|
||||
Reference in New Issue
Block a user