18 void Serialize(uint8_t * buffer)
const override;
20 uint32_t
Size()
const override;
24 std::shared_ptr<IPacket>
Clone()
const override;
33 glm::ivec3 m_chunk_pos;
Definition: ChunkUnloadPacket.hpp:7
std::shared_ptr< IPacket > Clone() const override
Create a new instance of the packet.
Definition: ChunkUnloadPacket.cpp:80
void Deserialize(const uint8_t *buffer) override
read the packet from the buffer, the buffer must at least be of size Size()
Definition: ChunkUnloadPacket.cpp:57
void SetChunkPosition(const glm::ivec3 &chunk_position)
Definition: ChunkUnloadPacket.cpp:90
glm::ivec3 GetChunkPosition() const
Definition: ChunkUnloadPacket.cpp:85
ChunkUnloadPacket()
Definition: ChunkUnloadPacket.cpp:3
bool HasDynamicSize() const override
Tell if the packet has a dynamic size.
Definition: ChunkUnloadPacket.cpp:70
void Serialize(uint8_t *buffer) const override
will write the packet in the buffer, the buffer must at least be of size Size()
Definition: ChunkUnloadPacket.cpp:47
ChunkUnloadPacket & operator=(const ChunkUnloadPacket &other)
Definition: ChunkUnloadPacket.cpp:27
~ChunkUnloadPacket()
Definition: ChunkUnloadPacket.cpp:13
uint32_t Size() const override
return the size of the packet in bytes, usually used to reserve the right amount of memory in the sen...
Definition: ChunkUnloadPacket.cpp:65
IPacket::Type GetType() const override
Get the Type of the packet.
Definition: ChunkUnloadPacket.cpp:75
an abstract class that servers as a base for all network packets
Definition: IPacket.hpp:40
Type
Definition: IPacket.hpp:48