diff options
author | QUSpilPrgm <QUSpilPrgm@users.noreply.github.com> | 2016-06-04 14:16:35 +0200 |
---|---|---|
committer | QUSpilPrgm <QUSpilPrgm@users.noreply.github.com> | 2016-06-15 10:33:49 +0200 |
commit | 33cd7f4e75819d50f22ae61027373ebb331305b5 (patch) | |
tree | b61d763a27e1986116c1a2f3b779bcf0bb1bd27b /src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.cpp | |
parent | Merge pull request #3227 from cuberite/NormalizeVectorApi (diff) | |
download | cuberite-33cd7f4e75819d50f22ae61027373ebb331305b5.tar cuberite-33cd7f4e75819d50f22ae61027373ebb331305b5.tar.gz cuberite-33cd7f4e75819d50f22ae61027373ebb331305b5.tar.bz2 cuberite-33cd7f4e75819d50f22ae61027373ebb331305b5.tar.lz cuberite-33cd7f4e75819d50f22ae61027373ebb331305b5.tar.xz cuberite-33cd7f4e75819d50f22ae61027373ebb331305b5.tar.zst cuberite-33cd7f4e75819d50f22ae61027373ebb331305b5.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.cpp b/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.cpp index 9f8c0f39d..c7be24dc4 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.cpp +++ b/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.cpp @@ -196,12 +196,12 @@ void cIncrementalRedstoneSimulator::Simulate(float a_dt) cRedstoneHandler::PoweringData Power; for (const auto & Location : CurrentHandler->GetValidSourcePositions(CurrentLocation, CurrentBlock, CurrentMeta)) { - BLOCKTYPE PotentialBlock; - NIBBLETYPE PotentialMeta; - if ((Location.y < 0) || (Location.y > cChunkDef::Height)) + if (!cChunk::IsValidHeight(Location.y)) { continue; } + BLOCKTYPE PotentialBlock; + NIBBLETYPE PotentialMeta; m_World.GetBlockTypeMeta(Location.x, Location.y, Location.z, PotentialBlock, PotentialMeta); auto PotentialSourceHandler = cIncrementalRedstoneSimulator::CreateComponent(m_World, PotentialBlock, &m_Data); |