diff options
author | Ethan Jones <ethan@yasfu.net> | 2021-10-03 22:29:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-03 22:29:45 +0200 |
commit | afe07fe0900e5e03f439656558a953acf16f35b8 (patch) | |
tree | 1946a7980c5799bc4e028e78c6747102e4b92fba /src/Entities/Painting.cpp | |
parent | Authenticator: avoid move assignments to self (#5315) (diff) | |
download | cuberite-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.cpp | 7 |
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(); } |