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:
|
|
|
|
cFireSimulator( cWorld* a_World );
|
|
|
|
~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:
|
2012-09-30 12:37:44 -04:00
|
|
|
virtual void AddBlock(int a_X, int a_Y, int a_Z) 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;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|