Skip to content

Commit

Permalink
Fix repeater unpowering
Browse files Browse the repository at this point in the history
  • Loading branch information
tigerw committed Dec 18, 2014
1 parent 5dfb094 commit dd1df3b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Simulator/IncrementalRedstoneSimulator.cpp
Expand Up @@ -2074,9 +2074,11 @@ void cIncrementalRedstoneSimulator::SetSourceUnpowered(int a_RelSourceX, int a_R

for (const auto & itr : BlocksPotentiallyUnpowered)
{
if (!AreCoordsPowered(itr.x, itr.y, itr.z))
auto Neighbour = a_Chunk->GetRelNeighborChunk(itr.x, itr.z);
if (!AreCoordsPowered(itr.x, itr.y, itr.z) && (Neighbour->GetBlock(itr) != E_BLOCK_REDSTONE_REPEATER_ON))
{
SetSourceUnpowered(itr.x, itr.y, itr.z, a_Chunk->GetRelNeighborChunk(itr.x, itr.z));
// Repeaters time themselves with regards to unpowering; ensure we don't do it for them
SetSourceUnpowered(itr.x, itr.y, itr.z, Neighbour);
}
}
}
Expand Down

0 comments on commit dd1df3b

Please sign in to comment.