From a9be52c41a02d207233199e98898fe7483d7e817 Mon Sep 17 00:00:00 2001 From: ModMaker101 <119018978+ModMaker101@users.noreply.github.com> Date: Sat, 7 Mar 2026 21:56:03 -0500 Subject: Project modernization (#630) * Fixed boats falling and a TP glitch #266 * Replaced every C-style cast with C++ ones * Replaced every C-style cast with C++ ones * Fixed boats falling and a TP glitch #266 * Updated NULL to nullptr and fixing some type issues * Modernized and fixed a few bugs - Replaced most instances of `NULL` with `nullptr`. - Replaced most `shared_ptr(new ...)` with `make_shared`. - Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances. * Fixing more conflicts * Replace int loops with size_t and start work on overrides --- Minecraft.Client/SpiderModel.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'Minecraft.Client/SpiderModel.cpp') diff --git a/Minecraft.Client/SpiderModel.cpp b/Minecraft.Client/SpiderModel.cpp index 739677e4..0cdc14ca 100644 --- a/Minecraft.Client/SpiderModel.cpp +++ b/Minecraft.Client/SpiderModel.cpp @@ -11,48 +11,48 @@ SpiderModel::SpiderModel() : Model() head = new ModelPart(this, 32, 4); head->addBox(-4, -4, -8, 8, 8, 8, g); // Head - head->setPos(0, (float)(0+yo), -3); + head->setPos(0, static_cast(0 + yo), -3); body0 = new ModelPart(this, 0, 0); body0->addBox(-3, -3, -3, 6, 6, 6, g); // Body - body0->setPos(0,(float)(yo), 0); + body0->setPos(0,static_cast(yo), 0); body1 = new ModelPart(this, 0, 12); body1->addBox(-5, -4, -6, 10, 8, 12, g); // Body - body1->setPos(0, (float)(0+yo), 3 + 6); + body1->setPos(0, static_cast(0 + yo), 3 + 6); leg0 = new ModelPart(this, 18, 0); leg0->addBox(-15, -1, -1, 16, 2, 2, g); // Leg0 - leg0->setPos(-4, (float)(0+yo), 2); + leg0->setPos(-4, static_cast(0 + yo), 2); leg1 = new ModelPart(this, 18, 0); leg1->addBox(-1, -1, -1, 16, 2, 2, g); // Leg1 - leg1->setPos(4, (float)(0+yo), 2); + leg1->setPos(4, static_cast(0 + yo), 2); leg2 = new ModelPart(this, 18, 0); leg2->addBox(-15, -1, -1, 16, 2, 2, g); // Leg2 - leg2->setPos(-4, (float)(0+yo), 1); + leg2->setPos(-4, static_cast(0 + yo), 1); leg3 = new ModelPart(this, 18, 0); leg3->addBox(-1, -1, -1, 16, 2, 2, g); // Leg3 - leg3->setPos(4, (float)(0+yo), 1); + leg3->setPos(4, static_cast(0 + yo), 1); leg4 = new ModelPart(this, 18, 0); leg4->addBox(-15, -1, -1, 16, 2, 2, g); // Leg0 - leg4->setPos(-4, (float)(0+yo), 0); + leg4->setPos(-4, static_cast(0 + yo), 0); leg5 = new ModelPart(this, 18, 0); leg5->addBox(-1, -1, -1, 16, 2, 2, g); // Leg1 - leg5->setPos(4, (float)(0+yo), 0); + leg5->setPos(4, static_cast(0 + yo), 0); leg6 = new ModelPart(this, 18, 0); leg6->addBox(-15, -1, -1, 16, 2, 2, g); // Leg2 - leg6->setPos(-4, (float)(0+yo), -1); + leg6->setPos(-4, static_cast(0 + yo), -1); leg7 = new ModelPart(this, 18, 0); leg7->addBox(-1, -1, -1, 16, 2, 2, g); // Leg3 - leg7->setPos(4, (float)(0+yo), -1); + leg7->setPos(4, static_cast(0 + yo), -1); // 4J added - compile now to avoid random performance hit first time cubes are rendered head->compile(1.0f/16.0f); -- cgit v1.2.3