mirror of
https://github.com/CraftyBoss/SuperMarioOdysseyOnline.git
synced 2024-11-28 14:13:04 +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.
22 lines
No EOL
575 B
C
22 lines
No EOL
575 B
C
#pragma once
|
|
|
|
#include "Packet.h"
|
|
#include "al/util.hpp"
|
|
|
|
struct PACKED GameInf : Packet {
|
|
GameInf() : Packet() {this->mType = PacketType::GAMEINF; mPacketSize = sizeof(GameInf) - sizeof(Packet);};
|
|
bool4 is2D = false;
|
|
u8 scenarioNo = -1;
|
|
char stageName[0x40] = {};
|
|
|
|
bool operator==(const GameInf &rhs) const {
|
|
return (
|
|
is2D == rhs.is2D &&
|
|
scenarioNo == rhs.scenarioNo &&
|
|
al::isEqualString(stageName, rhs.stageName)
|
|
);
|
|
}
|
|
|
|
bool operator!=(const GameInf& rhs) const { return !operator==(rhs); }
|
|
|
|
}; |