fix: Updates encoded packet handler to use function pointers (#1066)

This commit is contained in:
Kamron Batman 2022-06-15 17:20:36 -07:00 committed by GitHub
parent f24b98f8e2
commit 057cf87e60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 79 additions and 54 deletions

View file

@ -35,7 +35,9 @@ public static class IncomingPackets
public static PacketHandler GetHandler(int packetID) => Handlers[packetID];
public static void RegisterEncoded(int packetID, bool ingame, OnEncodedPacketReceive onReceive)
public static unsafe void RegisterEncoded(
int packetID, bool ingame, delegate*<NetState, IEntity, EncodedReader, void> onReceive
)
{
if (packetID is >= 0 and < 0x100)
{