summaryrefslogtreecommitdiffstats
path: root/src/Entities/TNTEntity.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2020-10-05 12:27:14 +0200
committerGitHub <noreply@github.com>2020-10-05 12:27:14 +0200
commita9031b6bae742b333b1b390192fa590f2ecb07ea (patch)
treeb2802c81d24d339c201a0747d66ba44e9ea8b1b0 /src/Entities/TNTEntity.cpp
parentFixed current end generator (#4968) (diff)
downloadcuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.gz
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.bz2
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.lz
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.xz
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.zst
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/TNTEntity.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Entities/TNTEntity.cpp b/src/Entities/TNTEntity.cpp
index 6aea6e228..ef013c347 100644
--- a/src/Entities/TNTEntity.cpp
+++ b/src/Entities/TNTEntity.cpp
@@ -58,8 +58,12 @@ void cTNTEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
BroadcastMovementUpdate();
- m_FuseTicks -= 1;
- if (m_FuseTicks <= 0)
+ if (m_FuseTicks > 0)
+ {
+ --m_FuseTicks;
+ }
+
+ if (m_FuseTicks == 0)
{
Explode();
}