Updated skin box hiding logic

Updated skin box hiding logic after testing a newer version PCK-Studio revealing the original logic wasn't accurate, also removed code that added arm and tool offsets to held items as it was not working correctly.
This commit is contained in:
Langtanium 2026-04-28 19:21:07 -07:00
parent 28f0110339
commit 878547dec8
5 changed files with 13 additions and 56 deletions

View file

@ -109,7 +109,7 @@ ModelPart * HumanoidModel::AddOrRetrievePart(SKIN_BOX *pBox)
pNewBox = new ModelPart(this, static_cast<int>(pBox->fU), static_cast<int>(pBox->fV));
pNewBox->visible=false;
if (pBox->fM > 0) pNewBox->bMirror = true; // check if this box has the mirror flag
if (pBox->fA > 0) pNewBox->hideWithHelmet = true; // check if this box has the "hide when helmet is worn" flag
pNewBox->hideWithArmor = (unsigned int)pBox->fA; // add the "hide when armor is worn" bit flags
pNewBox->addHumanoidBox(pBox->fX, pBox->fY, pBox->fZ, pBox->fW, pBox->fH, pBox->fD, scale);
// 4J-PB - don't compile here, since the lighting isn't set up. It'll be compiled on first use.
//pNewBox->compile(1.0f/16.0f);