From c6b4ee8c9fb597b6f87f4cb756f43d5548ab2d66 Mon Sep 17 00:00:00 2001 From: "lapayo94@gmail.com" Date: Wed, 28 Dec 2011 21:00:35 +0000 Subject: - implemented the fire simulation in native c++ (cFireSimulator) - Changed the Durationsystem for Items. cPlayer::UseEquippedItem calls cItem::DamageItem this function damages the item if it has a duration. (needed the duration also in another place so this saves code ;)) - added some other burning blocks - the mobtypes for the settings.ini which i must have forgotten in the last commit git-svn-id: http://mc-server.googlecode.com/svn/trunk@150 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cFireSimulator.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 source/cFireSimulator.h (limited to 'source/cFireSimulator.h') diff --git a/source/cFireSimulator.h b/source/cFireSimulator.h new file mode 100644 index 000000000..b6ac627fb --- /dev/null +++ b/source/cFireSimulator.h @@ -0,0 +1,31 @@ +#pragma once +#include "cSimulator.h" +#include "cBlockEntity.h" +#include "vector" + +class Vector3i; +class cWorld; +class cFireSimulator : public cSimulator +{ +public: + cFireSimulator( cWorld* a_World ); + ~cFireSimulator(); + + virtual void Simulate( float a_Dt ); + + virtual inline bool IsAllowedBlock( char a_BlockID ); + virtual inline bool IsBurnable( char a_BlockID ); + + virtual inline bool IsForeverBurnable( char a_BlockID ); + +protected: + virtual void AddBlock(int a_X, int a_Y, int a_Z); + virtual void _AddBlock(int a_X, int a_Y, int a_Z); + virtual inline bool BurnBlockAround(int a_X, int a_Y, int a_Z); + virtual inline bool BurnBlock(int a_X, int a_Y, int a_Z); + + std::vector *m_Blocks; + std::vector *m_Buffer; + + std::vector *m_BurningBlocks; +}; \ No newline at end of file -- cgit v1.2.3