diff options
author | Howaner <franzi.moos@googlemail.com> | 2015-01-25 00:34:19 +0100 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2015-01-25 00:34:19 +0100 |
commit | 1eedccc56a1a80b42adbea8dbbe968d42c7fe712 (patch) | |
tree | a5fe3fb72a3c3918b2c4ba413c686f718f5d403c /src/Chunk.cpp | |
parent | C++11 and function rename. (diff) | |
parent | Gamosocm support (diff) | |
download | cuberite-1eedccc56a1a80b42adbea8dbbe968d42c7fe712.tar cuberite-1eedccc56a1a80b42adbea8dbbe968d42c7fe712.tar.gz cuberite-1eedccc56a1a80b42adbea8dbbe968d42c7fe712.tar.bz2 cuberite-1eedccc56a1a80b42adbea8dbbe968d42c7fe712.tar.lz cuberite-1eedccc56a1a80b42adbea8dbbe968d42c7fe712.tar.xz cuberite-1eedccc56a1a80b42adbea8dbbe968d42c7fe712.tar.zst cuberite-1eedccc56a1a80b42adbea8dbbe968d42c7fe712.zip |
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r-- | src/Chunk.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp index 39e97f5cf..979492b46 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -49,14 +49,14 @@ //////////////////////////////////////////////////////////////////////////////// // sSetBlock: -sSetBlock::sSetBlock( int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) // absolute block position - : x( a_BlockX) - , y( a_BlockY) - , z( a_BlockZ) - , BlockType( a_BlockType) - , BlockMeta( a_BlockMeta) +sSetBlock::sSetBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta): + m_RelX(a_BlockX), + m_RelY(a_BlockY), + m_RelZ(a_BlockZ), + m_BlockType(a_BlockType), + m_BlockMeta(a_BlockMeta) { - cChunkDef::AbsoluteToRelative(x, y, z, ChunkX, ChunkZ); + cChunkDef::AbsoluteToRelative(m_RelX, m_RelY, m_RelZ, m_ChunkX, m_ChunkZ); } @@ -73,6 +73,7 @@ cChunk::cChunk( cAllocationPool<cChunkData::sChunkSection> & a_Pool ) : m_Presence(cpInvalid), + m_ShouldGenerateIfLoadFailed(false), m_IsLightValid(false), m_IsDirty(false), m_IsSaving(false), @@ -93,6 +94,7 @@ cChunk::cChunk( m_WaterSimulatorData(a_World->GetWaterSimulator()->CreateChunkData()), m_LavaSimulatorData (a_World->GetLavaSimulator ()->CreateChunkData()), m_RedstoneSimulatorData(a_World->GetRedstoneSimulator()->CreateChunkData()), + m_IsRedstoneDirty(false), m_AlwaysTicked(0) { if (a_NeighborXM != nullptr) @@ -599,7 +601,7 @@ void cChunk::SpawnMobs(cMobSpawner& a_MobSpawner) -void cChunk::Tick(float a_Dt) +void cChunk::Tick(std::chrono::milliseconds a_Dt) { BroadcastPendingBlockChanges(); |