Remove "Show Shellmap" setting.
This commit is contained in:
@@ -533,38 +533,32 @@ namespace OpenRA
|
||||
if (world == null)
|
||||
return;
|
||||
|
||||
// Don't tick when the shellmap is disabled
|
||||
if (world.ShouldTick)
|
||||
var isNetTick = LocalTick % NetTickScale == 0;
|
||||
|
||||
if (!isNetTick || orderManager.IsReadyForNextFrame)
|
||||
{
|
||||
var isNetTick = LocalTick % NetTickScale == 0;
|
||||
++orderManager.LocalFrameNumber;
|
||||
|
||||
if (!isNetTick || orderManager.IsReadyForNextFrame)
|
||||
Log.Write("debug", "--Tick: {0} ({1})", LocalTick, isNetTick ? "net" : "local");
|
||||
|
||||
if (BenchmarkMode)
|
||||
Log.Write("cpu", "{0};{1}".F(LocalTick, PerfHistory.Items["tick_time"].LastValue));
|
||||
|
||||
if (isNetTick)
|
||||
orderManager.Tick();
|
||||
|
||||
Sync.CheckSyncUnchanged(world, () =>
|
||||
{
|
||||
++orderManager.LocalFrameNumber;
|
||||
world.OrderGenerator.Tick(world);
|
||||
world.Selection.Tick(world);
|
||||
});
|
||||
|
||||
Log.Write("debug", "--Tick: {0} ({1})", LocalTick, isNetTick ? "net" : "local");
|
||||
world.Tick();
|
||||
|
||||
if (BenchmarkMode)
|
||||
Log.Write("cpu", "{0};{1}".F(LocalTick, PerfHistory.Items["tick_time"].LastValue));
|
||||
|
||||
if (isNetTick)
|
||||
orderManager.Tick();
|
||||
|
||||
Sync.CheckSyncUnchanged(world, () =>
|
||||
{
|
||||
world.OrderGenerator.Tick(world);
|
||||
world.Selection.Tick(world);
|
||||
});
|
||||
|
||||
world.Tick();
|
||||
|
||||
PerfHistory.Tick();
|
||||
}
|
||||
else if (orderManager.NetFrameNumber == 0)
|
||||
orderManager.LastTickTime = RunTime;
|
||||
}
|
||||
else
|
||||
PerfHistory.Tick();
|
||||
}
|
||||
else if (orderManager.NetFrameNumber == 0)
|
||||
orderManager.LastTickTime = RunTime;
|
||||
|
||||
// Wait until we have done our first world Tick before TickRendering
|
||||
if (orderManager.LocalFrameNumber > 0)
|
||||
|
||||
@@ -132,9 +132,6 @@ namespace OpenRA.Graphics
|
||||
|
||||
RefreshPalette();
|
||||
|
||||
if (World.Type == WorldType.Shellmap && !Game.Settings.Game.ShowShellmap)
|
||||
return;
|
||||
|
||||
var renderables = GenerateRenderables();
|
||||
var bounds = Viewport.GetScissorBounds(World.Type != WorldType.Editor);
|
||||
Game.Renderer.EnableScissor(bounds);
|
||||
|
||||
@@ -158,8 +158,6 @@ namespace OpenRA
|
||||
|
||||
public string Platform = "Default";
|
||||
|
||||
public bool ShowShellmap = true;
|
||||
|
||||
public bool ViewportEdgeScroll = true;
|
||||
public bool LockMouseWindow = false;
|
||||
public MouseScrollType MiddleMouseScroll = MouseScrollType.Standard;
|
||||
|
||||
@@ -307,7 +307,6 @@ namespace OpenRA
|
||||
public event Action<Actor> ActorAdded = _ => { };
|
||||
public event Action<Actor> ActorRemoved = _ => { };
|
||||
|
||||
public bool ShouldTick { get { return Type != WorldType.Shellmap || Game.Settings.Game.ShowShellmap; } }
|
||||
public bool Paused { get; internal set; }
|
||||
public bool PredictedPaused { get; internal set; }
|
||||
public bool PauseStateLocked { get; set; }
|
||||
|
||||
@@ -22,11 +22,8 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
: base(widget, world, modData)
|
||||
{
|
||||
var shellmapDecorations = widget.Get("SHELLMAP_DECORATIONS");
|
||||
shellmapDecorations.IsVisible = () => menuType != MenuType.None && Game.Settings.Game.ShowShellmap;
|
||||
shellmapDecorations.IsVisible = () => menuType != MenuType.None;
|
||||
shellmapDecorations.Get<ImageWidget>("RECBLOCK").IsVisible = () => world.WorldTick / 25 % 2 == 0;
|
||||
|
||||
var shellmapDisabledDecorations = widget.Get("SHELLMAP_DISABLED_DECORATIONS");
|
||||
shellmapDisabledDecorations.IsVisible = () => !Game.Settings.Game.ShowShellmap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +154,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
BindCheckboxPref(panel, "PIXELDOUBLE_CHECKBOX", ds, "PixelDouble");
|
||||
BindCheckboxPref(panel, "CURSORDOUBLE_CHECKBOX", ds, "CursorDouble");
|
||||
BindCheckboxPref(panel, "FRAME_LIMIT_CHECKBOX", ds, "CapFramerate");
|
||||
BindCheckboxPref(panel, "SHOW_SHELLMAP", gs, "ShowShellmap");
|
||||
BindCheckboxPref(panel, "DISPLAY_TARGET_LINES_CHECKBOX", gs, "DrawTargetLine");
|
||||
BindCheckboxPref(panel, "PLAYER_STANCE_COLORS_CHECKBOX", gs, "UsePlayerStanceColors");
|
||||
|
||||
@@ -278,15 +277,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
Action ResetDisplayPanel(Widget panel)
|
||||
{
|
||||
var ds = Game.Settings.Graphics;
|
||||
var gs = Game.Settings.Game;
|
||||
var ps = Game.Settings.Player;
|
||||
var dds = new GraphicSettings();
|
||||
var dgs = new GameSettings();
|
||||
var dps = new PlayerSettings();
|
||||
return () =>
|
||||
{
|
||||
gs.ShowShellmap = dgs.ShowShellmap;
|
||||
|
||||
ds.CapFramerate = dds.CapFramerate;
|
||||
ds.MaxFramerate = dds.MaxFramerate;
|
||||
ds.Language = dds.Language;
|
||||
|
||||
@@ -30,6 +30,7 @@ Container@MENU_BACKGROUND:
|
||||
ImageCollection: shellmapbits
|
||||
ImageName: record
|
||||
Container@SHELLMAP_DISABLED_DECORATIONS:
|
||||
Visible: false
|
||||
Children:
|
||||
Image@NOD:
|
||||
X: WINDOW_RIGHT/2-384
|
||||
|
||||
@@ -152,28 +152,21 @@ Container@SETTINGS_PANEL:
|
||||
Height: 20
|
||||
Font: Regular
|
||||
Text: Player Stance Colors
|
||||
Checkbox@SHOW_SHELLMAP:
|
||||
X: 15
|
||||
Y: 185
|
||||
Width: 200
|
||||
Height: 20
|
||||
Font: Regular
|
||||
Text: Show Shellmap
|
||||
Label@PLAYER:
|
||||
Text: Player:
|
||||
X: 15
|
||||
Y: 225
|
||||
Y: 195
|
||||
TextField@PLAYERNAME:
|
||||
Text: Name
|
||||
X: 65
|
||||
Y: 215
|
||||
Y: 185
|
||||
Width: 145
|
||||
Height: 25
|
||||
MaxLength: 16
|
||||
ColorPreviewManager@COLOR_MANAGER:
|
||||
DropDownButton@PLAYERCOLOR:
|
||||
X: 215
|
||||
Y: 215
|
||||
Y: 185
|
||||
Width: 70
|
||||
Height: 25
|
||||
IgnoreChildMouseOver: true
|
||||
|
||||
@@ -165,28 +165,21 @@ Background@SETTINGS_PANEL:
|
||||
Height: 20
|
||||
Font: Regular
|
||||
Text: Player Stance Colors
|
||||
Checkbox@SHOW_SHELLMAP:
|
||||
X: 15
|
||||
Y: 195
|
||||
Width: 200
|
||||
Height: 20
|
||||
Font: Regular
|
||||
Text: Show Shellmap
|
||||
Label@PLAYER:
|
||||
Text: Player:
|
||||
X: 15
|
||||
Y: 240
|
||||
Y: 205
|
||||
TextField@PLAYERNAME:
|
||||
Text: Name
|
||||
X: 65
|
||||
Y: 230
|
||||
Y: 195
|
||||
Width: 145
|
||||
Height: 25
|
||||
MaxLength: 16
|
||||
ColorPreviewManager@COLOR_MANAGER:
|
||||
DropDownButton@PLAYERCOLOR:
|
||||
X: 215
|
||||
Y: 230
|
||||
Y: 195
|
||||
Width: 70
|
||||
Height: 25
|
||||
IgnoreChildMouseOver: true
|
||||
|
||||
Reference in New Issue
Block a user