Fixed a few issues and added more functionality

Fixed player not rendering in third person and armor arm0 not moving with 64x64 skins. Added offsets to held item (main hand) and armor (boots).
This commit is contained in:
Langtanium 2026-04-18 11:41:06 -07:00
parent 0c50f9982c
commit cef65c8df3
8 changed files with 306 additions and 39 deletions

View file

@ -56,6 +56,7 @@ UIControl_PlayerSkinPreview::UIControl_PlayerSkinPreview()
m_framesAnimatingRotation = 0;
m_bAnimatingToFacing = false;
m_pvAdditionalModelParts=nullptr;
m_pvModelOffsets=nullptr;
m_uiAnimOverrideBitmask=0L;
}
@ -366,7 +367,10 @@ void UIControl_PlayerSkinPreview::render(EntityRenderer *renderer, double x, dou
glEnable(GL_ALPHA_TEST);
//model->prepareMobModel(mob, wp, ws, a);
model->render(nullptr, wp, ws, bob, headRot - bodyRot, headRotx, _scale, true, m_pvModelOffsets);
if (m_pvModelOffsets != nullptr) // If the skin has offsets use a modified version of the render function
model->renderUIOffset(wp, ws, bob, headRot - bodyRot, headRotx, _scale, true, m_pvModelOffsets);
else // If the skin has no offsets use the default render function (without this all skins that don't have an offset won't render)
model->render(nullptr, wp, ws, bob, headRot - bodyRot, headRotx, _scale, true);
/*for (int i = 0; i < MAX_ARMOR_LAYERS; i++)
{
if (prepareArmor(mob, i, a))