Do not GetBlock individually in simulators
* Have the simulator manager get the block and pass it on + Add new overload for WakeUp, called when the manager wakes face positions
This commit is contained in:
@@ -54,13 +54,12 @@ public:
|
||||
|
||||
cDelayedFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid, int a_TickDelay);
|
||||
|
||||
virtual void WakeUp(cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block) override;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void Simulate(float a_Dt) override;
|
||||
virtual void SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk) override;
|
||||
virtual void AddBlock(cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block) override;
|
||||
virtual void WakeUp(cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block) override;
|
||||
virtual cFluidSimulatorData * CreateChunkData(void) override { return new cDelayedFluidSimulatorChunkData(m_TickDelay); }
|
||||
|
||||
int m_TickDelay; // Count of the m_Slots array in each ChunkData
|
||||
|
||||
Reference in New Issue
Block a user