diff options
| author | void_17 <heroerror3@gmail.com> | 2026-03-02 15:58:20 +0700 |
|---|---|---|
| committer | void_17 <heroerror3@gmail.com> | 2026-03-02 15:58:20 +0700 |
| commit | 7074f35e4ba831e358117842b99ee35b87f85ae5 (patch) | |
| tree | 7d440d23473196af3056bf2ff4c59d9e740a06f5 /Minecraft.Client/DragonModel.cpp | |
| parent | d63f79325f85e014361eb8cf1e41eaebedb1ae71 (diff) | |
shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
Diffstat (limited to 'Minecraft.Client/DragonModel.cpp')
| -rw-r--r-- | Minecraft.Client/DragonModel.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Minecraft.Client/DragonModel.cpp b/Minecraft.Client/DragonModel.cpp index 39861829..e3ff4c53 100644 --- a/Minecraft.Client/DragonModel.cpp +++ b/Minecraft.Client/DragonModel.cpp @@ -106,15 +106,15 @@ DragonModel::DragonModel(float g) : Model() rearFoot->compile(1.0f/16.0f); } -void DragonModel::prepareMobModel(shared_ptr<Mob> mob, float time, float r, float a) +void DragonModel::prepareMobModel(std::shared_ptr<Mob> mob, float time, float r, float a) { this->a = a; } -void DragonModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void DragonModel::render(std::shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { glPushMatrix(); - shared_ptr<EnderDragon> dragon = dynamic_pointer_cast<EnderDragon>(entity); + std::shared_ptr<EnderDragon> dragon = dynamic_pointer_cast<EnderDragon>(entity); float ttt = dragon->oFlapTime + (dragon->flapTime - dragon->oFlapTime) * a; jaw->xRot = (float) (Mth::sin(ttt * PI * 2) + 1) * 0.2f; @@ -153,7 +153,7 @@ void DragonModel::render(shared_ptr<Entity> entity, float time, float r, float b double pComponents[3]; doubleArray p = doubleArray(pComponents,3); - for (int i = 0; i < 5; i++) + for (int i = 0; i < 5; i++) { dragon->getLatencyPos(p, 5 - i, a); @@ -185,9 +185,9 @@ void DragonModel::render(shared_ptr<Entity> entity, float time, float r, float b glTranslatef(0, -1, 0); body->zRot = 0; body->render(scale,usecompiled); - + glEnable(GL_CULL_FACE); - for (int i = 0; i < 2; i++) + for (int i = 0; i < 2; i++) { float flapTime = ttt * PI * 2; wing->xRot = 0.125f - (float) (Mth::cos(flapTime)) * 0.2f; @@ -206,7 +206,7 @@ void DragonModel::render(shared_ptr<Entity> entity, float time, float r, float b frontLeg->render(scale,usecompiled); rearLeg->render(scale,usecompiled); glScalef(-1, 1, 1); - if (i == 0) + if (i == 0) { glCullFace(GL_FRONT); } @@ -221,7 +221,7 @@ void DragonModel::render(shared_ptr<Entity> entity, float time, float r, float b zz = 60; xx = 0; dragon->getLatencyPos(start, 11, a); - for (int i = 0; i < 12; i++) + for (int i = 0; i < 12; i++) { dragon->getLatencyPos(p, 12 + i, a); rr += Mth::sin(i * 0.45f + roff) * 0.05f; @@ -238,7 +238,7 @@ void DragonModel::render(shared_ptr<Entity> entity, float time, float r, float b } glPopMatrix(); } -float DragonModel::rotWrap(double d) +float DragonModel::rotWrap(double d) { while (d >= 180) d -= 360; |
