From 277a6f6adeaf3ba1d12cb3bb5ee31559d9f2f563 Mon Sep 17 00:00:00 2001 From: Oliver1337 <104810162+OliverLesen@users.noreply.github.com> Date: Mon, 9 Mar 2026 19:06:30 -0300 Subject: [PATCH] Update UIControl_PlayerSkinPreview.h Update UIControl_PlayerSkinPreview.h Previously, the menu previews were all the same, with the same Steve model. One slim skin influencing the others. One preview contaminating the next. And even causing crashes. --- .../Common/UI/UIControl_PlayerSkinPreview.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Minecraft.Client/Common/UI/UIControl_PlayerSkinPreview.h b/Minecraft.Client/Common/UI/UIControl_PlayerSkinPreview.h index 2e70ff166..0c19fa315 100644 --- a/Minecraft.Client/Common/UI/UIControl_PlayerSkinPreview.h +++ b/Minecraft.Client/Common/UI/UIControl_PlayerSkinPreview.h @@ -5,6 +5,7 @@ class ModelPart; class EntityRenderer; +class HumanoidModel; class UIControl_PlayerSkinPreview : public UIControl { @@ -51,8 +52,12 @@ private: float m_swingTime; ESkinPreviewAnimations m_currentAnimation; - //vector *m_pvAdditionalBoxes; vector *m_pvAdditionalModelParts; + + HumanoidModel *m_pPreviewModel; + int m_iPreviewModelType; + int m_iPreviewTexWidth; + int m_iPreviewTexHeight; public: enum ESkinPreviewFacing { @@ -62,6 +67,7 @@ public: }; UIControl_PlayerSkinPreview(); + virtual ~UIControl_PlayerSkinPreview(); virtual void tick(); @@ -87,4 +93,6 @@ private: void render(EntityRenderer *renderer, double x, double y, double z, float rot, float a); bool bindTexture(const wstring& urlTexture, int backupTexture); bool bindTexture(const wstring& urlTexture, const wstring& backupTexture); + void RebuildPreviewModel(); + void DestroyPreviewModel(); };