mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-23 20:09:46 +03:00
* Add ModelPart from 0.2.0
This commit is contained in:
@@ -123,9 +123,9 @@ void EntityRenderDispatcher::render(Entity* entity, float a, float b, float c, f
|
||||
{
|
||||
#ifndef ORIGINAL_CODE
|
||||
if (pRenderer == &m_HumanoidMobRenderer)
|
||||
m_HumanoidMobRenderer.m_pHumanoidModel->field_10BE = entity->isSneaking();
|
||||
m_HumanoidMobRenderer.m_pHumanoidModel->m_bSneaking = entity->isSneaking();
|
||||
else
|
||||
m_HumanoidMobRenderer.m_pHumanoidModel->field_10BE = false;
|
||||
m_HumanoidMobRenderer.m_pHumanoidModel->m_bSneaking = false;
|
||||
#endif
|
||||
|
||||
pRenderer->render(entity, a, b, c, d, e);
|
||||
|
||||
@@ -30,7 +30,7 @@ void HumanoidMobRenderer::additionalRendering(Mob* mob, float f)
|
||||
|
||||
ItemInstance inst(itemID, 1, 0);
|
||||
glPushMatrix();
|
||||
m_pHumanoidModel->m_armL.translateTo(0.0625f);
|
||||
m_pHumanoidModel->m_arm1.translateTo(0.0625f);
|
||||
glTranslatef(-0.0625f, 0.4375f, 0.0625f);
|
||||
if (itemID <= C_MAX_TILES && TileRenderer::canRender(Tile::tiles[itemID]->getRenderShape()))
|
||||
{
|
||||
@@ -69,5 +69,5 @@ void HumanoidMobRenderer::renderHand()
|
||||
m_pHumanoidModel->field_4 = 0;
|
||||
m_pHumanoidModel->setBrightness(m_pDispatcher->m_pMinecraft->m_pMobPersp->getBrightness(1.0f));
|
||||
m_pHumanoidModel->setupAnim(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0625f);
|
||||
m_pHumanoidModel->m_armL.render(0.0625f);
|
||||
m_pHumanoidModel->m_arm1.render(0.0625f);
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
|
||||
TripodCameraRenderer::TripodCameraRenderer() :
|
||||
m_tile(),
|
||||
m_cube(0, 0)
|
||||
m_modelPart(0, 0)
|
||||
{
|
||||
m_cube.addBox(-4.0f, -4.0f, -6.0f, 8, 8, 10);
|
||||
m_cube.m_posY = 11.0f;
|
||||
m_modelPart.addBox(-4.0f, -4.0f, -6.0f, 8, 8, 10);
|
||||
m_modelPart.m_posY = 11.0f;
|
||||
field_4 = 0.5f;
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ void TripodCameraRenderer::render(Entity* entity, float x, float y, float z, flo
|
||||
{
|
||||
glPushMatrix();
|
||||
glTranslatef(x, y, z);
|
||||
m_cube.m_rotX = 0.017453f * (180.0f + 0.5f * entity->m_pitch);
|
||||
m_cube.m_rotY = -0.017453f * entity->m_yaw;
|
||||
m_modelPart.m_rotX = 0.017453f * (180.0f + 0.5f * entity->m_pitch);
|
||||
m_modelPart.m_rotY = -0.017453f * entity->m_yaw;
|
||||
|
||||
Tesselator& t = Tesselator::instance;
|
||||
t.color(1.0f, 1.0f, 1.0f);
|
||||
@@ -45,8 +45,8 @@ void TripodCameraRenderer::render(Entity* entity, float x, float y, float z, flo
|
||||
t.draw();
|
||||
|
||||
bindTexture("item/camera.png");
|
||||
m_cube.setBrightness(brightness);
|
||||
m_cube.render(0.0625f);
|
||||
m_modelPart.setBrightness(brightness);
|
||||
m_modelPart.render(0.0625f);
|
||||
|
||||
Entity* pHREntity = m_pDispatcher->m_pMinecraft->m_hitResult.m_pEnt;
|
||||
|
||||
@@ -64,7 +64,7 @@ void TripodCameraRenderer::render(Entity* entity, float x, float y, float z, flo
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
// @TODO FIX: With ENH_ENTITY_SHADING on, the cube is fully opaque.
|
||||
glColor4f(0.5f, 0.5f, 0.5f, 0.5f);
|
||||
m_cube.render(0.0625f);
|
||||
m_modelPart.renderHorrible(0.0625f);
|
||||
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
glDisable(GL_BLEND);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
||||
@@ -32,6 +32,6 @@ public:
|
||||
public:
|
||||
TileRenderer m_renderer;
|
||||
TripodTile m_tile;
|
||||
Cube m_cube;
|
||||
ModelPart m_modelPart;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user