diff options
Diffstat (limited to 'src/Simulator/IncrementalRedstoneSimulator')
3 files changed, 6 insertions, 11 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator/CMakeLists.txt b/src/Simulator/IncrementalRedstoneSimulator/CMakeLists.txt index e37f3595c..87052d00a 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/CMakeLists.txt +++ b/src/Simulator/IncrementalRedstoneSimulator/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 2.6) -project (MCServer) +project (Cuberite) include_directories ("${PROJECT_SOURCE_DIR}/../") diff --git a/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.cpp b/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.cpp index 95329f496..3c79d152b 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.cpp +++ b/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.cpp @@ -159,12 +159,5 @@ void cIncrementalRedstoneSimulator::Simulate(float a_dt) { m_Data.GetActiveBlocks().emplace_back(CurrentLocation); } - - #ifdef _DEBUG - for (const auto & UpdateLocation : Updates) - { - LOGD("Queueing block for reupdate (%i %i %i)", UpdateLocation.x, UpdateLocation.y, UpdateLocation.z); - } - #endif } } diff --git a/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h b/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h index e196f51a1..e9543bb02 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h +++ b/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h @@ -35,7 +35,8 @@ public: const cVector3iArray GetTerracingConnectionOffsets(const Vector3i & a_Position) { cVector3iArray RelativePositions; - bool IsYPTerracingBlocked = cBlockInfo::IsSolid(m_World.GetBlock(a_Position + OffsetYP())); + auto YPTerraceBlock = m_World.GetBlock(a_Position + OffsetYP()); + bool IsYPTerracingBlocked = cBlockInfo::IsSolid(YPTerraceBlock) && !cBlockInfo::IsTransparent(YPTerraceBlock); for (const auto & Adjacent : GetRelativeLaterals()) { @@ -46,9 +47,10 @@ public: { RelativePositions.emplace_back(Adjacent + OffsetYP()); } - + auto YMTerraceBlock = m_World.GetBlock(a_Position + Adjacent); if ( - !cBlockInfo::IsSolid(m_World.GetBlock(a_Position + Adjacent)) && // IsYMTerracingBlocked (i.e. check block above lower terracing position, a.k.a. just the plain adjacent) + // IsYMTerracingBlocked (i.e. check block above lower terracing position, a.k.a. just the plain adjacent) + (!cBlockInfo::IsSolid(YMTerraceBlock) || cBlockInfo::IsTransparent(YMTerraceBlock)) && (m_World.GetBlock(a_Position + Adjacent + OffsetYM()) == E_BLOCK_REDSTONE_WIRE) ) { |