remove that thing
This commit is contained in:
parent
d3e73be3fe
commit
1a6880a572
@ -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);
|
||||
|
||||
@ -2,22 +2,23 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#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<Chunk> chunks_pool(1'024);
|
||||
|
||||
std::shared_ptr<Chunk> GlobalChunks::create(int x, int z) {
|
||||
@ -100,12 +98,7 @@ std::shared_ptr<Chunk> GlobalChunks::create(int x, int z) {
|
||||
return found->second;
|
||||
}
|
||||
|
||||
std::shared_ptr<Chunk> chunk;
|
||||
{
|
||||
timeutil::ScopeLogTimer log(555);
|
||||
// chunk = std::make_shared<Chunk>(x, z);
|
||||
chunk = chunks_pool.create(x, z);
|
||||
}
|
||||
auto chunk = chunks_pool.create(x, z);
|
||||
chunksMap[keyfrom(x, z)] = chunk;
|
||||
|
||||
World& world = *level.getWorld();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user