]> git.localhorst.tv Git - blank.git/blobdiff - src/net/Packet.hpp
add packet for merging player state back to client
[blank.git] / src / net / Packet.hpp
index 232d0be9900d880995c90e77339491ea1194319e..c4a8ae350299ff111abfcd47cf5228e09679eb9e 100644 (file)
@@ -139,6 +139,16 @@ struct Packet {
                void ReadEntityState(EntityState &, std::uint32_t) const noexcept;
        };
 
+       struct PlayerCorrection : public Payload {
+               static constexpr std::uint8_t TYPE = 8;
+               static constexpr std::size_t MAX_LEN = 66;
+
+               void WritePacketSeq(std::uint16_t) noexcept;
+               void ReadPacketSeq(std::uint16_t &) const noexcept;
+               void WritePlayer(const Entity &) noexcept;
+               void ReadPlayerState(EntityState &) const noexcept;
+       };
+
 
        template<class PayloadType>
        PayloadType As() {