mirror of
https://git.neolegacy.dev/neoStudiosLCE/neoLegacy.git
synced 2026-11-25 00:11:05 +01:00
TU46 Test content and patches
TU46 Test content, added missing commits by amending commit and cherry-picking to new branch, ready for iggy guis and tu46 bug fixes
This commit is contained in:
1 parent
8d6b69f599
commit
ff562d1644
497 files changed
+11187
-771
No files matched your search
@@ -0,0 +1,44 @@
|
||||
#include "stdafx.h"
|
||||
#include "DragonHeadModel.h"
|
||||
#include "../Minecraft.World/Mth.h"
|
||||
|
||||
DragonHeadModel::DragonHeadModel() : Model()
|
||||
{
|
||||
texWidth = 256;
|
||||
texHeight = 256;
|
||||
|
||||
setMapTex(L"head.upperhead", 112, 30);
|
||||
setMapTex(L"head.upperlip", 176, 44);
|
||||
setMapTex(L"jaw.jaw", 176, 65);
|
||||
setMapTex(L"head.scale", 0, 0);
|
||||
setMapTex(L"head.nostril", 112, 0);
|
||||
|
||||
head = new ModelPart(this, L"head");
|
||||
head->addBox(L"upperlip", -6, -1, -24, 12, 5, 16);
|
||||
head->addBox(L"upperhead", -8, -8, -10, 16, 16, 16);
|
||||
head->bMirror = true;
|
||||
head->addBox(L"scale", -5, -12, -4, 2, 4, 6);
|
||||
head->addBox(L"nostril", -5, -3, -22, 2, 2, 4);
|
||||
head->bMirror = false;
|
||||
head->addBox(L"scale", 3, -12, -4, 2, 4, 6);
|
||||
head->addBox(L"nostril", 3, -3, -22, 2, 2, 4);
|
||||
|
||||
jaw = new ModelPart(this, L"jaw");
|
||||
jaw->setPos(0, 4, -8);
|
||||
jaw->addBox(L"jaw", -6, 0, -16, 12, 4, 16);
|
||||
head->addChild(jaw);
|
||||
|
||||
head->compile(1.0f / 16.0f);
|
||||
jaw->compile(1.0f / 16.0f);
|
||||
}
|
||||
|
||||
void DragonHeadModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled)
|
||||
{
|
||||
jaw->xRot = (Mth::sin(time * PI * 0.2f) + 1.0f) * 0.2f;
|
||||
head->yRot = yRot * PI / 180.0f;
|
||||
head->xRot = xRot * PI / 180.0f;
|
||||
|
||||
glTranslatef(0.0f, -0.374375f, 0.0f);
|
||||
glScalef(0.75f, 0.75f, 0.75f);
|
||||
head->render(scale, usecompiled);
|
||||
}
|
||||
Reference in new issue
Block a user