/// <summary> /// Starts the server by calling MainLoop in the Server class, after /// setting hellions log directory and loading the properties from the config file. /// </summary> /// <param name="args"></param> private void Start(Object[] args) { try { Server.Properties = new ZeroGravity.Properties(Server.ConfigDir + "GameServer.ini"); m_server = new Server(); Dbg.OutputDir = Server.ConfigDir; Dbg.Initialize(); m_server.MainLoop(); } catch (TypeInitializationException ex) { Console.WriteLine("[FATAL ERROR] REPORT THE FOLLOWING TO GITHUB ISSUES] HES: Could Not Initialize Server! : " + ex.ToString()); } catch (Exception ex) { Console.WriteLine("HES: Server Start Exception: " + ex.Message); } }
public void Load() { Log.Info("Loading Hellion Dedicated..."); var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, AssemblyName); if (!File.Exists(path)) { Log.Fatal("Hellion Dedicated executable not found in: \r\n" + path); return; } Assembly assembly; try { assembly = Assembly.LoadFile(path); } catch (Exception ex) { Log.Fatal(ex, "Hellion Extended Server [ASSEMBLYLOADERROR]"); return; } Log.Debug("Hellion Dedicated Loaded!"); SetupReflection(assembly); Server.Properties = new Properties(Server.ConfigDir + "GameServer.ini"); Dbg.OutputDir = Server.ConfigDir; Dbg.Initialize(); if (InitializeServer()) { var serverInstance = new ServerInstance(this); } }