From 96bd73ae020ecca1f94698744c77498a89ad19f7 Mon Sep 17 00:00:00 2001 From: untodesu Date: Thu, 11 Sep 2025 13:10:52 +0500 Subject: Graft build scripts and buffer code from QFengine --- game/shared/world/voxel_storage.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'game/shared/world') diff --git a/game/shared/world/voxel_storage.cc b/game/shared/world/voxel_storage.cc index e28c34f..68e261c 100644 --- a/game/shared/world/voxel_storage.cc +++ b/game/shared/world/voxel_storage.cc @@ -20,10 +20,10 @@ void world::VoxelStorage::serialize(io::WriteBuffer& buffer) const mz_compress(zdata.data(), &bound, reinterpret_cast(net_storage.data()), sizeof(VoxelStorage)); - buffer.write_UI64(bound); + buffer.write(bound); // Write all the compressed data into the buffer - for(std::size_t i = 0; i < bound; buffer.write_UI8(zdata[i++])) { + for(std::size_t i = 0; i < bound; buffer.write(zdata[i++])) { // empty } } @@ -31,11 +31,11 @@ void world::VoxelStorage::serialize(io::WriteBuffer& buffer) const void world::VoxelStorage::deserialize(io::ReadBuffer& buffer) { auto size = static_cast(sizeof(VoxelStorage)); - auto bound = static_cast(buffer.read_UI64()); + auto bound = static_cast(buffer.read()); auto zdata = std::vector(bound); // Read all the compressed data from the buffer - for(std::size_t i = 0; i < bound; zdata[i++] = buffer.read_UI8()) { + for(std::size_t i = 0; i < bound; zdata[i++] = buffer.read()) { // empty } -- cgit