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/MobRenderer.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Minecraft.Client/MobRenderer.cpp') diff --git a/Minecraft.Client/MobRenderer.cpp b/Minecraft.Client/MobRenderer.cpp index 92c89394..ee512530 100644 --- a/Minecraft.Client/MobRenderer.cpp +++ b/Minecraft.Client/MobRenderer.cpp @@ -30,7 +30,7 @@ void MobRenderer::renderLeash(shared_ptr entity, double x, double y, double { shared_ptr roper = entity->getLeashHolder(); // roper = entityRenderDispatcher.cameraEntity; - if (roper != nullptr) + if (roper != NULL) { glColor4f(1.0f, 1.0f, 1.0f, 1.0f); @@ -61,9 +61,9 @@ void MobRenderer::renderLeash(shared_ptr entity, double x, double y, double x += rotOffCos; z += rotOffSin; - double dx = static_cast(endX - startX); - double dy = static_cast(endY - startY); - double dz = static_cast(endZ - startZ); + double dx = (float) (endX - startX); + double dy = (float) (endY - startY); + double dz = (float) (endZ - startZ); glDisable(GL_TEXTURE_2D); glDisable(GL_LIGHTING); @@ -92,9 +92,9 @@ void MobRenderer::renderLeash(shared_ptr entity, double x, double y, double { tessellator->color(rDarkCol, gDarkCol, bDarkCol, 1.0F); } - float aa = static_cast(k) / static_cast(steps); - tessellator->vertex(x + (dx * aa) + 0, y + (dy * ((aa * aa) + aa) * 0.5) + (((static_cast(steps) - static_cast(k)) / (steps * 0.75F)) + 0.125F), z + (dz * aa)); - tessellator->vertex(x + (dx * aa) + width, y + (dy * ((aa * aa) + aa) * 0.5) + (((static_cast(steps) - static_cast(k)) / (steps * 0.75F)) + 0.125F) + width, z + (dz * aa)); + float aa = (float) k / (float) steps; + tessellator->vertex(x + (dx * aa) + 0, y + (dy * ((aa * aa) + aa) * 0.5) + ((((float) steps - (float) k) / (steps * 0.75F)) + 0.125F), z + (dz * aa)); + tessellator->vertex(x + (dx * aa) + width, y + (dy * ((aa * aa) + aa) * 0.5) + ((((float) steps - (float) k) / (steps * 0.75F)) + 0.125F) + width, z + (dz * aa)); } tessellator->end(); @@ -109,9 +109,9 @@ void MobRenderer::renderLeash(shared_ptr entity, double x, double y, double { tessellator->color(rDarkCol, gDarkCol, bDarkCol, 1.0F); } - float aa = static_cast(k) / static_cast(steps); - tessellator->vertex(x + (dx * aa) + 0, y + (dy * ((aa * aa) + aa) * 0.5) + (((static_cast(steps) - static_cast(k)) / (steps * 0.75F)) + 0.125F) + width, z + (dz * aa)); - tessellator->vertex(x + (dx * aa) + width, y + (dy * ((aa * aa) + aa) * 0.5) + (((static_cast(steps) - static_cast(k)) / (steps * 0.75F)) + 0.125F), z + (dz * aa) + width); + float aa = (float) k / (float) steps; + tessellator->vertex(x + (dx * aa) + 0, y + (dy * ((aa * aa) + aa) * 0.5) + ((((float) steps - (float) k) / (steps * 0.75F)) + 0.125F) + width, z + (dz * aa)); + tessellator->vertex(x + (dx * aa) + width, y + (dy * ((aa * aa) + aa) * 0.5) + ((((float) steps - (float) k) / (steps * 0.75F)) + 0.125F), z + (dz * aa) + width); } tessellator->end(); -- cgit v1.2.3