Changes shroud lobby setting from disabling shroud to revealing it.
This commit is contained in:
@@ -282,7 +282,7 @@ namespace OpenRA.Traits
|
||||
return explored.Contains(uv) && explored[uv] && (generatedShroudCount[uv] == 0 || visibleCount[uv] > 0);
|
||||
}
|
||||
|
||||
public bool ShroudEnabled { get { return !Disabled && self.World.LobbyInfo.GlobalSettings.Shroud; } }
|
||||
public bool ShroudEnabled { get { return !Disabled; } }
|
||||
|
||||
/// <summary>
|
||||
/// Returns a fast exploration lookup that skips the usual validation.
|
||||
|
||||
@@ -180,6 +180,10 @@ namespace OpenRA
|
||||
MapUid = Map.Uid,
|
||||
MapTitle = Map.Title
|
||||
};
|
||||
|
||||
if (!LobbyInfo.GlobalSettings.Shroud)
|
||||
foreach (var player in Players)
|
||||
player.Shroud.ExploreAll(this);
|
||||
}
|
||||
|
||||
public void LoadComplete(WorldRenderer wr)
|
||||
|
||||
@@ -30,7 +30,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
static readonly PPos[] NoCells = { };
|
||||
|
||||
readonly RevealsShroudInfo info;
|
||||
readonly bool lobbyShroudFogDisabled;
|
||||
[Sync] CPos cachedLocation;
|
||||
[Sync] bool cachedDisabled;
|
||||
|
||||
@@ -41,7 +40,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public RevealsShroud(Actor self, RevealsShroudInfo info)
|
||||
{
|
||||
this.info = info;
|
||||
lobbyShroudFogDisabled = !self.World.LobbyInfo.GlobalSettings.Shroud && !self.World.LobbyInfo.GlobalSettings.Fog;
|
||||
|
||||
addCellsToPlayerShroud = (p, uv) => p.Shroud.AddProjectedVisibility(self, uv);
|
||||
removeCellsFromPlayerShroud = p => p.Shroud.RemoveVisibility(self);
|
||||
@@ -66,7 +64,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public void Tick(Actor self)
|
||||
{
|
||||
if (lobbyShroudFogDisabled || !self.IsInWorld)
|
||||
if (!self.IsInWorld)
|
||||
return;
|
||||
|
||||
var centerPosition = self.CenterPosition;
|
||||
|
||||
Reference in New Issue
Block a user