From 88c01588aa0830e219eaa62588839e4d1e2883ce Mon Sep 17 00:00:00 2001 From: untodesu Date: Wed, 25 Jun 2025 00:44:36 +0500 Subject: Clang-format the entire source code --- game/server/unloader.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'game/server/unloader.cc') diff --git a/game/server/unloader.cc b/game/server/unloader.cc index fd838d0..f986a61 100644 --- a/game/server/unloader.cc +++ b/game/server/unloader.cc @@ -1,13 +1,13 @@ #include "server/pch.hh" + #include "server/unloader.hh" #include "core/config.hh" -#include "shared/chunk_aabb.hh" #include "shared/chunk.hh" +#include "shared/chunk_aabb.hh" #include "shared/dimension.hh" #include "shared/player.hh" -#include "shared/player.hh" #include "shared/transform.hh" #include "server/game.hh" @@ -15,12 +15,12 @@ #include "server/inhabited.hh" #include "server/universe.hh" -static void on_chunk_update(const ChunkUpdateEvent &event) +static void on_chunk_update(const ChunkUpdateEvent& event) { event.dimension->chunks.emplace_or_replace(event.chunk->get_entity()); } -static void on_voxel_set(const VoxelSetEvent &event) +static void on_voxel_set(const VoxelSetEvent& event) { event.dimension->chunks.emplace_or_replace(event.chunk->get_entity()); } @@ -33,10 +33,9 @@ void unloader::init(void) void unloader::init_late(void) { - } -void unloader::fixed_update_late(Dimension *dimension) +void unloader::fixed_update_late(Dimension* dimension) { auto group = dimension->entities.group(entt::get); auto boxes = std::vector(); @@ -47,14 +46,14 @@ void unloader::fixed_update_late(Dimension *dimension) aabb.max = transform.chunk + static_cast(server_game::view_distance.get_value()); boxes.push_back(aabb); } - + auto view = dimension->chunks.view(); auto chunk_in_view = false; for(const auto [entity, chunk] : view.each()) { chunk_in_view = false; - for(const auto &aabb : boxes) { + for(const auto& aabb : boxes) { if(aabb.contains(chunk.cpos)) { chunk_in_view = true; break; -- cgit