mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-06 21:03:44 +00:00
fix(zone): adjust path values as the client does while reading them
LevelPath::FromBuffer (1.10.64) changes two values as it reads a path: - a property path's reputation multiplier outside 0-1000 becomes 0; - a camera waypoint's FOV in a path older than version 11 is divided by 1.25. The reader kept both as written. Only camera paths of older client files (versions 8-10) change; no live zone has either case. Check in game: nothing to check (no live zone changes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -279,6 +279,8 @@ bool ZoneFile::ReadPath(std::istream& file) {
|
||||
if (path.pathVersion >= 7) {
|
||||
BinaryIO::BinaryRead(file, path.property.cloneLimit);
|
||||
BinaryIO::BinaryRead(file, path.property.repMultiplier);
|
||||
// The client takes a multiplier outside 0-1000 as 0 (LevelPath::FromBuffer)
|
||||
if (path.property.repMultiplier < 0.0f || path.property.repMultiplier > 1000.0f) path.property.repMultiplier = 0.0f;
|
||||
BinaryIO::BinaryRead(file, path.property.rentalPeriod);
|
||||
}
|
||||
|
||||
@@ -346,6 +348,8 @@ bool ZoneFile::ReadPath(std::istream& file) {
|
||||
} else if (path.pathType == PathType::Camera) {
|
||||
BinaryIO::BinaryRead(file, waypoint.camera.time);
|
||||
BinaryIO::BinaryRead(file, waypoint.camera.fov);
|
||||
// Before version 11 the file's FOV is 1.25 times the one the client uses (LevelPath::FromBuffer)
|
||||
if (path.pathVersion < 11) waypoint.camera.fov /= 1.25f;
|
||||
BinaryIO::BinaryRead(file, waypoint.camera.tension);
|
||||
BinaryIO::BinaryRead(file, waypoint.camera.continuity);
|
||||
BinaryIO::BinaryRead(file, waypoint.camera.bias);
|
||||
|
||||
Reference in New Issue
Block a user