summaryrefslogtreecommitdiffstats
path: root/src/Entities/Painting.cpp
diff options
context:
space:
mode:
authorEthan Jones <ethan@yasfu.net>2021-10-03 22:29:45 +0200
committerGitHub <noreply@github.com>2021-10-03 22:29:45 +0200
commitafe07fe0900e5e03f439656558a953acf16f35b8 (patch)
tree1946a7980c5799bc4e028e78c6747102e4b92fba /src/Entities/Painting.cpp
parentAuthenticator: avoid move assignments to self (#5315) (diff)
downloadcuberite-afe07fe0900e5e03f439656558a953acf16f35b8.tar
cuberite-afe07fe0900e5e03f439656558a953acf16f35b8.tar.gz
cuberite-afe07fe0900e5e03f439656558a953acf16f35b8.tar.bz2
cuberite-afe07fe0900e5e03f439656558a953acf16f35b8.tar.lz
cuberite-afe07fe0900e5e03f439656558a953acf16f35b8.tar.xz
cuberite-afe07fe0900e5e03f439656558a953acf16f35b8.tar.zst
cuberite-afe07fe0900e5e03f439656558a953acf16f35b8.zip
Diffstat (limited to 'src/Entities/Painting.cpp')
-rw-r--r--src/Entities/Painting.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Entities/Painting.cpp b/src/Entities/Painting.cpp
index 1f9662019..dc1781fde 100644
--- a/src/Entities/Painting.cpp
+++ b/src/Entities/Painting.cpp
@@ -34,10 +34,7 @@ void cPainting::SpawnOn(cClientHandle & a_Client)
void cPainting::GetDrops(cItems & a_Items, cEntity * a_Killer)
{
- if ((a_Killer != nullptr) && a_Killer->IsPlayer() && !static_cast<cPlayer *>(a_Killer)->IsGameModeCreative())
- {
- a_Items.emplace_back(E_ITEM_PAINTING);
- }
+ a_Items.emplace_back(E_ITEM_PAINTING);
}
@@ -47,6 +44,6 @@ void cPainting::GetDrops(cItems & a_Items, cEntity * a_Killer)
void cPainting::KilledBy(TakeDamageInfo & a_TDI)
{
Super::KilledBy(a_TDI);
+
m_World->BroadcastSoundEffect("entity.painting.break", GetPosition(), 1, 1);
- Destroy();
}