summaryrefslogtreecommitdiffstats
path: root/src/Entities/Boat.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Entities/Boat.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Entities/Boat.cpp b/src/Entities/Boat.cpp
index 330e54740..f9b83eee5 100644
--- a/src/Entities/Boat.cpp
+++ b/src/Entities/Boat.cpp
@@ -102,6 +102,11 @@ void cBoat::OnRightClicked(cPlayer & a_Player)
void cBoat::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
super::Tick(a_Dt, a_Chunk);
+ if (!IsTicking())
+ {
+ // The base class tick destroyed us
+ return;
+ }
BroadcastMovementUpdate();
SetSpeed(GetSpeed() * 0.97); // Slowly decrease the speed