mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
fix(zone): spawner paths have an activate-on-load byte only from version 9
The client reads a spawner path's activateOnLoad byte only when the path is newer than version 8 (LevelPath::FromBuffer, 1.10.64: pathVersion > 8) and otherwise keeps its default of 1 (Path::InitializeSpawnerInfo). The reader read the byte for every version, which would misread an older spawner path from there on, and its default was 0. The byte is now read from version 9, and an older path's spawner is active on load as in the client. No zone file on disk has a spawner path older than version 9, so what the world spawns is unchanged. Check in game: nothing to check (spawners on live worlds are unchanged). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -227,7 +227,7 @@ void ZoneFile::ReadPath(std::istream& file) {
|
||||
BinaryIO::BinaryRead(file, path.spawner.maxToSpawn);
|
||||
BinaryIO::BinaryRead(file, path.spawner.amountMaintained);
|
||||
BinaryIO::BinaryRead(file, path.spawner.spawnerObjID);
|
||||
BinaryIO::BinaryRead(file, path.spawner.spawnerNetActive);
|
||||
if (path.pathVersion >= 9) BinaryIO::BinaryRead(file, path.spawner.spawnerNetActive);
|
||||
}
|
||||
|
||||
// Read waypoints
|
||||
|
||||
@@ -178,7 +178,7 @@ struct SpawnerPath {
|
||||
int32_t maxToSpawn{};
|
||||
uint32_t amountMaintained{};
|
||||
LWOOBJID spawnerObjID;
|
||||
uint8_t spawnerNetActive{};
|
||||
uint8_t spawnerNetActive = 1; // not in paths before version 9; the client then activates it on load
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user