revert(master): the edit mode flag on a private instance

This reverts commit 4cf0909d. Nothing starts an edit mode instance any more. Its two
fixes that had nothing to do with edit mode come back in the next commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-10 18:37:23 -06:00
parent 3526ee2eb0
commit 37cc844562
12 changed files with 14 additions and 68 deletions

View File

@@ -16,12 +16,7 @@ namespace {
uint32_t length{};
VALIDATE_READ(bitStream.Read(length));
value.resize(std::min(length, maxLength));
if (!value.empty() && !bitStream.ReadBits(reinterpret_cast<unsigned char*>(value.data()), BYTES_TO_BITS(value.size()), true)) return false;
const uint32_t rest = length - static_cast<uint32_t>(value.size());
if (rest == 0) return true;
if (BITS_TO_BYTES(bitStream.GetNumberOfUnreadBits()) < rest) return false;
bitStream.IgnoreBits(BYTES_TO_BITS(rest));
return true;
return value.empty() || bitStream.ReadBits(reinterpret_cast<unsigned char*>(value.data()), BYTES_TO_BITS(value.size()), true);
}
}
@@ -152,15 +147,12 @@ namespace MasterPackets {
bitStream.Write(zoneID);
bitStream.Write(cloneID);
BitStreamUtils::WriteLengthPrefixed<uint32_t>(bitStream, password);
if (editMode != 0) bitStream.Write(editMode);
}
bool CreatePrivateZone::Deserialize(RakNet::BitStream& bitStream) {
VALIDATE_READ(bitStream.Read(zoneID));
VALIDATE_READ(bitStream.Read(cloneID));
VALIDATE_READ(ReadCappedString(bitStream, password, MAX_PASSWORD_LENGTH));
editMode = 0;
if (bitStream.GetNumberOfUnreadBits() >= 8) VALIDATE_READ(bitStream.Read(editMode));
return true;
}