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
This commit is contained in:
@@ -54,15 +54,15 @@ public:
|
||||
|
||||
cDelayedFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid, int a_TickDelay);
|
||||
|
||||
// cSimulator overrides:
|
||||
virtual void WakeUp(cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block) override;
|
||||
virtual void AddBlock(cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block) override;
|
||||
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 cFluidSimulatorData * CreateChunkData(void) override { return new cDelayedFluidSimulatorChunkData(m_TickDelay); }
|
||||
|
||||
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 cFluidSimulatorData * CreateChunkData(void) override { return new cDelayedFluidSimulatorChunkData(m_TickDelay); }
|
||||
|
||||
int m_TickDelay; // Count of the m_Slots array in each ChunkData
|
||||
int m_AddSlotNum; // Index into m_Slots[] where to add new blocks in each ChunkData
|
||||
int m_SimSlotNum; // Index into m_Slots[] where to simulate blocks in each ChunkData
|
||||
|
||||
Reference in New Issue
Block a user