Small fix

Fixed extra skin box data not being sent in multiplayer. Added another model type check in the XUI.
This commit is contained in:
Langtanium 2026-04-04 13:03:00 -07:00
parent 831ec4b295
commit 0c963335a0
2 changed files with 13 additions and 1 deletions

View file

@ -294,7 +294,15 @@ void CXuiCtrlMinecraftSkinPreview::render(EntityRenderer *renderer, double x, do
glPushMatrix();
glDisable(GL_CULL_FACE);
HumanoidModel *model = static_cast<HumanoidModel *>(renderer->getModel());
HumanoidModel *model;
Textures *t = Minecraft::GetInstance()->textures;
if ((t->loadMemTexture(m_customTextureUrl, m_backupTexture) >= 45 && t->loadMemTexture(m_customTextureUrl, m_backupTexture) <= 53) || m_uiAnimOverrideBitmask&(1<<HumanoidModel::eAnim_SlimModel))
model = static_cast<HumanoidModel *>(renderer->getModelSlim());
else if (t->loadMemTexture(m_customTextureUrl, m_backupTexture) == 54 || m_uiAnimOverrideBitmask&(1<<HumanoidModel::eAnim_ClassicModel))
model = static_cast<HumanoidModel *>(renderer->getModelClassic());
else
model = static_cast<HumanoidModel *>(renderer->getModel());
//getAttackAnim(mob, a);
//if (armor != nullptr) armor->attackTime = model->attackTime;

View file

@ -177,6 +177,8 @@ void TextureAndGeometryPacket::read(DataInputStream *dis) //throws IOException
this->BoxDataA[i].fD = dis->readFloat();
this->BoxDataA[i].fU = dis->readFloat();
this->BoxDataA[i].fV = dis->readFloat();
this->BoxDataA[i].fA = dis->readFloat();
this->BoxDataA[i].fM = dis->readFloat();
}
}
@ -203,6 +205,8 @@ void TextureAndGeometryPacket::write(DataOutputStream *dos) //throws IOException
dos->writeFloat(this->BoxDataA[i].fD);
dos->writeFloat(this->BoxDataA[i].fU);
dos->writeFloat(this->BoxDataA[i].fV);
dos->writeFloat(this->BoxDataA[i].fA);
dos->writeFloat(this->BoxDataA[i].fM);
}
}