From 8d728a6ce5adc7f770061bafe14a83c0b649050d Mon Sep 17 00:00:00 2001 From: Quentin Bazin Date: Sat, 22 May 2021 15:50:34 +0200 Subject: [PATCH] [ClientChunk] Cleaned useless code. --- source/client/world/ClientChunk.cpp | 9 --------- source/client/world/ClientChunk.hpp | 4 ---- 2 files changed, 13 deletions(-) diff --git a/source/client/world/ClientChunk.cpp b/source/client/world/ClientChunk.cpp index 7d836e2d..0190ff61 100644 --- a/source/client/world/ClientChunk.cpp +++ b/source/client/world/ClientChunk.cpp @@ -35,13 +35,6 @@ u32 ClientChunk::chunkUpdatesPerSec = 0; u32 ClientChunk::chunkUpdateCounter = 0; u64 ClientChunk::chunkUpdateTime = 0; -// bool ClientChunk::isMeshingTime() { -// u32 currentTime = gk::GameClock::getInstance().getTicks(true); -// if (m_lastMeshingTime == 0) -// m_lastMeshingTime = currentTime; -// return (currentTime - m_lastMeshingTime > 1000); // Only one chunk update every second -// } - void ClientChunk::update() { m_lightmap.updateLights(); @@ -60,8 +53,6 @@ void ClientChunk::process() { m_verticesCount = m_builder.buildChunk(*this, m_vbo); ++ClientChunk::chunkUpdateCounter; - - m_lastMeshingTime = gk::GameClock::getInstance().getTicks(true); } } diff --git a/source/client/world/ClientChunk.hpp b/source/client/world/ClientChunk.hpp index e5c9b095..1be399dc 100644 --- a/source/client/world/ClientChunk.hpp +++ b/source/client/world/ClientChunk.hpp @@ -41,8 +41,6 @@ class ClientChunk : public Chunk { ClientChunk(s32 x, s32 y, s32 z, const Dimension &dimension, World &world, TextureAtlas &textureAtlas) : Chunk(x, y, z, world), m_dimension(dimension), m_textureAtlas(textureAtlas), m_builder{textureAtlas} {} - // bool isMeshingTime(); - void update() final; void process() final; @@ -82,8 +80,6 @@ class ClientChunk : public Chunk { bool m_isReadyForMeshing = false; bool m_isTooFar = false; bool m_hasBeenDrawn = false; - - u32 m_lastMeshingTime = 0; }; #endif // CLIENTCHUNK_HPP_