Hahaha il manquait les ChunkMods dans netprot :finnadie:

This commit is contained in:
MarcEricMartel
2023-12-02 10:04:18 -05:00
parent c44d1453ae
commit 20eb410b08
5 changed files with 76 additions and 3 deletions

View File

@@ -130,6 +130,11 @@ namespace netprot {
Chat(Chat* cha) : src_id(cha->src_id), dest_id(cha->dest_id), dest_team_id(cha->dest_team_id) { strcpy(cha->mess, mess); }
};
struct ChunkMod {
Vector3f pos;
BlockType b_type;
};
struct ErrorLog { // srv -> cli TCP event
char mess[140];
bool is_fatal;
@@ -147,6 +152,7 @@ namespace netprot {
void Serialize(PlayerInfo* pinfo, char* buf[], uint32_t* buflen); // srv
void Serialize(GameInfo* ginfo, char* buf[], uint32_t* buflen); // cli/srv
void Serialize(Chat* chat, char* buf[], uint32_t* buflen); // cli/srv
void Serialize(ChunkMod* chmod, char* buf[], uint32_t* buflen); // srv
void Serialize(ErrorLog* errlog, char* buf[], uint32_t* buflen); // srv
bool Deserialize(Input* in, char* buf, uint32_t* buflen); // srv
@@ -157,6 +163,7 @@ namespace netprot {
bool Deserialize(PlayerInfo* pinfo, char* buf, uint32_t* buflen); // cli
bool Deserialize(GameInfo* ginfo, char* buf, uint32_t* buflen); // cli
bool Deserialize(Chat* chat, char* buf, uint32_t* buflen); // srv/cli
bool Deserialize(ChunkMod* chmod, char* buf, uint32_t* buflen); // cli
bool Deserialize(ErrorLog* errlog, char* buf, uint32_t* buflen); // srv
PACKET_TYPE getType(char* buf, uint32_t buflen);