Added: Dedicated server support
Added: The ability to not render anything when using the client as a dedicated server Added: The basic server extension (NullServerExtension) Exposed: Made some fields public, so that the server extension can access it
This commit is contained in:
@@ -26,6 +26,13 @@ namespace OpenRA.GameRules
|
||||
public bool AdvertiseOnline = true;
|
||||
public string MasterServer = "http://master.open-ra.org/";
|
||||
public bool AllowCheats = false;
|
||||
public string ExtensionDll = "";
|
||||
public string ExtensionClass = "";
|
||||
|
||||
/* not storeable */
|
||||
public IServerExtension Extension { get; set; }
|
||||
public string ExtensionYaml { get; set; }
|
||||
public bool IsDedicated { get; set; }
|
||||
}
|
||||
|
||||
public class DebugSettings
|
||||
@@ -34,13 +41,16 @@ namespace OpenRA.GameRules
|
||||
public bool RecordSyncReports = true;
|
||||
public float LongTickThreshold = 0.001f;
|
||||
}
|
||||
|
||||
|
||||
public class GraphicSettings
|
||||
{
|
||||
public WindowMode Mode = WindowMode.PseudoFullscreen;
|
||||
public int2 FullscreenSize = new int2(Screen.PrimaryScreen.Bounds.Width,Screen.PrimaryScreen.Bounds.Height);
|
||||
public int2 WindowedSize = new int2(1024,768);
|
||||
public int2 FullscreenSize = new int2(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
|
||||
public int2 WindowedSize = new int2(1024, 768);
|
||||
public readonly int2 MinResolution = new int2(800, 600);
|
||||
public readonly string RenderEngine = "OpenRA.Gl.dll";
|
||||
public readonly string NullRenderEngine = "OpenRA.Renderer.Null.dll";
|
||||
public bool UseNullRenderer { get; set; }
|
||||
}
|
||||
|
||||
public class SoundSettings
|
||||
@@ -103,6 +113,11 @@ namespace OpenRA.GameRules
|
||||
{"Debug", Debug}
|
||||
};
|
||||
|
||||
// Should we run in dedicated mode (use the server extension)
|
||||
Server.IsDedicated = args.GetValue("Server.IsDedicated", false);
|
||||
if (Server.IsDedicated)
|
||||
Graphics.UseNullRenderer = args.GetValue("Graphics.UseNullRenderer", false);
|
||||
|
||||
// Override fieldloader to ignore invalid entries
|
||||
var err1 = FieldLoader.UnknownFieldAction;
|
||||
var err2 = FieldLoader.InvalidValueAction;
|
||||
|
||||
Reference in New Issue
Block a user