From b1b7424c43d6c89cbd772f76b7d405de4dd3b462 Mon Sep 17 00:00:00 2001 From: Simerson <66266021+Simerson@users.noreply.github.com> Date: Thu, 28 Jan 2021 23:39:40 +0100 Subject: [PATCH] Creative mode hits immediately disappear boats (#5117) Instant destroy boat in creative mode + boat one-shot in creative mode + Add boat instant destroy in creative + Instant break boat in creative --- src/Entities/Boat.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Entities/Boat.cpp b/src/Entities/Boat.cpp index 4400cd4c0..cc11643fd 100644 --- a/src/Entities/Boat.cpp +++ b/src/Entities/Boat.cpp @@ -75,6 +75,16 @@ bool cBoat::DoTakeDamage(TakeDamageInfo & TDI) m_World->BroadcastEntityMetadata(*this); + if ((TDI.Attacker != nullptr) && (TDI.Attacker->IsPlayer())) + { + cPlayer * Destroyer = static_cast(TDI.Attacker); + if (Destroyer->IsGameModeCreative()) + { + Destroy(); + return true; + } + } + if (GetHealth() <= 0) { if (TDI.Attacker != nullptr)