diff options
author | Tycho Bickerstaff <work.tycho@gmail.com> | 2013-12-11 00:01:24 +0100 |
---|---|---|
committer | Tycho Bickerstaff <work.tycho@gmail.com> | 2013-12-11 00:01:24 +0100 |
commit | d9a429ec6463818b50f3c930732abaa29e0af558 (patch) | |
tree | b1024f5001265301ed1ca6e23bd6d5c325e825fd /src/Simulator/RedstoneSimulator.h | |
parent | fixed unused expression warnings in blockFire (diff) | |
parent | Merge branch 'master' of https://github.com/mc-server/MCServer (diff) | |
download | cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.gz cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.bz2 cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.lz cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.xz cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.zst cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.zip |
Diffstat (limited to 'src/Simulator/RedstoneSimulator.h')
-rw-r--r-- | src/Simulator/RedstoneSimulator.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Simulator/RedstoneSimulator.h b/src/Simulator/RedstoneSimulator.h index 1d85c0634..23ac510fc 100644 --- a/src/Simulator/RedstoneSimulator.h +++ b/src/Simulator/RedstoneSimulator.h @@ -127,7 +127,11 @@ private: void SetAllDirsAsPowered(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_SourceBlock); /// <summary>Returns if a coordinate is powered or linked powered</summary> - bool AreCoordsPowered(int a_BlockX, int a_BlockY, int a_BlockZ); + bool AreCoordsPowered(int a_BlockX, int a_BlockY, int a_BlockZ) { return AreCoordsDirectlyPowered(a_BlockX, a_BlockY, a_BlockZ) || AreCoordsLinkedPowered(a_BlockX, a_BlockY, a_BlockZ); } + /// <summary>Returns if a coordinate is in the directly powered blocks list</summary> + bool AreCoordsDirectlyPowered(int a_BlockX, int a_BlockY, int a_BlockZ); + /// <summary>Returns if a coordinate is in the indirectly powered blocks list</summary> + bool AreCoordsLinkedPowered(int a_BlockX, int a_BlockY, int a_BlockZ); /// <summary>Returns if a coordinate was marked as simulated (for blocks toggleable by players)</summary> bool AreCoordsSimulated(int a_BlockX, int a_BlockY, int a_BlockZ, bool IsCurrentStatePowered); /// <summary>Returns if a repeater is powered</summary> @@ -150,6 +154,9 @@ private: switch (Block) { // Add SOLID but not viable middle blocks here + case E_BLOCK_PISTON: + case E_BLOCK_PISTON_EXTENSION: + case E_BLOCK_STICKY_PISTON: case E_BLOCK_REDSTONE_REPEATER_ON: case E_BLOCK_REDSTONE_REPEATER_OFF: { |