2014-03-14 21:45:25 -04:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Entity.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// tolua_begin
|
|
|
|
class cHangingEntity :
|
|
|
|
public cEntity
|
|
|
|
{
|
|
|
|
typedef cEntity super;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2014-10-21 16:02:30 -04:00
|
|
|
// tolua_end
|
|
|
|
|
2014-07-22 18:36:13 -04:00
|
|
|
CLASS_PROTODEF(cHangingEntity)
|
2014-03-14 21:45:25 -04:00
|
|
|
|
|
|
|
cHangingEntity(eEntityType a_EntityType, eBlockFace a_BlockFace, double a_X, double a_Y, double a_Z);
|
|
|
|
|
2014-10-21 16:02:30 -04:00
|
|
|
// tolua_begin
|
|
|
|
|
|
|
|
/** Returns the direction in which the entity is facing. */
|
|
|
|
eBlockFace GetFacing() const { return m_Facing; }
|
2014-03-14 21:45:25 -04:00
|
|
|
|
2014-10-21 16:02:30 -04:00
|
|
|
/** Set the direction in which the entity is facing. */
|
|
|
|
void SetFacing(eBlockFace a_Facing);
|
2014-03-14 21:45:25 -04:00
|
|
|
|
2014-10-21 16:02:30 -04:00
|
|
|
/** Returns the X coord of the block in which the entity resides. */
|
|
|
|
int GetBlockX() const { return POSX_TOINT; }
|
2014-03-14 21:45:25 -04:00
|
|
|
|
2014-10-21 16:02:30 -04:00
|
|
|
/** Returns the Y coord of the block in which the entity resides. */
|
|
|
|
int GetBlockY() const { return POSY_TOINT; }
|
2014-03-14 21:45:25 -04:00
|
|
|
|
2014-10-21 16:02:30 -04:00
|
|
|
/** Returns the Z coord of the block in which the entity resides. */
|
|
|
|
int GetBlockZ() const { return POSZ_TOINT; }
|
|
|
|
|
|
|
|
// tolua_end
|
2014-03-14 21:45:25 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
|
2014-07-22 18:36:13 -04:00
|
|
|
virtual void Tick(float a_Dt, cChunk & a_Chunk) override {}
|
2014-03-14 21:45:25 -04:00
|
|
|
|
2014-10-21 16:02:30 -04:00
|
|
|
eBlockFace m_Facing;
|
2014-03-14 21:45:25 -04:00
|
|
|
|
|
|
|
}; // tolua_export
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|