diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-05-26 16:39:04 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-05-26 16:39:04 +0200 |
commit | 5c3235ecdc3f718ce20e006f1ecfa2159df82c87 (patch) | |
tree | aea2e4a722715498c59b0a828486b30b74506bb5 /source/Simulator | |
parent | ItemGrid: Added the RemoveOneItem() function (diff) | |
download | cuberite-5c3235ecdc3f718ce20e006f1ecfa2159df82c87.tar cuberite-5c3235ecdc3f718ce20e006f1ecfa2159df82c87.tar.gz cuberite-5c3235ecdc3f718ce20e006f1ecfa2159df82c87.tar.bz2 cuberite-5c3235ecdc3f718ce20e006f1ecfa2159df82c87.tar.lz cuberite-5c3235ecdc3f718ce20e006f1ecfa2159df82c87.tar.xz cuberite-5c3235ecdc3f718ce20e006f1ecfa2159df82c87.tar.zst cuberite-5c3235ecdc3f718ce20e006f1ecfa2159df82c87.zip |
Diffstat (limited to 'source/Simulator')
-rw-r--r-- | source/Simulator/RedstoneSimulator.cpp | 28 | ||||
-rw-r--r-- | source/Simulator/RedstoneSimulator.h | 2 |
2 files changed, 13 insertions, 17 deletions
diff --git a/source/Simulator/RedstoneSimulator.cpp b/source/Simulator/RedstoneSimulator.cpp index 0b947b71b..03ad43ace 100644 --- a/source/Simulator/RedstoneSimulator.cpp +++ b/source/Simulator/RedstoneSimulator.cpp @@ -425,32 +425,27 @@ void cRedstoneSimulator::HandleChange(const Vector3i & a_BlockPos) } // switch (BlockType) } // while (m_RefreshPistons[]) - while (!m_RefreshDispensers.empty()) + while (!m_RefreshDropSpensers.empty()) { - Vector3i pos = m_RefreshDispensers.back(); - m_RefreshDispensers.pop_back(); + Vector3i pos = m_RefreshDropSpensers.back(); + m_RefreshDropSpensers.pop_back(); BLOCKTYPE BlockType = m_World.GetBlock(pos); - if (BlockType == E_BLOCK_DISPENSER) + if ((BlockType == E_BLOCK_DISPENSER) || (BlockType == E_BLOCK_DROPPER)) { if (IsPowered(pos)) { - class cActivateDispenser : - public cDispenserCallback + class cActivateDropSpenser : + public cDropSpenserCallback { - public: - cActivateDispenser() + virtual bool Item(cDropSpenserEntity * a_DropSpenser) override { - } - - virtual bool Item(cDispenserEntity * a_Dispenser) override - { - a_Dispenser->Activate(); + a_DropSpenser->Activate(); return false; } } ; - cActivateDispenser DispAct; - m_World.DoWithDispenserAt(pos.x, pos.y, pos.z, DispAct); + cActivateDropSpenser DrSpAct; + m_World.DoWithDropSpenserAt(pos.x, pos.y, pos.z, DrSpAct); } } } @@ -485,8 +480,9 @@ bool cRedstoneSimulator::PowerBlock(const Vector3i & a_BlockPos, const Vector3i } case E_BLOCK_DISPENSER: + case E_BLOCK_DROPPER: { - m_RefreshDispensers.push_back(a_BlockPos); + m_RefreshDropSpensers.push_back(a_BlockPos); break; } diff --git a/source/Simulator/RedstoneSimulator.h b/source/Simulator/RedstoneSimulator.h index 37c9aa92e..c0d5795c7 100644 --- a/source/Simulator/RedstoneSimulator.h +++ b/source/Simulator/RedstoneSimulator.h @@ -71,7 +71,7 @@ private: BlockList m_BlocksBuffer; BlockList m_RefreshPistons; - BlockList m_RefreshDispensers; + BlockList m_RefreshDropSpensers; BlockList m_RefreshTorchesAround; |