From 4f0a81d670cfa6487a1592ce044341e0ff749619 Mon Sep 17 00:00:00 2001 From: Persson-dev Date: Mon, 28 Jul 2025 14:28:29 +0200 Subject: [PATCH] add PredictComma,d --- include/td/protocol/packet/PacketData.h | 5 +++++ include/td/protocol/packet/Packets.h | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/td/protocol/packet/PacketData.h b/include/td/protocol/packet/PacketData.h index de85032..32b954a 100644 --- a/include/td/protocol/packet/PacketData.h +++ b/include/td/protocol/packet/PacketData.h @@ -43,6 +43,11 @@ struct PlayerLeave { PlayerID m_PlayerId; }; +struct PredictCommand { + std::unique_ptr m_Command; + std::uint16_t m_FrameNumber; +}; + /** Keep alive */ struct KeepAlive { std::uint64_t m_KeepAliveId; diff --git a/include/td/protocol/packet/Packets.h b/include/td/protocol/packet/Packets.h index 544061b..9b2ebd9 100644 --- a/include/td/protocol/packet/Packets.h +++ b/include/td/protocol/packet/Packets.h @@ -27,6 +27,7 @@ enum class PacketID : std::uint8_t { PlayerJoin, PlayerLeave, PlayerLogin, + PredictCommand, WorldHeader, WorldData, }; @@ -51,15 +52,15 @@ using LoggingSuccessPacket = PacketMessage; using PlayerLeavePacket = PacketMessage; using PlayerLoginPacket = PacketMessage; +using PredictCommandPacket = PacketMessage; using WorldHeaderPacket = PacketMessage; using WorldDataPacket = PacketMessage; - } // namespace packets using AllPackets = std::tuple; + packets::PlayerLeavePacket, packets::PlayerLoginPacket, packets::PredictCommandPacket, packets::WorldHeaderPacket, packets::WorldDataPacket>; class PacketHandler : public sp::GenericHandler {};