2014-02-17 19:16:03 -05:00
|
|
|
|
|
|
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
|
|
|
|
|
|
|
#include "Painting.h"
|
|
|
|
#include "Player.h"
|
2018-08-28 20:51:25 -04:00
|
|
|
#include "../ClientHandle.h"
|
2014-02-28 10:26:23 -05:00
|
|
|
#include "../Chunk.h"
|
2014-02-17 19:16:03 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-29 08:59:24 -04:00
|
|
|
cPainting::cPainting(const AString & a_Name, eBlockFace a_Direction, Vector3d a_Pos):
|
2020-04-13 12:38:06 -04:00
|
|
|
Super(etPainting, a_Direction, a_Pos),
|
2015-03-13 19:05:06 -04:00
|
|
|
m_Name(a_Name)
|
2014-02-17 19:16:03 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void cPainting::SpawnOn(cClientHandle & a_Client)
|
|
|
|
{
|
2020-04-13 12:38:06 -04:00
|
|
|
Super::SpawnOn(a_Client);
|
2014-02-17 19:16:03 -05:00
|
|
|
a_Client.SendPaintingSpawn(*this);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void cPainting::GetDrops(cItems & a_Items, cEntity * a_Killer)
|
|
|
|
{
|
2015-05-24 07:56:56 -04:00
|
|
|
if ((a_Killer != nullptr) && a_Killer->IsPlayer() && !static_cast<cPlayer *>(a_Killer)->IsGameModeCreative())
|
2014-02-17 19:16:03 -05:00
|
|
|
{
|
|
|
|
a_Items.push_back(cItem(E_ITEM_PAINTING));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|