summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-03-15 03:28:18 +0100
committerGitHub <noreply@github.com>2021-03-15 03:28:18 +0100
commit45591cbe7bef4c54c241a286ece07bc4ade4489e (patch)
treea6b2b8a7e8c2d2986612e70cd904f5446b82e2d6 /src/Chunk.cpp
parentFixed some death messages showing up even when they are disabled. (#5153) (diff)
downloadcuberite-45591cbe7bef4c54c241a286ece07bc4ade4489e.tar
cuberite-45591cbe7bef4c54c241a286ece07bc4ade4489e.tar.gz
cuberite-45591cbe7bef4c54c241a286ece07bc4ade4489e.tar.bz2
cuberite-45591cbe7bef4c54c241a286ece07bc4ade4489e.tar.lz
cuberite-45591cbe7bef4c54c241a286ece07bc4ade4489e.tar.xz
cuberite-45591cbe7bef4c54c241a286ece07bc4ade4489e.tar.zst
cuberite-45591cbe7bef4c54c241a286ece07bc4ade4489e.zip
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r--src/Chunk.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index dd5944313..161a42512 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -1293,8 +1293,7 @@ void cChunk::SetBlock(Vector3i a_RelPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_Blo
void cChunk::FastSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, BLOCKTYPE a_BlockMeta)
{
- ASSERT(!((a_RelX < 0) || (a_RelX >= cChunkDef::Width) || (a_RelY < 0) || (a_RelY >= cChunkDef::Height) || (a_RelZ < 0) || (a_RelZ >= cChunkDef::Width)));
-
+ ASSERT(cChunkDef::IsValidRelPos({ a_RelX, a_RelY, a_RelZ }));
ASSERT(IsValid());
const BLOCKTYPE OldBlockType = GetBlock(a_RelX, a_RelY, a_RelZ);