From a9031b6bae742b333b1b390192fa590f2ecb07ea Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Mon, 5 Oct 2020 11:27:14 +0100 Subject: Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963) * Fix cmake not adding Werror on clang, and _lots_ of warnings * WIP: Build fixes * Cannot make intermediate blockhandler instance * Tiger's changes * Fix BitIndex check * Handle invalid NextState values in cMultiVersionProtocol Co-authored-by: Tiger Wang --- src/Entities/TNTEntity.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/Entities/TNTEntity.cpp') 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(); } -- cgit v1.2.3