From 087b7e7abfe81dd7f0fdcdea36ac9f245950df1a Mon Sep 17 00:00:00 2001 From: Loki Rautio Date: Sat, 7 Mar 2026 21:12:22 -0600 Subject: 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 a9be52c41a02d207233199e98898fe7483d7e817. --- Minecraft.Client/ChestRenderer.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'Minecraft.Client/ChestRenderer.cpp') diff --git a/Minecraft.Client/ChestRenderer.cpp b/Minecraft.Client/ChestRenderer.cpp index 7d306f45..97954b55 100644 --- a/Minecraft.Client/ChestRenderer.cpp +++ b/Minecraft.Client/ChestRenderer.cpp @@ -52,19 +52,19 @@ void ChestRenderer::render(shared_ptr _chest, double x, double y, d Tile *tile = chest->getTile(); data = chest->getData(); - if (dynamic_cast(tile) != nullptr && data == 0) + if (dynamic_cast(tile) != NULL && data == 0) { - static_cast(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 _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(x), static_cast(y) + 1, static_cast(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 _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 _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; -- cgit v1.2.3