Redstone simulator is alerted to lever unpowering
* Fixed the "fix" that broke the fix for #535, thereby fixing said issue * Fixed #535
This commit is contained in:
parent
7177806d31
commit
19caba5125
@ -23,6 +23,7 @@ public:
|
|||||||
NIBBLETYPE Meta = (a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) | 0x08);
|
NIBBLETYPE Meta = (a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) | 0x08);
|
||||||
|
|
||||||
a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta);
|
a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta);
|
||||||
|
a_WorldInterface.WakeUpSimulators(a_BlockX, a_BlockY, a_BlockZ);
|
||||||
a_WorldInterface.GetBroadcastManager().BroadcastSoundEffect("random.click", a_BlockX * 8, a_BlockY * 8, a_BlockZ * 8, 0.5f, (Meta & 0x08) ? 0.6f : 0.5f);
|
a_WorldInterface.GetBroadcastManager().BroadcastSoundEffect("random.click", a_BlockX * 8, a_BlockY * 8, a_BlockZ * 8, 0.5f, (Meta & 0x08) ? 0.6f : 0.5f);
|
||||||
|
|
||||||
// Queue a button reset (unpress)
|
// Queue a button reset (unpress)
|
||||||
|
@ -23,6 +23,7 @@ public:
|
|||||||
NIBBLETYPE Meta = (a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) ^ 0x08);
|
NIBBLETYPE Meta = (a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) ^ 0x08);
|
||||||
|
|
||||||
a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta);
|
a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta);
|
||||||
|
a_WorldInterface.WakeUpSimulators(a_BlockX, a_BlockY, a_BlockZ);
|
||||||
a_WorldInterface.GetBroadcastManager().BroadcastSoundEffect("random.click", a_BlockX * 8, a_BlockY * 8, a_BlockZ * 8, 0.5f, (Meta & 0x08) ? 0.6f : 0.5f);
|
a_WorldInterface.GetBroadcastManager().BroadcastSoundEffect("random.click", a_BlockX * 8, a_BlockY * 8, a_BlockZ * 8, 0.5f, (Meta & 0x08) ? 0.6f : 0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,4 +46,7 @@ public:
|
|||||||
|
|
||||||
virtual void SetTimeOfDay(Int64 a_TimeOfDay) = 0;
|
virtual void SetTimeOfDay(Int64 a_TimeOfDay) = 0;
|
||||||
|
|
||||||
|
/** Wakes up the simulators for the specified block */
|
||||||
|
virtual void WakeUpSimulators(int a_BlockX, int a_BlockY, int a_BlockZ) = 0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -486,7 +486,7 @@ public:
|
|||||||
double GetSpawnZ(void) const { return m_SpawnZ; }
|
double GetSpawnZ(void) const { return m_SpawnZ; }
|
||||||
|
|
||||||
/** Wakes up the simulators for the specified block */
|
/** Wakes up the simulators for the specified block */
|
||||||
void WakeUpSimulators(int a_BlockX, int a_BlockY, int a_BlockZ);
|
virtual void WakeUpSimulators(int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
||||||
|
|
||||||
/** Wakes up the simulators for the specified area of blocks */
|
/** Wakes up the simulators for the specified area of blocks */
|
||||||
void WakeUpSimulatorsInArea(int a_MinBlockX, int a_MaxBlockX, int a_MinBlockY, int a_MaxBlockY, int a_MinBlockZ, int a_MaxBlockZ);
|
void WakeUpSimulatorsInArea(int a_MinBlockX, int a_MaxBlockX, int a_MinBlockY, int a_MaxBlockY, int a_MinBlockZ, int a_MaxBlockZ);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user