diff options
| author | daoge <3523206925@qq.com> | 2026-03-03 03:04:10 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-03 03:04:10 +0800 |
| commit | b3feddfef372618c8a9d7a0abcaf18cfad866c18 (patch) | |
| tree | 267761c3bb39241ba5c347bfbe2254d06686e287 /Minecraft.Client/SkeletonModel.cpp | |
| parent | 84c31a2331f7a0ec85b9d438992e244f60e5020f (diff) | |
feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict
* feat: TU19 (Dec 2014) Features & Content (#32)
* December 2014 files
* Working release build
* Fix compilation issues
* Add sound to Windows64Media
* Add DLC content and force Tutorial DLC
* Revert "Add DLC content and force Tutorial DLC"
This reverts commit 97a43994725008e35fceb984d5549df9c8cea470.
* Disable broken light packing
* Disable breakpoint during DLC texture map load
Allows DLC loading but the DLC textures are still broken
* Fix post build not working
* ...
* fix vs2022 build
* fix cmake build
---------
Co-authored-by: Loki <lokirautio@gmail.com>
Diffstat (limited to 'Minecraft.Client/SkeletonModel.cpp')
| -rw-r--r-- | Minecraft.Client/SkeletonModel.cpp | 46 |
1 files changed, 27 insertions, 19 deletions
diff --git a/Minecraft.Client/SkeletonModel.cpp b/Minecraft.Client/SkeletonModel.cpp index ab4778ee..7cdba9e2 100644 --- a/Minecraft.Client/SkeletonModel.cpp +++ b/Minecraft.Client/SkeletonModel.cpp @@ -1,38 +1,39 @@ #include "stdafx.h" #include "SkeletonModel.h" #include "..\Minecraft.World\Mth.h" +#include "..\Minecraft.World\net.minecraft.world.entity.monster.h" #include "ModelPart.h" void SkeletonModel::_init(float g) { - arm0 = new ModelPart(this, 24 + 16, 16); - arm0->addBox(-1, -2, -1, 2, 12, 2, g); // Arm0 - arm0->setPos(-5, 2, 0); + arm0 = new ModelPart(this, 24 + 16, 16); + arm0->addBox(-1, -2, -1, 2, 12, 2, g); // Arm0 + arm0->setPos(-5, 2, 0); - arm1 = new ModelPart(this, 24 + 16, 16); - arm1->bMirror = true; - arm1->addBox(-1, -2, -1, 2, 12, 2, g); // Arm1 - arm1->setPos(5, 2, 0); + arm1 = new ModelPart(this, 24 + 16, 16); + arm1->bMirror = true; + arm1->addBox(-1, -2, -1, 2, 12, 2, g); // Arm1 + arm1->setPos(5, 2, 0); - leg0 = new ModelPart(this, 0, 16); - leg0->addBox(-1, 0, -1, 2, 12, 2, g); // Leg0 - leg0->setPos(-2, 12, 0); + leg0 = new ModelPart(this, 0, 16); + leg0->addBox(-1, 0, -1, 2, 12, 2, g); // Leg0 + leg0->setPos(-2, 12, 0); - leg1 = new ModelPart(this, 0, 16); - leg1->bMirror = true; - leg1->addBox(-1, 0, -1, 2, 12, 2, g); // Leg1 - leg1->setPos(2, 12, 0); + leg1 = new ModelPart(this, 0, 16); + leg1->bMirror = true; + leg1->addBox(-1, 0, -1, 2, 12, 2, g); // Leg1 + leg1->setPos(2, 12, 0); // 4J added - compile now to avoid random performance hit first time cubes are rendered arm0->compile(1.0f/16.0f); - arm1->compile(1.0f/16.0f); + arm1->compile(1.0f/16.0f); leg0->compile(1.0f/16.0f); - leg1->compile(1.0f/16.0f); + leg1->compile(1.0f/16.0f); } SkeletonModel::SkeletonModel() : ZombieModel(0, 0, 64, 32) { - _init(0); + _init(0); } SkeletonModel::SkeletonModel(float g) : ZombieModel(g, 0, 64, 32) @@ -40,8 +41,15 @@ SkeletonModel::SkeletonModel(float g) : ZombieModel(g, 0, 64, 32) _init(g); } -void SkeletonModel::setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim) +void SkeletonModel::prepareMobModel(shared_ptr<LivingEntity> mob, float time, float r, float a) +{ + ZombieModel::prepareMobModel(mob, time, r, a); + + bowAndArrow = dynamic_pointer_cast<Skeleton>(mob)->getSkeletonType() == Skeleton::TYPE_WITHER; +} + +void SkeletonModel::setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, shared_ptr<Entity> entity, unsigned int uiBitmaskOverrideAnim) { bowAndArrow=true; - ZombieModel::setupAnim(time, r, bob, yRot, xRot, scale, uiBitmaskOverrideAnim); + ZombieModel::setupAnim(time, r, bob, yRot, xRot, scale, entity, uiBitmaskOverrideAnim); }
\ No newline at end of file |
