Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.
This reverts commit a9be52c41a.
This commit is contained in:
@@ -52,19 +52,19 @@ void ChestRenderer::render(shared_ptr<TileEntity> _chest, double x, double y, d
|
||||
Tile *tile = chest->getTile();
|
||||
data = chest->getData();
|
||||
|
||||
if (dynamic_cast<ChestTile*>(tile) != nullptr && data == 0)
|
||||
if (dynamic_cast<ChestTile*>(tile) != NULL && data == 0)
|
||||
{
|
||||
static_cast<ChestTile *>(tile)->recalcLockDir(chest->getLevel(), chest->x, chest->y, chest->z);
|
||||
((ChestTile *) tile)->recalcLockDir(chest->getLevel(), chest->x, chest->y, chest->z);
|
||||
data = chest->getData();
|
||||
}
|
||||
|
||||
chest->checkNeighbors();
|
||||
}
|
||||
if (chest->n.lock() != nullptr || chest->w.lock() != nullptr) return;
|
||||
if (chest->n.lock() != NULL || chest->w.lock() != NULL) return;
|
||||
|
||||
|
||||
ChestModel *model;
|
||||
if (chest->e.lock() != nullptr || chest->s.lock() != nullptr)
|
||||
if (chest->e.lock() != NULL || chest->s.lock() != NULL)
|
||||
{
|
||||
model = largeChestModel;
|
||||
|
||||
@@ -102,7 +102,7 @@ void ChestRenderer::render(shared_ptr<TileEntity> _chest, double x, double y, d
|
||||
glEnable(GL_RESCALE_NORMAL);
|
||||
//if( setColor ) glColor4f(1, 1, 1, 1);
|
||||
if( setColor ) glColor4f(1, 1, 1, alpha);
|
||||
glTranslatef(static_cast<float>(x), static_cast<float>(y) + 1, static_cast<float>(z) + 1);
|
||||
glTranslatef((float) x, (float) y + 1, (float) z + 1);
|
||||
glScalef(1, -1, -1);
|
||||
|
||||
glTranslatef(0.5f, 0.5f, 0.5f);
|
||||
@@ -112,11 +112,11 @@ void ChestRenderer::render(shared_ptr<TileEntity> _chest, double x, double y, d
|
||||
if (data == 4) rot = 90;
|
||||
if (data == 5) rot = -90;
|
||||
|
||||
if (data == 2 && chest->e.lock() != nullptr)
|
||||
if (data == 2 && chest->e.lock() != NULL)
|
||||
{
|
||||
glTranslatef(1, 0, 0);
|
||||
}
|
||||
if (data == 5 && chest->s.lock() != nullptr)
|
||||
if (data == 5 && chest->s.lock() != NULL)
|
||||
{
|
||||
glTranslatef(0, 0, -1);
|
||||
}
|
||||
@@ -124,12 +124,12 @@ void ChestRenderer::render(shared_ptr<TileEntity> _chest, double x, double y, d
|
||||
glTranslatef(-0.5f, -0.5f, -0.5f);
|
||||
|
||||
float open = chest->oOpenness + (chest->openness - chest->oOpenness) * a;
|
||||
if (chest->n.lock() != nullptr)
|
||||
if (chest->n.lock() != NULL)
|
||||
{
|
||||
float open2 = chest->n.lock()->oOpenness + (chest->n.lock()->openness - chest->n.lock()->oOpenness) * a;
|
||||
if (open2 > open) open = open2;
|
||||
}
|
||||
if (chest->w.lock() != nullptr)
|
||||
if (chest->w.lock() != NULL)
|
||||
{
|
||||
float open2 = chest->w.lock()->oOpenness + (chest->w.lock()->openness - chest->w.lock()->oOpenness) * a;
|
||||
if (open2 > open) open = open2;
|
||||
|
||||
Reference in New Issue
Block a user