fix: Updates encoded packet handler to use function pointers (#1066)
This commit is contained in:
parent
f24b98f8e2
commit
057cf87e60
6 changed files with 79 additions and 54 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue