From fe63185adf65a8296f918de8f1fc24d534a31aef Mon Sep 17 00:00:00 2001 From: MysterD Date: Sat, 24 Jun 2023 17:49:41 -0700 Subject: [PATCH] Disable 'custom packets', a relic from patches --- src/pc/network/packets/packet_custom.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pc/network/packets/packet_custom.c b/src/pc/network/packets/packet_custom.c index 0a6b1a88..3a92c9a7 100644 --- a/src/pc/network/packets/packet_custom.c +++ b/src/pc/network/packets/packet_custom.c @@ -9,9 +9,11 @@ struct NetworkCustomPacket { }; static u8 onCustomPacketId = 0; -static struct NetworkCustomPacket customPackets[MAX_CUSTOM_PACKETS]; +static struct NetworkCustomPacket customPackets[MAX_CUSTOM_PACKETS] = { 0 }; u8 network_register_custom_packet(void (*send_callback)(struct Packet* p, void* params), void (*receive_callback)(struct Packet* p)) { + // disabled, was for patches + return 0; SOFT_ASSERT_RETURN(onCustomPacketId < MAX_CUSTOM_PACKETS, 0); u8 i = onCustomPacketId; @@ -23,6 +25,8 @@ u8 network_register_custom_packet(void (*send_callback)(struct Packet* p, void* } void network_send_custom(u8 customId, bool reliable, enum PacketLevelMatchType levelAreaMustMatch, void* params) { + // disabled, was for patches + return; if (customPackets[customId].send_callback == NULL) { return; } struct Packet p = { 0 }; @@ -33,6 +37,8 @@ void network_send_custom(u8 customId, bool reliable, enum PacketLevelMatchType l } void network_receive_custom(struct Packet* p) { + // disabled, was for patches + return; u8 customId; packet_read(p, &customId, sizeof(u8)); if (customPackets[customId].receive_callback == NULL) { return; }