From afe07fe0900e5e03f439656558a953acf16f35b8 Mon Sep 17 00:00:00 2001 From: Ethan Jones Date: Sun, 3 Oct 2021 14:29:45 -0600 Subject: Prevent placing of hangables on illegal blocks and break when support block broken (#5301) + Prevent placing of hangables on illegal items and break when support block is broken Co-authored-by: Tiger Wang --- src/Entities/Painting.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/Entities/Painting.cpp') 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(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(); } -- cgit v1.2.3