diff options
| author | ModMaker101 <119018978+ModMaker101@users.noreply.github.com> | 2026-03-08 19:08:36 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-08 18:08:36 -0500 |
| commit | 28614b922fb77149a54da1a87bebfbc98736f296 (patch) | |
| tree | 7f828ba86a4ee18d0a80d29de64f6199a5412512 /Minecraft.Client/DragonModel.cpp | |
| parent | 88798b501d0cf6287b6f87acb2592676e3cec58d (diff) | |
Modernize project codebase (#906)
* 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
* Add safety checks and fix a issue with vector going OOR
Diffstat (limited to 'Minecraft.Client/DragonModel.cpp')
| -rw-r--r-- | Minecraft.Client/DragonModel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Minecraft.Client/DragonModel.cpp b/Minecraft.Client/DragonModel.cpp index 9e0499a9..f1f36743 100644 --- a/Minecraft.Client/DragonModel.cpp +++ b/Minecraft.Client/DragonModel.cpp @@ -159,7 +159,7 @@ void DragonModel::render(shared_ptr<Entity> entity, float time, float r, float b rr = (float) Mth::cos(i * 0.45f + roff) * 0.15f; neck->yRot = rotWrap(dragon->getHeadPartYRotDiff(i, start, p)) * PI / 180.0f * rotScale; // 4J replaced "p[0] - start[0] with call to getHeadPartYRotDiff - neck->xRot = rr + (float) (dragon->getHeadPartYOffset(i, start, p)) * PI / 180.0f * rotScale * 5.0f; // 4J replaced "p[1] - start[1]" with call to getHeadPartYOffset + neck->xRot = rr + static_cast<float>(dragon->getHeadPartYOffset(i, start, p)) * PI / 180.0f * rotScale * 5.0f; // 4J replaced "p[1] - start[1]" with call to getHeadPartYOffset neck->zRot = -rotWrap(p[0] - rot) * PI / 180.0f * rotScale; neck->y = yy; @@ -176,7 +176,7 @@ void DragonModel::render(shared_ptr<Entity> entity, float time, float r, float b head->x = xx; dragon->getLatencyPos(p, 0, a); head->yRot = rotWrap(dragon->getHeadPartYRotDiff(6, start, p)) * PI / 180.0f * 1; // 4J replaced "p[0] - start[0] with call to getHeadPartYRotDiff - head->xRot = (float) (dragon->getHeadPartYOffset(6, start, p)) * PI / 180.0f * rotScale * 5.0f; // 4J Added + head->xRot = static_cast<float>(dragon->getHeadPartYOffset(6, start, p)) * PI / 180.0f * rotScale * 5.0f; // 4J Added head->zRot = -rotWrap(p[0] - rot) * PI / 180 * 1; head->render(scale,usecompiled); glPushMatrix(); @@ -226,7 +226,7 @@ void DragonModel::render(shared_ptr<Entity> entity, float time, float r, float b dragon->getLatencyPos(p, 12 + i, a); rr += Mth::sin(i * 0.45f + roff) * 0.05f; neck->yRot = (rotWrap(p[0] - start[0]) * rotScale + 180) * PI / 180; - neck->xRot = rr + (float) (p[1] - start[1]) * PI / 180 * rotScale * 5; + neck->xRot = rr + static_cast<float>(p[1] - start[1]) * PI / 180 * rotScale * 5; neck->zRot = rotWrap(p[0] - rot) * PI / 180 * rotScale; neck->y = yy; neck->z = zz; @@ -244,5 +244,5 @@ float DragonModel::rotWrap(double d) d -= 360; while (d < -180) d += 360; - return (float) d; + return static_cast<float>(d); }
\ No newline at end of file |
