diff options
Diffstat (limited to '')
-rw-r--r-- | src/Chunk.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp index 663713cf3..7bf7f0567 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -479,8 +479,15 @@ bool cChunk::HasBlockEntityAt(Vector3i a_BlockPos) void cChunk::Stay(bool a_Stay) { - m_StayCount += (a_Stay ? 1 : -1); - ASSERT(m_StayCount >= 0); + if (a_Stay) + { + m_StayCount++; + } + else + { + ASSERT(m_StayCount != 0); + m_StayCount--; + } } |