1
0

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:
Tiger Wang
2020-07-29 01:18:59 +01:00
parent 99856df686
commit 225c2fa9f6
21 changed files with 139 additions and 231 deletions

View File

@@ -19,18 +19,19 @@ class cFireSimulator :
public cSimulator
{
public:
cFireSimulator(cWorld & a_World, cIniFile & a_IniFile);
virtual ~cFireSimulator() override;
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;
static bool IsFuel (BLOCKTYPE a_BlockType);
static bool DoesBurnForever(BLOCKTYPE a_BlockType);
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);
/** Time (in msec) that a fire block takes to burn with a fuel block into the next step */
unsigned m_BurnStepTimeFuel;