blob: 1f4ce9003bccd1f887f833bb6d183c2f6a6a8d2f (
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
44
45
46
47
48
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
#include "Painting.h"
#include "Player.h"
#include "../ClientHandle.h"
#include "../Chunk.h"
cPainting::cPainting(const AString & a_Name, eBlockFace a_Direction, Vector3d a_Pos) :
Super(etPainting, a_Direction, a_Pos), m_Name(a_Name)
{
}
void cPainting::SpawnOn(cClientHandle & a_Client)
{
Super::SpawnOn(a_Client);
a_Client.SendPaintingSpawn(*this);
m_World->BroadcastSoundEffect("entity.painting.place", GetPosition(), 1, 1);
}
void cPainting::GetDrops(cItems & a_Items, cEntity * a_Killer)
{
a_Items.emplace_back(E_ITEM_PAINTING);
}
void cPainting::KilledBy(TakeDamageInfo & a_TDI)
{
Super::KilledBy(a_TDI);
m_World->BroadcastSoundEffect("entity.painting.break", GetPosition(), 1, 1);
}
|