diff --git a/OpenRA.Game/Traits/Player/DeveloperMode.cs b/OpenRA.Game/Traits/Player/DeveloperMode.cs index 51b33a0211..fbeed556af 100644 --- a/OpenRA.Game/Traits/Player/DeveloperMode.cs +++ b/OpenRA.Game/Traits/Player/DeveloperMode.cs @@ -84,6 +84,7 @@ namespace OpenRA.Traits case "DevShroudDisable": { DisableShroud ^= true; + self.Owner.Shroud.Disabled = DisableShroud; if (self.World.LocalPlayer == self.Owner) self.World.RenderPlayer = DisableShroud ? null : self.Owner; break; diff --git a/OpenRA.Game/Traits/World/Shroud.cs b/OpenRA.Game/Traits/World/Shroud.cs index 86fb52a6a5..27ab347083 100644 --- a/OpenRA.Game/Traits/World/Shroud.cs +++ b/OpenRA.Game/Traits/World/Shroud.cs @@ -23,6 +23,8 @@ namespace OpenRA.Traits public class Shroud { + [Sync] public bool Disabled = false; + Actor self; Map map; @@ -248,7 +250,7 @@ namespace OpenRA.Traits if (!map.IsInMap(x, y)) return false; - if (!self.World.LobbyInfo.GlobalSettings.Shroud) + if (Disabled || !self.World.LobbyInfo.GlobalSettings.Shroud) return true; return explored[x, y] && (generatedShroudCount[x, y] == 0 || visibleCount[x, y] > 0); @@ -267,7 +269,7 @@ namespace OpenRA.Traits if (x < 0 || x >= map.MapSize.X || y < 0 || y >= map.MapSize.Y) return false; - if (!self.World.LobbyInfo.GlobalSettings.Fog) + if (Disabled || !self.World.LobbyInfo.GlobalSettings.Fog) return true; return visibleCount[x, y] > 0;