Skip to content

Commit db70321

Browse files
committed
fix: update editor network to reflect framework changes
1 parent 327c397 commit db70321

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

Intersect.Editor/Core/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static void Main()
5353

5454
var packetTypeRegistry = new PacketTypeRegistry(
5555
loggerFactory.CreateLogger<PacketTypeRegistry>(),
56-
typeof(SharedConstants).Assembly
56+
typeof(IntersectPacket).Assembly
5757
);
5858
if (!packetTypeRegistry.TryRegisterBuiltIn())
5959
{

Intersect.Editor/Networking/Network.cs

+13-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ internal static partial class Network
2626

2727
public static bool ConnectionDenied;
2828

29-
public static ClientNetwork EditorLidgrenNetwork { get; set; }
29+
public static ClientNetwork? EditorLidgrenNetwork
30+
{
31+
get => _editorLidgrenNetwork;
32+
set => _editorLidgrenNetwork = value;
33+
}
3034

3135
internal static PacketHandler PacketHandler { get; private set; }
3236

@@ -90,6 +94,7 @@ public static void InitNetwork()
9094
private static string? _lastHost;
9195
private static int? _lastPort;
9296
private static IPEndPoint? _lastEndpoint;
97+
private static ClientNetwork? _editorLidgrenNetwork;
9398

9499
private static bool TryResolveEndPoint([NotNullWhen(true)] out IPEndPoint? endPoint)
95100
{
@@ -149,7 +154,13 @@ public static void Update()
149154
}
150155
else
151156
{
152-
network.SendUnconnected(serverEndpoint, new ServerStatusRequestPacket());
157+
network.SendUnconnected(
158+
serverEndpoint,
159+
new ServerStatusRequestPacket
160+
{
161+
VersionData = SharedConstants.VersionData,
162+
}
163+
);
153164
Globals.NextServerStatusPing = now + ServerStatusPingInterval;
154165
}
155166
}

0 commit comments

Comments
 (0)