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/BoatModel.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Minecraft.Client/BoatModel.cpp') diff --git a/Minecraft.Client/BoatModel.cpp b/Minecraft.Client/BoatModel.cpp index d0d465e5..5a55e7e8 100644 --- a/Minecraft.Client/BoatModel.cpp +++ b/Minecraft.Client/BoatModel.cpp @@ -14,20 +14,20 @@ BoatModel::BoatModel() : Model() int h = 20; int yOff = 4; - cubes[0]->addBox((float)(-w / 2), (float)(-h / 2 + 2), -3, w, h - 4, 4, 0); - cubes[0]->setPos(0, (float)(0 + yOff), 0); + cubes[0]->addBox(static_cast(-w / 2), static_cast(-h / 2 + 2), -3, w, h - 4, 4, 0); + cubes[0]->setPos(0, static_cast(0 + yOff), 0); - cubes[1]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); - cubes[1]->setPos((float)(-w / 2 + 1), (float)(0 + yOff), 0); + cubes[1]->addBox(static_cast(-w / 2 + 2), static_cast(-d - 1), -1, w - 4, d, 2, 0); + cubes[1]->setPos(static_cast(-w / 2 + 1), static_cast(0 + yOff), 0); - cubes[2]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); - cubes[2]->setPos((float)(+w / 2 - 1), (float)(0 + yOff), 0); + cubes[2]->addBox(static_cast(-w / 2 + 2), static_cast(-d - 1), -1, w - 4, d, 2, 0); + cubes[2]->setPos(static_cast(+w / 2 - 1), static_cast(0 + yOff), 0); - cubes[3]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); - cubes[3]->setPos(0, (float)(0 + yOff), (float)(-h / 2 + 1)); + cubes[3]->addBox(static_cast(-w / 2 + 2), static_cast(-d - 1), -1, w - 4, d, 2, 0); + cubes[3]->setPos(0, static_cast(0 + yOff), static_cast(-h / 2 + 1)); - cubes[4]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); - cubes[4]->setPos(0, (float)(0 + yOff), (float)(+h / 2 - 1)); + cubes[4]->addBox(static_cast(-w / 2 + 2), static_cast(-d - 1), -1, w - 4, d, 2, 0); + cubes[4]->setPos(0, static_cast(0 + yOff), static_cast(+h / 2 - 1)); cubes[0]->xRot = PI / 2; cubes[1]->yRot = PI / 2 * 3; -- cgit v1.2.3