diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-06-14 18:19:28 +0200 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-06-14 18:19:28 +0200 |
commit | 039c1a75f391b078f2b27a388e73bb203afed58e (patch) | |
tree | f4f213b794eb0c3a2713358c3d5bdd3f0b931486 /src/Simulator/IncrementalRedstoneSimulator.h | |
parent | Fixed bad merge (diff) | |
parent | Merge pull request #1093 from mc-server/BindingsFix (diff) | |
download | cuberite-039c1a75f391b078f2b27a388e73bb203afed58e.tar cuberite-039c1a75f391b078f2b27a388e73bb203afed58e.tar.gz cuberite-039c1a75f391b078f2b27a388e73bb203afed58e.tar.bz2 cuberite-039c1a75f391b078f2b27a388e73bb203afed58e.tar.lz cuberite-039c1a75f391b078f2b27a388e73bb203afed58e.tar.xz cuberite-039c1a75f391b078f2b27a388e73bb203afed58e.tar.zst cuberite-039c1a75f391b078f2b27a388e73bb203afed58e.zip |
Diffstat (limited to 'src/Simulator/IncrementalRedstoneSimulator.h')
-rw-r--r-- | src/Simulator/IncrementalRedstoneSimulator.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator.h b/src/Simulator/IncrementalRedstoneSimulator.h index 233a3d408..1d6a49aca 100644 --- a/src/Simulator/IncrementalRedstoneSimulator.h +++ b/src/Simulator/IncrementalRedstoneSimulator.h @@ -108,7 +108,7 @@ private: /** Handles redstone wire */ void HandleRedstoneWire(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ); /** Handles repeaters */ - void HandleRedstoneRepeater(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ, BLOCKTYPE a_MyState); + void HandleRedstoneRepeater(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ, BLOCKTYPE a_MyState, RepeatersDelayList::iterator a_Itr); /* ====================== */ /* ====== DEVICES ====== */ @@ -145,8 +145,8 @@ private: void SetDirectionLinkedPowered(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ, char a_Direction, unsigned char a_PowerLevel = MAX_POWER_LEVEL); /** Marks all blocks immediately surrounding a coordinate as powered */ void SetAllDirsAsPowered(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ, unsigned char a_PowerLevel = MAX_POWER_LEVEL); - /** Queues a repeater to be powered or unpowered */ - void QueueRepeaterPowerChange(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ, NIBBLETYPE a_Meta, bool ShouldPowerOn); + /** Queues a repeater to be powered or unpowered and returns if the m_RepeatersDelayList iterators were invalidated */ + bool QueueRepeaterPowerChange(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ, NIBBLETYPE a_Meta, bool ShouldPowerOn); /** Returns if a coordinate is powered or linked powered */ bool AreCoordsPowered(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ) { return AreCoordsDirectlyPowered(a_RelBlockX, a_RelBlockY, a_RelBlockZ) || AreCoordsLinkedPowered(a_RelBlockX, a_RelBlockY, a_RelBlockZ); } @@ -156,7 +156,7 @@ private: bool AreCoordsLinkedPowered(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ); /** Returns if a coordinate was marked as simulated (for blocks toggleable by players) */ bool AreCoordsSimulated(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ, bool IsCurrentStatePowered); - /** Returns if a repeater is powered */ + /** Returns if a repeater is powered by testing for power sources behind the repeater */ bool IsRepeaterPowered(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ, NIBBLETYPE a_Meta); /** Returns if a repeater is locked */ bool IsRepeaterLocked(int a_RelBlockX, int a_RelBlockY, int a_RelBlockZ, NIBBLETYPE a_Meta); |