Cleaned useless commented code.
This commit is contained in:
parent
8d728a6ce5
commit
e15dbcc6e5
@ -24,7 +24,6 @@
|
||||
*
|
||||
* =====================================================================================
|
||||
*/
|
||||
#include <gk/core/GameClock.hpp>
|
||||
#include <gk/gl/GLCheck.hpp>
|
||||
|
||||
#include "ClientChunk.hpp"
|
||||
|
@ -61,7 +61,7 @@ class ClientChunk : public Chunk {
|
||||
|
||||
bool areAllNeighboursTooFar() const;
|
||||
|
||||
int debugTimesReceived = 0; // FIXME: To remove
|
||||
int debugTimesReceived = 0; // Only used by Minimap
|
||||
|
||||
static u32 chunkUpdatesPerSec;
|
||||
static u32 chunkUpdateCounter;
|
||||
|
@ -223,15 +223,6 @@ BlockData *Chunk::addBlockData(int x, int y, int z, int inventoryWidth, int inve
|
||||
return it->second.get();
|
||||
}
|
||||
|
||||
// bool Chunk::areAllNeighboursLoaded() const {
|
||||
// return m_surroundingChunks[Chunk::West]
|
||||
// && m_surroundingChunks[Chunk::East]
|
||||
// && m_surroundingChunks[Chunk::South]
|
||||
// && m_surroundingChunks[Chunk::North]
|
||||
// && m_surroundingChunks[Chunk::Bottom]
|
||||
// && m_surroundingChunks[Chunk::Top];
|
||||
// }
|
||||
|
||||
bool Chunk::areAllNeighboursInitialized() const {
|
||||
return m_surroundingChunks[Chunk::West] && m_surroundingChunks[Chunk::West]->isInitialized()
|
||||
&& m_surroundingChunks[Chunk::East] && m_surroundingChunks[Chunk::East]->isInitialized()
|
||||
|
@ -86,7 +86,6 @@ class Chunk : public gk::NonCopyable {
|
||||
const Chunk *getSurroundingChunk(u8 i) const { return (i > 5) ? nullptr : m_surroundingChunks[i]; }
|
||||
void setSurroundingChunk(u8 i, Chunk *chunk) { if (i < 6) m_surroundingChunks[i] = chunk; }
|
||||
|
||||
// bool areAllNeighboursLoaded() const;
|
||||
bool areAllNeighboursInitialized() const;
|
||||
|
||||
bool isInitialized() const { return m_isInitialized; }
|
||||
|
@ -298,20 +298,3 @@ bool ChunkLightmap::setTorchlight(int x, int y, int z, u8 val) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// void ChunkLightmap::updateSurroundingChunks(int x, int y, int z) {
|
||||
// auto addSurroundingChunkToUpdate = [this](u8 i) {
|
||||
// Chunk *surroundingChunk = m_chunk->getSurroundingChunk(i);
|
||||
// if (surroundingChunk) {
|
||||
// // surroundingChunk->lightmap().m_hasChanged = true;
|
||||
// m_chunk->world().addChunkToUpdate(surroundingChunk);
|
||||
// }
|
||||
// };
|
||||
//
|
||||
// if(x == 0 ) addSurroundingChunkToUpdate(Chunk::West);
|
||||
// if(x == CHUNK_WIDTH - 1) addSurroundingChunkToUpdate(Chunk::East);
|
||||
// if(y == 0 ) addSurroundingChunkToUpdate(Chunk::Bottom);
|
||||
// if(y == CHUNK_DEPTH - 1) addSurroundingChunkToUpdate(Chunk::Top);
|
||||
// if(z == 0 ) addSurroundingChunkToUpdate(Chunk::South);
|
||||
// if(z == CHUNK_HEIGHT - 1) addSurroundingChunkToUpdate(Chunk::North);
|
||||
// }
|
||||
|
||||
|
@ -76,8 +76,6 @@ class ChunkLightmap {
|
||||
private:
|
||||
bool setTorchlight(int x, int y, int z, u8 val);
|
||||
|
||||
// void updateSurroundingChunks(int x, int y, int z);
|
||||
|
||||
Chunk *m_chunk = nullptr;
|
||||
|
||||
using LightMapArray = u8[CHUNK_HEIGHT][CHUNK_DEPTH][CHUNK_WIDTH];
|
||||
|
Loading…
x
Reference in New Issue
Block a user