diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-12-16 18:35:20 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-12-16 18:35:20 +0100 |
commit | 3e6fd5c6e59aace26fcb2a63bbff4ec096a83ce5 (patch) | |
tree | f65a8e8ee16bbe05b586288816dfbca84cbb052d /src | |
parent | Fixed cClientHandle::Tick() being called from two threads. (diff) | |
download | cuberite-3e6fd5c6e59aace26fcb2a63bbff4ec096a83ce5.tar cuberite-3e6fd5c6e59aace26fcb2a63bbff4ec096a83ce5.tar.gz cuberite-3e6fd5c6e59aace26fcb2a63bbff4ec096a83ce5.tar.bz2 cuberite-3e6fd5c6e59aace26fcb2a63bbff4ec096a83ce5.tar.lz cuberite-3e6fd5c6e59aace26fcb2a63bbff4ec096a83ce5.tar.xz cuberite-3e6fd5c6e59aace26fcb2a63bbff4ec096a83ce5.tar.zst cuberite-3e6fd5c6e59aace26fcb2a63bbff4ec096a83ce5.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ClientHandle.h | 1 | ||||
-rw-r--r-- | src/World.cpp | 24 | ||||
-rw-r--r-- | src/World.h | 5 |
3 files changed, 0 insertions, 30 deletions
diff --git a/src/ClientHandle.h b/src/ClientHandle.h index 18274f6ae..b426153b9 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -29,7 +29,6 @@ class cExpOrb; class cPickup; class cPlayer; class cProtocol; -class cRedstone; class cWindow; class cFallingBlock; class cItemHandler; diff --git a/src/World.cpp b/src/World.cpp index 35887c07d..f81456334 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -234,7 +234,6 @@ cWorld::cWorld(const AString & a_WorldName) : m_WorldAge(0), m_TimeOfDay(0), m_LastTimeUpdate(0), - m_RSList(0), m_Weather(eWeather_Sunny), m_WeatherInterval(24000), // Guaranteed 1 day of sunshine at server start :) m_TickThread(*this), @@ -716,29 +715,6 @@ void cWorld::Tick(float a_Dt, int a_LastTickDurationMSec) } TickMobs(a_Dt); - - std::vector<int> m_RSList_copy(m_RSList); - - m_RSList.clear(); - - std::vector<int>::const_iterator cii; // FIXME - Please rename this variable, WTF is cii??? Use human readable variable names or common abbreviations (i, idx, itr, iter) - for (cii = m_RSList_copy.begin(); cii != m_RSList_copy.end();) - { - int tempX = *cii; cii++; - int tempY = *cii; cii++; - int tempZ = *cii; cii++; - int state = *cii; cii++; - - if ((state == 11111) && ((int)GetBlock(tempX, tempY, tempZ) == E_BLOCK_REDSTONE_TORCH_OFF)) - { - FastSetBlock(tempX, tempY, tempZ, E_BLOCK_REDSTONE_TORCH_ON, (int)GetBlockMeta(tempX, tempY, tempZ)); - } - else if ((state == 00000) && ((int)GetBlock(tempX, tempY, tempZ) == E_BLOCK_REDSTONE_TORCH_ON)) - { - FastSetBlock(tempX, tempY, tempZ, E_BLOCK_REDSTONE_TORCH_OFF, (int)GetBlockMeta(tempX, tempY, tempZ)); - } - } - m_RSList_copy.erase(m_RSList_copy.begin(),m_RSList_copy.end()); } diff --git a/src/World.h b/src/World.h index 16d7f5146..2d9e8b551 100644 --- a/src/World.h +++ b/src/World.h @@ -27,7 +27,6 @@ -class cRedstone; class cFireSimulator; class cFluidSimulator; class cSandSimulator; @@ -668,10 +667,6 @@ private: bool m_bEnabledPVP; bool m_IsDeepSnowEnabled; bool m_ShouldLavaSpawnFire; - - // The cRedstone class simulates redstone and needs access to m_RSList - // friend class cRedstone; - std::vector<int> m_RSList; std::vector<BlockTickQueueItem *> m_BlockTickQueue; std::vector<BlockTickQueueItem *> m_BlockTickQueueCopy; // Second is for safely removing the objects from the queue |