implement la's TU22 patch file

This commit is contained in:
piebot
2026-03-13 00:56:59 +03:00
parent f255035afd
commit beec56d3be
22 changed files with 87 additions and 26 deletions

View File

@@ -241,7 +241,7 @@ void HumanoidModel::setupAnim(float time, float r, float bob, float yRot, float
if (riding)
{
if(uiBitmaskOverrideAnim&(1<<eAnim_SmallModel) == 0)
if ((uiBitmaskOverrideAnim&(1<<eAnim_SmallModel)) == 0)
{
arm0->xRot += -HALF_PI * 0.4f;
arm1->xRot += -HALF_PI * 0.4f;
@@ -256,6 +256,8 @@ void HumanoidModel::setupAnim(float time, float r, float bob, float yRot, float
arm1->xRot += -HALF_PI * 0.4f;
leg0->xRot = -HALF_PI * 0.4f;
leg1->xRot = -HALF_PI * 0.4f;
leg0->yRot = HALF_PI * 0.2f;
leg1->yRot = -HALF_PI * 0.2f;
}
}
else if(idle && !sneaking )

View File

@@ -501,7 +501,7 @@ void LivingEntityRenderer::renderNameTag(shared_ptr<LivingEntity> mob, const wst
constexpr float s = 1 / 60.0f * size;
glPushMatrix();
glTranslatef(static_cast<float>(x) + 0, static_cast<float>(y) + mob->bbHeight + 0.5f, static_cast<float>(z));
glTranslatef(static_cast<float>(x), static_cast<float>(y) + mob->bbHeight + 0.5f, static_cast<float>(z));
glNormal3f(0, 1, 0);
glRotatef(-this->entityRenderDispatcher->playerRotY, 0, 1, 0);

View File

@@ -3142,14 +3142,15 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
{
*piUse=IDS_TOOLTIPS_UNLEASH;
}
else if (heldItemId == Item::lead_Id)
// 4J: fix improper tooltips for TU20
/*else if (heldItemId == Item::lead_Id)
{
if (!pig->isLeashed()) *piUse=IDS_TOOLTIPS_LEASH;
}
else if (heldItemId == Item::nameTag_Id)
{
*piUse = IDS_TOOLTIPS_NAME;
}
}*/
else if (pig->hasSaddle()) // does the pig have a saddle?
{
*piUse=IDS_TOOLTIPS_MOUNT;

View File

@@ -470,7 +470,7 @@ void PlayerRenderer::additionalRendering(shared_ptr<LivingEntity> _mob, float a)
}
}
void PlayerRenderer::renderNameTags(shared_ptr<LivingEntity> player, double x, double y, double z, wstring msg, float scale, double dist)
void PlayerRenderer::renderNameTags(shared_ptr<LivingEntity> player, double x, double y, double z, const wstring &msg, float scale, double dist)
{
#if 0
if (dist < 10 * 10)
@@ -496,7 +496,17 @@ void PlayerRenderer::renderNameTags(shared_ptr<LivingEntity> player, double x, d
}
#endif
LivingEntityRenderer::renderNameTags(player, x, y, z, msg, scale, dist);
shared_ptr<Player> pPlayer = dynamic_pointer_cast<Player>(player);
int color = getNametagColour(pPlayer->getPlayerIndex());
if (player->isSleeping())
{
renderNameTag(player, msg, x, y - 1.5f, z, 64, color);
}
else
{
renderNameTag(player, msg, x, y, z, 64, color);
}
}
void PlayerRenderer::scale(shared_ptr<LivingEntity> player, float a)

View File

@@ -34,7 +34,7 @@ public:
protected:
virtual void additionalRendering(shared_ptr<LivingEntity> _mob, float a);
void renderNameTags(shared_ptr<LivingEntity> player, double x, double y, double z, wstring msg, float scale, double dist);
void renderNameTags(shared_ptr<LivingEntity> player, double x, double y, double z, const wstring &msg, float scale, double dist);
virtual void scale(shared_ptr<LivingEntity> _player, float a);
public: