1
0

cPainting saving implemented

Additionally, it now inherits from cHangingEntity.
This commit is contained in:
Tiger Wang
2015-03-13 23:05:06 +00:00
parent e15e30a030
commit 3d398baf35
13 changed files with 83 additions and 72 deletions

View File

@@ -10,10 +10,9 @@
cPainting::cPainting(const AString & a_Name, int a_Direction, double a_X, double a_Y, double a_Z)
: cEntity(etPainting, a_X, a_Y, a_Z, 1, 1),
m_Name(a_Name),
m_Direction(a_Direction)
cPainting::cPainting(const AString & a_Name, eBlockFace a_Direction, double a_X, double a_Y, double a_Z)
: cHangingEntity(etPainting, a_Direction, a_X, a_Y, a_Z),
m_Name(a_Name)
{
}
@@ -24,6 +23,7 @@ cPainting::cPainting(const AString & a_Name, int a_Direction, double a_X, double
void cPainting::SpawnOn(cClientHandle & a_Client)
{
super::SpawnOn(a_Client);
a_Client.SendPaintingSpawn(*this);
}
@@ -31,16 +31,6 @@ void cPainting::SpawnOn(cClientHandle & a_Client)
void cPainting::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
UNUSED(a_Dt);
UNUSED(a_Chunk);
}
void cPainting::GetDrops(cItems & a_Items, cEntity * a_Killer)
{
if ((a_Killer != nullptr) && a_Killer->IsPlayer() && !((cPlayer *)a_Killer)->IsGameModeCreative())