mirror of
https://github.com/CraftyBoss/SuperMarioOdysseyOnline.git
synced 2024-11-22 11:15:15 +00:00
9227e37623
- sizeof(bool) is implementation defined. The server assumes it's 4 but for me it was 1 (tested with Release too) which caused some bugs - Structs aren't guaranteed to be packed. The compiler is free to change the layout, which we wouldn't want to for the Packet structs that we deserialize on the server.
15 lines
No EOL
513 B
C
15 lines
No EOL
513 B
C
#pragma once
|
|
|
|
#include "Packet.h"
|
|
|
|
struct PACKED CostumeInf : Packet {
|
|
CostumeInf() : Packet() {this->mType = PacketType::COSTUMEINF; mPacketSize = sizeof(CostumeInf) - sizeof(Packet);};
|
|
CostumeInf(const char* body, const char* cap) : Packet() {
|
|
this->mType = PacketType::COSTUMEINF;
|
|
mPacketSize = sizeof(CostumeInf) - sizeof(Packet);
|
|
strcpy(bodyModel, body);
|
|
strcpy(capModel, cap);
|
|
}
|
|
char bodyModel[COSTUMEBUFSIZE] = {};
|
|
char capModel[COSTUMEBUFSIZE] = {};
|
|
}; |