summaryrefslogtreecommitdiffstats
path: root/src/Simulator/Simulator.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-07-29 02:18:59 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-08-02 16:52:06 +0200
commit225c2fa9f6bc2ebffcc9160090482e6833a220ce (patch)
treeb72a5b27b49e38fe160da580a6f659a1a9d93308 /src/Simulator/Simulator.h
parentAdd WakeUp/AddBlock distinction (diff)
downloadcuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.tar
cuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.tar.gz
cuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.tar.bz2
cuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.tar.lz
cuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.tar.xz
cuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.tar.zst
cuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.zip
Diffstat (limited to 'src/Simulator/Simulator.h')
-rw-r--r--src/Simulator/Simulator.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Simulator/Simulator.h b/src/Simulator/Simulator.h
index 5bd5d8f30..aacd5f52f 100644
--- a/src/Simulator/Simulator.h
+++ b/src/Simulator/Simulator.h
@@ -32,6 +32,7 @@ public:
protected:
friend class cChunk; // Calls AddBlock() in its WakeUpSimulators() function, to speed things up
+ friend class cSimulatorManager; // Class reponsible for dispatching calls to the various slave Simulators
virtual void Simulate(float a_Dt) = 0;
virtual void SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk)
@@ -42,11 +43,8 @@ protected:
UNUSED(a_Chunk);
}
- /** Returns true if the specified block type is "interesting" for this simulator. */
- virtual bool IsAllowedBlock(BLOCKTYPE a_BlockType) = 0;
-
/** Called to simulate a new block. Unlike WakeUp this function will perform minimal checking.
- It queues the block to be simulated as fast as possible, only making sure that the block type IsAllowedBlock. */
+ It queues the block to be simulated as fast as possible, suitable for area wakeups. */
virtual void AddBlock(cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block) = 0;
/** Called to simulate a single new block, typically as a result of a single block break or change.