mirror of
https://github.com/rafi1212122/BLHX.Server.git
synced 2025-12-18 09:24:42 +01:00
incomplete sdk server + inferred server address
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BLHX.Server.Game\BLHX.Server.Game.csproj" />
|
||||
<ProjectReference Include="..\BLHX.Server.SDK\BLHX.Server.SDK.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,17 +1,25 @@
|
||||
using BLHX.Server.Common.Utils;
|
||||
using BLHX.Server.Game;
|
||||
using BLHX.Server.Sdk;
|
||||
using System.Net.NetworkInformation;
|
||||
|
||||
namespace BLHX.Server;
|
||||
|
||||
internal class Program
|
||||
{
|
||||
static void Main()
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Logger.c.Log("Starting...");
|
||||
|
||||
Config.Load();
|
||||
if (Config.Instance.Address == "127.0.0.1")
|
||||
{
|
||||
Config.Instance.Address = NetworkInterface.GetAllNetworkInterfaces().Where(i => i.NetworkInterfaceType != NetworkInterfaceType.Loopback && i.OperationalStatus == OperationalStatus.Up).First().GetIPProperties().UnicastAddresses.Where(a => a.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork).First().Address.ToString();
|
||||
Config.Save();
|
||||
}
|
||||
|
||||
Task.Run(GameServer.Start);
|
||||
SDKServer.Main(args);
|
||||
Task.Run(InputSystem.Start).Wait();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user