Avoid initialization of graphical elements for a server.
Avoid allocating memory and resources for graphical elements that will never be drawn when starting a dedicated server. This reduces the server memory footprint by approx 17 MiB.
This commit is contained in:
@@ -300,10 +300,11 @@ namespace OpenRA
|
||||
Sound.StopVideo();
|
||||
Sound.Initialize();
|
||||
|
||||
ModData = new ModData(mod, true);
|
||||
|
||||
Renderer.InitializeFonts(ModData.Manifest);
|
||||
ModData = new ModData(mod, !Settings.Server.Dedicated);
|
||||
ModData.InitializeLoaders();
|
||||
if (!Settings.Server.Dedicated)
|
||||
Renderer.InitializeFonts(ModData.Manifest);
|
||||
|
||||
using (new PerfTimer("LoadMaps"))
|
||||
ModData.MapCache.LoadMaps();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user