From 1a6880a572eb8f5b3df768c0ad892c139f0542ad Mon Sep 17 00:00:00 2001 From: MihailRis Date: Tue, 18 Nov 2025 20:46:24 +0300 Subject: [PATCH] remove that thing --- src/logic/ChunksController.cpp | 4 ---- src/voxels/GlobalChunks.cpp | 23 ++++++++--------------- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/src/logic/ChunksController.cpp b/src/logic/ChunksController.cpp index 692d8705..b521b0d8 100644 --- a/src/logic/ChunksController.cpp +++ b/src/logic/ChunksController.cpp @@ -163,11 +163,7 @@ bool ChunksController::buildLights( return false; } -#include "util/timeutil.hpp" - void ChunksController::createChunk(const Player& player, int x, int z) const { - timeutil::ScopeLogTimer log(111); - if (!player.isLoadingChunks()) { if (auto chunk = level.chunks->fetch(x, z)) { player.chunks->putChunk(chunk); diff --git a/src/voxels/GlobalChunks.cpp b/src/voxels/GlobalChunks.cpp index 58734dc6..438ae6d8 100644 --- a/src/voxels/GlobalChunks.cpp +++ b/src/voxels/GlobalChunks.cpp @@ -2,22 +2,23 @@ #include -#include "content/Content.hpp" +#include "Block.hpp" +#include "Chunk.hpp" #include "coders/json.hpp" +#include "content/Content.hpp" #include "debug/Logger.hpp" -#include "world/files/WorldFiles.hpp" #include "items/Inventories.hpp" #include "lighting/Lightmap.hpp" #include "maths/voxmaths.hpp" #include "objects/Entities.hpp" #include "objects/Entity.hpp" -#include "voxels/blocks_agent.hpp" #include "typedefs.hpp" -#include "world/LevelEvents.hpp" +#include "util/ObjectsPool.hpp" +#include "voxels/blocks_agent.hpp" +#include "world/files/WorldFiles.hpp" #include "world/Level.hpp" +#include "world/LevelEvents.hpp" #include "world/World.hpp" -#include "Block.hpp" -#include "Chunk.hpp" static debug::Logger logger("chunks-storage"); @@ -89,9 +90,6 @@ static inline auto load_inventories( return invs; } -#include "util/timeutil.hpp" -#include "util/ObjectsPool.hpp" - static util::ObjectsPool chunks_pool(1'024); std::shared_ptr GlobalChunks::create(int x, int z) { @@ -100,12 +98,7 @@ std::shared_ptr GlobalChunks::create(int x, int z) { return found->second; } - std::shared_ptr chunk; - { - timeutil::ScopeLogTimer log(555); - // chunk = std::make_shared(x, z); - chunk = chunks_pool.create(x, z); - } + auto chunk = chunks_pool.create(x, z); chunksMap[keyfrom(x, z)] = chunk; World& world = *level.getWorld();