fix: Replaces throttlers and packet callbacks with function pointers (#1063)
Replaces multi-cast delegates with function pointers to gain 25% in performance and lower allocations.
This commit is contained in:
parent
b779d7737f
commit
f24b98f8e2
31 changed files with 189 additions and 172 deletions
|
|
@ -19,12 +19,12 @@ public static class IncomingEntityPackets
|
|||
{
|
||||
public static bool SingleClickProps { get; set; }
|
||||
|
||||
public static void Configure()
|
||||
public static unsafe void Configure()
|
||||
{
|
||||
IncomingPackets.Register(0x06, 5, true, UseReq);
|
||||
IncomingPackets.Register(0x09, 5, true, LookReq);
|
||||
IncomingPackets.Register(0xB6, 9, true, ObjectHelpRequest);
|
||||
IncomingPackets.Register(0xD6, 0, true, BatchQueryProperties);
|
||||
IncomingPackets.Register(0x06, 5, true, &UseReq);
|
||||
IncomingPackets.Register(0x09, 5, true, &LookReq);
|
||||
IncomingPackets.Register(0xB6, 9, true, &ObjectHelpRequest);
|
||||
IncomingPackets.Register(0xD6, 0, true, &BatchQueryProperties);
|
||||
}
|
||||
|
||||
public static void ObjectHelpRequest(NetState state, CircularBufferReader reader, int packetLength)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue