2013-04-17 22:42:45 -04:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Entity.h"
|
|
|
|
#include "Defines.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class cTNTEntity :
|
|
|
|
public cEntity
|
|
|
|
{
|
2013-06-18 15:09:51 -04:00
|
|
|
typedef cEntity super;
|
2013-04-17 22:42:45 -04:00
|
|
|
|
|
|
|
public:
|
|
|
|
CLASS_PROTODEF(cTNTEntity);
|
|
|
|
|
2013-06-18 15:09:51 -04:00
|
|
|
cTNTEntity(double a_X, double a_Y, double a_Z, float a_FuseTimeInSec);
|
|
|
|
cTNTEntity(const Vector3d & a_Pos, float a_FuseTimeInSec);
|
2013-04-17 22:42:45 -04:00
|
|
|
|
|
|
|
// cEntity overrides:
|
|
|
|
virtual void Initialize(cWorld * a_World) override;
|
|
|
|
virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
|
|
|
|
virtual void Tick(float a_Dt, cChunk & a_Chunk) override;
|
2013-06-18 15:09:51 -04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
float m_Counter; ///< How much time has elapsed since the object was created, in seconds
|
|
|
|
float m_MaxFuseTime; ///< How long the fuse is, in seconds
|
2013-04-17 22:42:45 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|