summaryrefslogtreecommitdiffstats
path: root/source/BlockArea.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-31 20:00:33 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-31 20:00:33 +0200
commite993e32410104f8f4655464137d878ca09ef8efc (patch)
tree4b9e4cb573610610129abdad3712a764fe5c85c5 /source/BlockArea.cpp
parentMineShafts: User-settable chance of individual pieces' occurence. Staircase-only mineshafts, yay :) (diff)
downloadcuberite-e993e32410104f8f4655464137d878ca09ef8efc.tar
cuberite-e993e32410104f8f4655464137d878ca09ef8efc.tar.gz
cuberite-e993e32410104f8f4655464137d878ca09ef8efc.tar.bz2
cuberite-e993e32410104f8f4655464137d878ca09ef8efc.tar.lz
cuberite-e993e32410104f8f4655464137d878ca09ef8efc.tar.xz
cuberite-e993e32410104f8f4655464137d878ca09ef8efc.tar.zst
cuberite-e993e32410104f8f4655464137d878ca09ef8efc.zip
Diffstat (limited to 'source/BlockArea.cpp')
-rw-r--r--source/BlockArea.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/BlockArea.cpp b/source/BlockArea.cpp
index b3ae4d916..ca2f6a5bb 100644
--- a/source/BlockArea.cpp
+++ b/source/BlockArea.cpp
@@ -1636,6 +1636,13 @@ bool cBlockArea::SetSize(int a_SizeX, int a_SizeY, int a_SizeZ, int a_DataTypes)
int cBlockArea::MakeIndex(int a_RelX, int a_RelY, int a_RelZ) const
{
+ ASSERT(a_RelX >= 0);
+ ASSERT(a_RelX < m_SizeX);
+ ASSERT(a_RelY >= 0);
+ ASSERT(a_RelY < m_SizeY);
+ ASSERT(a_RelZ >= 0);
+ ASSERT(a_RelZ < m_SizeZ);
+
return a_RelX + a_RelZ * m_SizeX + a_RelY * m_SizeX * m_SizeZ;
}