summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Entities/Boat.cpp10
1 files changed, 10 insertions, 0 deletions
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<cPlayer *>(TDI.Attacker);
+ if (Destroyer->IsGameModeCreative())
+ {
+ Destroy();
+ return true;
+ }
+ }
+
if (GetHealth() <= 0)
{
if (TDI.Attacker != nullptr)