2014-03-14 21:45:25 -04:00
|
|
|
|
|
|
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
|
|
|
|
|
|
|
#include "HangingEntity.h"
|
|
|
|
#include "Player.h"
|
2018-08-28 20:51:25 -04:00
|
|
|
#include "../ClientHandle.h"
|
2014-03-14 21:45:25 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-29 08:59:24 -04:00
|
|
|
cHangingEntity::cHangingEntity(eEntityType a_EntityType, eBlockFace a_Facing, Vector3d a_Pos) :
|
2020-04-13 12:38:06 -04:00
|
|
|
Super(a_EntityType, a_Pos, 0.8, 0.8),
|
2015-03-13 18:29:27 -04:00
|
|
|
m_Facing(cHangingEntity::BlockFaceToProtocolFace(a_Facing))
|
2014-03-14 21:45:25 -04:00
|
|
|
{
|
|
|
|
SetMaxHealth(1);
|
|
|
|
SetHealth(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void cHangingEntity::SpawnOn(cClientHandle & a_ClientHandle)
|
|
|
|
{
|
2015-03-13 18:29:27 -04:00
|
|
|
SetYaw(GetProtocolFacing() * 90);
|
2014-03-14 21:45:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|