summaryrefslogtreecommitdiffstats
path: root/src/Simulator/IncrementalRedstoneSimulator/RedstoneSimulatorChunkData.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2016-02-09 23:02:50 +0100
committerTiger Wang <ziwei.tiger@outlook.com>2016-02-09 23:02:50 +0100
commit3c272b55ea1239238ad9726bba9f7dc8b130e545 (patch)
tree1132b156ca24e691a1c3306b8eb81ba296c6f2f6 /src/Simulator/IncrementalRedstoneSimulator/RedstoneSimulatorChunkData.h
parentMerge pull request #2996 from LogicParrot/message2 (diff)
parentUpdate RedstoneSimulator to delete unused cached PowerData (diff)
downloadcuberite-3c272b55ea1239238ad9726bba9f7dc8b130e545.tar
cuberite-3c272b55ea1239238ad9726bba9f7dc8b130e545.tar.gz
cuberite-3c272b55ea1239238ad9726bba9f7dc8b130e545.tar.bz2
cuberite-3c272b55ea1239238ad9726bba9f7dc8b130e545.tar.lz
cuberite-3c272b55ea1239238ad9726bba9f7dc8b130e545.tar.xz
cuberite-3c272b55ea1239238ad9726bba9f7dc8b130e545.tar.zst
cuberite-3c272b55ea1239238ad9726bba9f7dc8b130e545.zip
Diffstat (limited to 'src/Simulator/IncrementalRedstoneSimulator/RedstoneSimulatorChunkData.h')
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/RedstoneSimulatorChunkData.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator/RedstoneSimulatorChunkData.h b/src/Simulator/IncrementalRedstoneSimulator/RedstoneSimulatorChunkData.h
index 8e025d154..b461512f0 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/RedstoneSimulatorChunkData.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/RedstoneSimulatorChunkData.h
@@ -41,6 +41,12 @@ public:
return (Result == m_MechanismDelays.end()) ? nullptr : &Result->second;
}
+ /** Erase cached PowerData for position */
+ void ErasePowerData(const Vector3i & a_Position)
+ {
+ m_CachedPowerLevels.erase(a_Position);
+ }
+
cRedstoneHandler::PoweringData ExchangeUpdateOncePowerData(const Vector3i & a_Position, cRedstoneHandler::PoweringData a_PoweringData)
{
auto Result = m_CachedPowerLevels.find(a_Position);