From 99856df6869d32731e6fdcfeb1460297410f5820 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Wed, 29 Jul 2020 00:12:45 +0100 Subject: Add WakeUp/AddBlock distinction * WakeUp is for singular changes (block breaking for example). The simulator should check blocks around the position and discover other affected blocks as it sees fit * AddBlock is for when you know a whole area is to be updated; chunk loading, or area wakeups for example + Prepares for correct handling of destroyed blocks after removal of SolidBlockHandler in the redstone simulator --- src/Simulator/SandSimulator.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Simulator/SandSimulator.h') diff --git a/src/Simulator/SandSimulator.h b/src/Simulator/SandSimulator.h index d7a27edd4..665208fbe 100644 --- a/src/Simulator/SandSimulator.h +++ b/src/Simulator/SandSimulator.h @@ -27,6 +27,7 @@ class cSandSimulator : public cSimulator { public: + cSandSimulator(cWorld & a_World, cIniFile & a_IniFile); // cSimulator overrides: @@ -56,11 +57,12 @@ public: ); protected: + bool m_IsInstantFall; // If set to true, blocks don't fall using cFallingBlock entity, but instantly instead int m_TotalBlocks; // Total number of blocks currently in the queue for simulating - virtual void AddBlock(Vector3i a_Block, cChunk * a_Chunk) override; + virtual void AddBlock(cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block) override; /** Performs the instant fall of the block - removes it from top, Finishes it at the bottom */ void DoInstantFall(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ); -- cgit v1.2.3