Still dealing with a very strange issue (Mind fixing it, Kacperks?)
This commit is contained in:
@@ -19,13 +19,13 @@ class NodeRenderer
|
||||
|
||||
int renderNode(int x, int y, int z)
|
||||
{
|
||||
//Position2D block = BlockUtilities::getBlockFromNodeCoordinates(x, z); // The block the node at (x, y, z) is in
|
||||
Position2D block = BlockUtilities::getBlockFromNodeCoordinates(x, z); // The block the node at (x, y, z) is in
|
||||
|
||||
glColor3f(1.0F, 1.0F, 1.0F);
|
||||
|
||||
glBegin(GL_QUADS);
|
||||
// Front
|
||||
if(blockManager.getNodeAt(x, y, z - 1))
|
||||
if(blockManager.mapBlocks[block.x][block.z].getNodeAt(x - block.x * 16, y, z - block.z * 16 - 1) == 0)
|
||||
{
|
||||
glTexCoord2f(.0F, .0F);
|
||||
glVertex3f(x + .0F, y + 1.0F, z + .0F);
|
||||
@@ -42,11 +42,10 @@ class NodeRenderer
|
||||
glColor3f(1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Back
|
||||
if(blockManager.getNodeAt(x, y, z + 1))
|
||||
if(blockManager.mapBlocks[block.x][block.z].getNodeAt(x - block.x * 16, y, z - block.z * 16 + 1) == 0)
|
||||
{
|
||||
|
||||
glTexCoord2f(.0F, .0F);
|
||||
glVertex3f(x + .0F, y + 1.0F, z + 1.0F);
|
||||
|
||||
@@ -63,7 +62,7 @@ class NodeRenderer
|
||||
}
|
||||
|
||||
// Right
|
||||
if(blockManager.getNodeAt(x + 1, y, z));
|
||||
if(blockManager.mapBlocks[block.x][block.z].getNodeAt(x - block.x * 16 + 1, y, z - block.z * 16) == 0);
|
||||
{
|
||||
glTexCoord2f(1.0F, .0F);
|
||||
glVertex3f(x + 1.0F, y + 1.0F, z + .0F);
|
||||
@@ -80,10 +79,8 @@ class NodeRenderer
|
||||
glVertex3f(x + 1.0F, y + 1.0F, z + 1.0F);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Left
|
||||
if(blockManager.getNodeAt(x - 1, y, z));
|
||||
if(blockManager.mapBlocks[block.x][block.z].getNodeAt(x - block.x * 16 - 1, y, z - block.z * 16) == 0);
|
||||
{
|
||||
glTexCoord2f(1.0F, .0F);
|
||||
glVertex3f(x + .0F, y + 1.0F, z + .0F);
|
||||
@@ -101,7 +98,7 @@ class NodeRenderer
|
||||
}
|
||||
|
||||
// Bottom
|
||||
if(blockManager.getNodeAt(x, y - 1, z));
|
||||
if(blockManager.getNodeAt(x, y - 1, z) == 0);
|
||||
{
|
||||
glTexCoord2f(.0F, .0F);
|
||||
glVertex3f(x + 1.0F, y + .0F, z + .0F);
|
||||
@@ -117,7 +114,7 @@ class NodeRenderer
|
||||
}
|
||||
|
||||
// Top
|
||||
if(blockManager.getNodeAt(x, y + 1, z));
|
||||
/*if(blockManager.mapBlocks[block.x][block.z].getNodeAt(x - block.x * 16, y + 1, z - block.z * 16) == 0);
|
||||
{
|
||||
glTexCoord2f(.0F, .0F);
|
||||
glVertex3f(x + 1.0F, y + 1.0F, z + .0F);
|
||||
@@ -130,7 +127,7 @@ class NodeRenderer
|
||||
|
||||
glTexCoord2f(.0F, 1.0F);
|
||||
glVertex3f(x + 1.0F, y + 1.0F, z + 1.0F);
|
||||
}
|
||||
}*/
|
||||
|
||||
glEnd();
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user