mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-12 18:38:10 +00:00
Change LUBitstream to make more sense and only read what it needs from the bitstream at each level
This commit is contained in:
@@ -47,16 +47,16 @@ struct LUWString {
|
||||
};
|
||||
|
||||
struct LUBitStream {
|
||||
ServiceType connectionType = ServiceType::UNKNOWN;
|
||||
uint32_t internalPacketID = 0xFFFFFFFF;
|
||||
// Common header data that is serialized
|
||||
MessageID rakNetID = ID_USER_PACKET_ENUM;
|
||||
ServiceType serviceType = ServiceType::UNKNOWN;
|
||||
|
||||
SystemAddress sysAddr = UNASSIGNED_SYSTEM_ADDRESS;
|
||||
|
||||
LUBitStream() = default;
|
||||
|
||||
template <typename T>
|
||||
LUBitStream(ServiceType connectionType, T internalPacketID) {
|
||||
this->connectionType = connectionType;
|
||||
this->internalPacketID = static_cast<uint32_t>(internalPacketID);
|
||||
LUBitStream(ServiceType serviceType) {
|
||||
this->serviceType = serviceType;
|
||||
}
|
||||
|
||||
void WriteHeader(RakNet::BitStream& bitStream) const;
|
||||
|
Reference in New Issue
Block a user