mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
fix(zone): zone files of version 37 have a u32 scene count
The scene count is a u8 before version 37 (LateAlpha) and a u32 from 37 on (LuzFile::ReadLUZFile, 1.10.64: revision < 37 reads a byte). The reader took the u8 for 37 too, so version 37 files misread from their scenes on and failed. No live zone is version 37; four older LUP zones now read in full. Every other zone file on disk reads the same as before. Check in game: nothing to check on live worlds (none is version 37). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -20,8 +20,9 @@ void ZoneFile::ReadHeader(std::istream& file) {
|
||||
BinaryIO::BinaryRead(file, spawnpointRotation);
|
||||
}
|
||||
|
||||
// A u8 before LateAlpha, a u32 from it on (LuzFile::ReadLUZFile)
|
||||
uint32_t sceneCount = 0;
|
||||
if (fileFormatVersion <= FileFormatVersion::LateAlpha) {
|
||||
if (fileFormatVersion < FileFormatVersion::LateAlpha) {
|
||||
uint8_t count;
|
||||
BinaryIO::BinaryRead(file, count);
|
||||
sceneCount = count;
|
||||
|
||||
Reference in New Issue
Block a user