blob: 507c911aff6cb16baaecf323192aa4cc34b315f8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
#include "Painting.h"
#include "ClientHandle.h"
#include "Player.h"
#include "../Chunk.h"
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)
{
}
void cPainting::SpawnOn(cClientHandle & a_Client)
{
super::SpawnOn(a_Client);
a_Client.SendPaintingSpawn(*this);
}
void cPainting::GetDrops(cItems & a_Items, cEntity * a_Killer)
{
if ((a_Killer != nullptr) && a_Killer->IsPlayer() && !static_cast<cPlayer *>(a_Killer)->IsGameModeCreative())
{
a_Items.push_back(cItem(E_ITEM_PAINTING));
}
}
|