2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2012-09-23 18:09:57 -04:00
|
|
|
#include "Simulator.h"
|
2012-10-13 05:53:28 -04:00
|
|
|
#include "../BlockEntity.h"
|
2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class cFireSimulator : public cSimulator
|
|
|
|
{
|
|
|
|
public:
|
2013-02-28 08:39:20 -05:00
|
|
|
cFireSimulator(cWorld & a_World);
|
2012-06-14 09:06:06 -04:00
|
|
|
~cFireSimulator();
|
|
|
|
|
2012-09-30 12:37:44 -04:00
|
|
|
virtual void Simulate( float a_Dt ) override;
|
2012-06-14 09:06:06 -04:00
|
|
|
|
2012-10-03 04:52:11 -04:00
|
|
|
virtual bool IsAllowedBlock( BLOCKTYPE a_BlockType ) override;
|
2012-06-14 09:06:06 -04:00
|
|
|
|
2012-10-03 04:52:11 -04:00
|
|
|
virtual bool IsBurnable( BLOCKTYPE a_BlockType );
|
|
|
|
virtual bool IsForeverBurnable( BLOCKTYPE a_BlockType );
|
|
|
|
virtual bool FiresForever( BLOCKTYPE a_BlockType );
|
2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
protected:
|
2013-02-28 02:42:45 -05:00
|
|
|
virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) override;
|
2012-06-14 09:06:06 -04:00
|
|
|
virtual bool BurnBlockAround(int a_X, int a_Y, int a_Z);
|
|
|
|
virtual bool BurnBlock(int a_X, int a_Y, int a_Z);
|
|
|
|
|
|
|
|
typedef std::list <Vector3i> BlockList;
|
|
|
|
BlockList *m_Blocks;
|
|
|
|
BlockList *m_Buffer;
|
|
|
|
|
|
|
|
BlockList *m_BurningBlocks;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|