1
0

Fixed a bug in cChunk::QueueTickBlockNeighbors() that caused the tick thread to overload easily

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1229 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2013-02-28 21:36:43 +00:00
parent 619ec8b247
commit ee7f36f682

View File

@ -1193,8 +1193,6 @@ void cChunk::QueueTickBlock(int a_RelX, int a_RelY, int a_RelZ)
void cChunk::QueueTickBlockNeighbors(int a_RelX, int a_RelY, int a_RelZ) void cChunk::QueueTickBlockNeighbors(int a_RelX, int a_RelY, int a_RelZ)
{ {
int BlockX = m_PosX * cChunkDef::Width + a_RelX;
int BlockZ = m_PosZ * cChunkDef::Width + a_RelZ;
struct struct
{ {
int x, y, z; int x, y, z;
@ -1210,7 +1208,7 @@ void cChunk::QueueTickBlockNeighbors(int a_RelX, int a_RelY, int a_RelZ)
} ; } ;
for (int i = 0; i < ARRAYCOUNT(Coords); i++) for (int i = 0; i < ARRAYCOUNT(Coords); i++)
{ {
cChunk * ch = GetNeighborChunk(BlockX + Coords[i].x, a_RelY, BlockZ + Coords[i].z); cChunk * ch = GetNeighborChunk(a_RelX + Coords[i].x, a_RelY, a_RelZ + Coords[i].z);
if (ch != NULL) if (ch != NULL)
{ {
ch->QueueTickBlock(a_RelX + Coords[i].x, a_RelY + Coords[i].y, a_RelZ + Coords[i].z); ch->QueueTickBlock(a_RelX + Coords[i].x, a_RelY + Coords[i].y, a_RelZ + Coords[i].z);