This commit is contained in:
Louvenarde 2026-08-22 00:19:32 +02:00
parent a05221dcf1
commit 66fa2a288f
2 changed files with 5 additions and 7 deletions

View file

@ -203,8 +203,8 @@ add_library(
"proxy/lan.h"
"shared/offline_persistence.cpp"
"shared/offline_persistence.h"
"engine/custom_packet_handler.cpp"
"engine/custom_packet_handler.h"
"engine/custom_packet_handler.cpp"
"engine/custom_packet_handler.h"
)
target_link_libraries(

View file

@ -4,16 +4,14 @@ struct CustomPacketHandler
{
typedef void (*CustomPacketHandlerType)(void* packetHandler, struct netpacket_s* packet, OUT bool& runOriginalHandler);
public:
bool RegisterPacketHandler(uint8_t controller, CustomPacketHandlerType handler);
CustomPacketHandler();
private:
static bool (*o_pHandlePacket)(void* packetHandler, netpacket_s* packet);
static bool h_HandlePacket(void* packetHandler, netpacket_s* packet);
private:
static bool (*o_pHandlePacket)(void* packetHandler, netpacket_s* packet);
static bool h_HandlePacket(void* packetHandler, netpacket_s* packet);
std::unordered_map<uint8_t, CustomPacketHandlerType> customHandlers {};
};