diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-07-02 23:25:18 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-07-04 13:44:03 +0200 |
commit | ec2f576de69f2a6e73abb1aeadb173c0b2e12131 (patch) | |
tree | 2106f0f9f9edccf5452134ed3ead93b5ebd9812f /src/Simulator | |
parent | Removed world-saving log messages. (diff) | |
download | cuberite-ec2f576de69f2a6e73abb1aeadb173c0b2e12131.tar cuberite-ec2f576de69f2a6e73abb1aeadb173c0b2e12131.tar.gz cuberite-ec2f576de69f2a6e73abb1aeadb173c0b2e12131.tar.bz2 cuberite-ec2f576de69f2a6e73abb1aeadb173c0b2e12131.tar.lz cuberite-ec2f576de69f2a6e73abb1aeadb173c0b2e12131.tar.xz cuberite-ec2f576de69f2a6e73abb1aeadb173c0b2e12131.tar.zst cuberite-ec2f576de69f2a6e73abb1aeadb173c0b2e12131.zip |
Diffstat (limited to 'src/Simulator')
-rw-r--r-- | src/Simulator/IncrementalRedstoneSimulator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator.cpp b/src/Simulator/IncrementalRedstoneSimulator.cpp index 866a5b65a..5af9a295d 100644 --- a/src/Simulator/IncrementalRedstoneSimulator.cpp +++ b/src/Simulator/IncrementalRedstoneSimulator.cpp @@ -1700,7 +1700,7 @@ bool cIncrementalRedstoneSimulator::IsWirePowered(int a_RelBlockX, int a_RelBloc { continue; } - a_PowerLevel = itr->a_PowerLevel; + a_PowerLevel = std::max(itr->a_PowerLevel , a_PowerLevel); // Get the highest power level (a_PowerLevel is initialised already and there CAN be multiple levels for one block) } for (LinkedBlocksList::const_iterator itr = m_LinkedPoweredBlocks->begin(); itr != m_LinkedPoweredBlocks->end(); ++itr) // Check linked powered list @@ -1709,7 +1709,7 @@ bool cIncrementalRedstoneSimulator::IsWirePowered(int a_RelBlockX, int a_RelBloc { continue; } - a_PowerLevel = itr->a_PowerLevel; + a_PowerLevel = std::max(itr->a_PowerLevel, a_PowerLevel); } return (a_PowerLevel != 0); // Answer the inital question: is the wire powered? |