1
0
This commit is contained in:
Julian Laubstein 2014-10-20 19:36:16 +02:00
parent b78078a3a6
commit 48470c858b

View File

@ -269,10 +269,10 @@ void cChunkDesc::ReadBlockArea(cBlockArea & a_Dest, int a_MinRelX, int a_MaxRelX
LOGWARNING("%s: MaxRelX less than zero, adjusting to zero", __FUNCTION__); LOGWARNING("%s: MaxRelX less than zero, adjusting to zero", __FUNCTION__);
a_MaxRelX = 0; a_MaxRelX = 0;
} }
else if (a_MaxRelX >= cChunkDef::Width) else if (a_MaxRelX > cChunkDef::Width)
{ {
LOGWARNING("%s: MaxRelX more than chunk width, adjusting to chunk width", __FUNCTION__); LOGWARNING("%s: MaxRelX more than chunk width, adjusting to chunk width", __FUNCTION__);
a_MaxRelX = cChunkDef::Width - 1; a_MaxRelX = cChunkDef::Width;
} }
if (a_MinRelY < 0) if (a_MinRelY < 0)
@ -290,10 +290,10 @@ void cChunkDesc::ReadBlockArea(cBlockArea & a_Dest, int a_MinRelX, int a_MaxRelX
LOGWARNING("%s: MaxRelY less than zero, adjusting to zero", __FUNCTION__); LOGWARNING("%s: MaxRelY less than zero, adjusting to zero", __FUNCTION__);
a_MaxRelY = 0; a_MaxRelY = 0;
} }
else if (a_MaxRelY >= cChunkDef::Height) else if (a_MaxRelY > cChunkDef::Height)
{ {
LOGWARNING("%s: MaxRelY more than chunk height, adjusting to chunk height", __FUNCTION__); LOGWARNING("%s: MaxRelY more than chunk height, adjusting to chunk height", __FUNCTION__);
a_MaxRelY = cChunkDef::Height - 1; a_MaxRelY = cChunkDef::Height;
} }
if (a_MinRelZ < 0) if (a_MinRelZ < 0)
@ -311,10 +311,10 @@ void cChunkDesc::ReadBlockArea(cBlockArea & a_Dest, int a_MinRelX, int a_MaxRelX
LOGWARNING("%s: MaxRelZ less than zero, adjusting to zero", __FUNCTION__); LOGWARNING("%s: MaxRelZ less than zero, adjusting to zero", __FUNCTION__);
a_MaxRelZ = 0; a_MaxRelZ = 0;
} }
else if (a_MaxRelZ >= cChunkDef::Width) else if (a_MaxRelZ > cChunkDef::Width)
{ {
LOGWARNING("%s: MaxRelZ more than chunk width, adjusting to chunk width", __FUNCTION__); LOGWARNING("%s: MaxRelZ more than chunk width, adjusting to chunk width", __FUNCTION__);
a_MaxRelZ = cChunkDef::Width - 1; a_MaxRelZ = cChunkDef::Width;
} }
// Prepare the block area: // Prepare the block area: