From 225c2fa9f6bc2ebffcc9160090482e6833a220ce Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Wed, 29 Jul 2020 01:18:59 +0100 Subject: Always use relative coordinates in AddBlock + Pass block, use relatives * Fixes everything immediately converting abs back to rel and getting block, when these data were already available --- src/Simulator/SandSimulator.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Simulator/SandSimulator.h') diff --git a/src/Simulator/SandSimulator.h b/src/Simulator/SandSimulator.h index 665208fbe..113484158 100644 --- a/src/Simulator/SandSimulator.h +++ b/src/Simulator/SandSimulator.h @@ -30,11 +30,6 @@ public: cSandSimulator(cWorld & a_World, cIniFile & a_IniFile); - // cSimulator overrides: - virtual void Simulate(float a_Dt) override { UNUSED(a_Dt);} // not used - virtual void SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk) override; - virtual bool IsAllowedBlock(BLOCKTYPE a_BlockType) override; - /** Returns true if a falling-able block can start falling through the specified block type */ static bool CanStartFallingThrough(BLOCKTYPE a_BlockType); @@ -56,7 +51,12 @@ public: BLOCKTYPE a_FallingBlockType, NIBBLETYPE a_FallingBlockMeta ); -protected: +private: + + virtual void Simulate(float a_Dt) override { UNUSED(a_Dt);} // not used + virtual void SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk) override; + + static bool IsAllowedBlock(BLOCKTYPE a_BlockType); bool m_IsInstantFall; // If set to true, blocks don't fall using cFallingBlock entity, but instantly instead -- cgit v1.2.3