summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-02-01 00:17:41 +0100
committerTycho <work.tycho+git@gmail.com>2014-02-01 00:17:41 +0100
commit25ec7750aac9800bec83a844020a6eeda5cd4d74 (patch)
tree1820a0856969583238d85b2a68d299e55807f951 /src/Chunk.cpp
parentChanged it so std was actually set to c++11 in clang not gcc on OS X (diff)
downloadcuberite-25ec7750aac9800bec83a844020a6eeda5cd4d74.tar
cuberite-25ec7750aac9800bec83a844020a6eeda5cd4d74.tar.gz
cuberite-25ec7750aac9800bec83a844020a6eeda5cd4d74.tar.bz2
cuberite-25ec7750aac9800bec83a844020a6eeda5cd4d74.tar.lz
cuberite-25ec7750aac9800bec83a844020a6eeda5cd4d74.tar.xz
cuberite-25ec7750aac9800bec83a844020a6eeda5cd4d74.tar.zst
cuberite-25ec7750aac9800bec83a844020a6eeda5cd4d74.zip
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r--src/Chunk.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index a72464ec3..4fdaf4b69 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -753,7 +753,7 @@ void cChunk::BroadcastPendingBlockChanges(void)
-void cChunk::CheckBlocks(void)
+void cChunk::CheckBlocks()
{
if (m_ToTickBlocks.size() == 0)
{
@@ -762,13 +762,15 @@ void cChunk::CheckBlocks(void)
std::vector<unsigned int> ToTickBlocks;
std::swap(m_ToTickBlocks, ToTickBlocks);
+ cChunkInterface ChunkInterface(m_World->GetChunkMap());
+
for (std::vector<unsigned int>::const_iterator itr = ToTickBlocks.begin(), end = ToTickBlocks.end(); itr != end; ++itr)
{
unsigned int index = (*itr);
Vector3i BlockPos = IndexToCoordinate(index);
cBlockHandler * Handler = BlockHandler(GetBlock(index));
- Handler->Check(BlockPos.x, BlockPos.y, BlockPos.z, *this);
+ Handler->Check(&ChunkInterface, BlockPos.x, BlockPos.y, BlockPos.z, *this);
} // for itr - ToTickBlocks[]
}