From 2b29636b4fcc84b294b966b86fef39921e76dc33 Mon Sep 17 00:00:00 2001 From: Syntriax Date: Mon, 19 May 2025 23:59:41 +0300 Subject: [PATCH] fix: network manager looking up wrong type of interface to register listeners --- Shared/Network/NetworkManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shared/Network/NetworkManager.cs b/Shared/Network/NetworkManager.cs index 3d1ac1f..11d21df 100644 --- a/Shared/Network/NetworkManager.cs +++ b/Shared/Network/NetworkManager.cs @@ -46,9 +46,9 @@ public class NetworkManager : UniverseObject, INetworkManager private void CacheDelegates() { - // Find network packets implementing EntityDataPacket<> + // Find network packets implementing INetworkPacket IEnumerable packetTypes = AppDomain.CurrentDomain.GetAssemblies().SelectMany(a => a.GetTypes()) - .Where(t => typeof(IEntityNetworkPacket).IsAssignableFrom(t) && !t.IsInterface && !t.IsAbstract && !t.IsGenericType); + .Where(t => typeof(INetworkPacket).IsAssignableFrom(t) && !t.IsInterface && !t.IsAbstract && !t.IsGenericType); MethodInfo onPacketArrivedMethod = GetType() .GetMethod(nameof(OnPacketReceived), BindingFlags.NonPublic | BindingFlags.Instance)!;