mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Patch
This commit is contained in:
parent
ceefe7558d
commit
3935b6f42b
|
|
@ -259,16 +259,6 @@ void UIControl_PlayerSkinPreview::render(EntityRenderer *renderer, double x, dou
|
|||
|
||||
HumanoidModel *model;
|
||||
Textures *t = Minecraft::GetInstance()->textures;
|
||||
<<<<<<< Updated upstream
|
||||
|
||||
if (t->loadMemTexture(m_customTextureUrl, m_backupTexture) >= 46 && t->loadMemTexture(m_customTextureUrl, m_backupTexture) <= 53)
|
||||
model = static_cast<HumanoidModel *>(renderer->getModelSlim());
|
||||
else if (t->loadMemTexture(m_customTextureUrl, m_backupTexture) >= 37 && t->loadMemTexture(m_customTextureUrl, m_backupTexture) <= 45)
|
||||
model = static_cast<HumanoidModel *>(renderer->getModel());
|
||||
else
|
||||
model = static_cast<HumanoidModel *>(renderer->getModelCustom());
|
||||
=======
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
if (t->loadMemTexture(m_customTextureUrl, m_backupTexture) >= 45 && t->loadMemTexture(m_customTextureUrl, m_backupTexture) <= 53)
|
||||
model = static_cast<HumanoidModel *>(renderer->getNewModelSlim());
|
||||
|
|
@ -277,7 +267,6 @@ void UIControl_PlayerSkinPreview::render(EntityRenderer *renderer, double x, dou
|
|||
else
|
||||
model = static_cast<HumanoidModel *>(renderer->getModel());
|
||||
|
||||
app.DebugPrintf("5rh56h56yhg6 %ls;\n", model);
|
||||
//getAttackAnim(mob, a);
|
||||
//if (armor != nullptr) armor->attackTime = model->attackTime;
|
||||
//model->riding = mob->isRiding();
|
||||
|
|
@ -372,7 +361,6 @@ void UIControl_PlayerSkinPreview::render(EntityRenderer *renderer, double x, dou
|
|||
|
||||
MemSect(31);
|
||||
bindTexture(m_customTextureUrl, m_backupTexture);
|
||||
|
||||
MemSect(0);
|
||||
glEnable(GL_ALPHA_TEST);
|
||||
|
||||
|
|
|
|||
|
|
@ -19,14 +19,9 @@ ResourceLocation EntityRenderer::SHADOW_LOCATION = ResourceLocation(TN__CLAMP__M
|
|||
EntityRenderer::EntityRenderer()
|
||||
{
|
||||
model = nullptr;
|
||||
<<<<<<< Updated upstream
|
||||
modelCustom = nullptr;
|
||||
modelSlim = nullptr;
|
||||
=======
|
||||
modelSlim = nullptr;
|
||||
newModel = nullptr;
|
||||
newModelSlim = nullptr;
|
||||
>>>>>>> Stashed changes
|
||||
tileRenderer = new TileRenderer();
|
||||
shadowRadius = 0;
|
||||
shadowStrength = 1.0f;
|
||||
|
|
|
|||
|
|
@ -30,14 +30,9 @@ private:
|
|||
|
||||
protected:
|
||||
Model *model; // TODO 4J: Check why exactly this is here, it seems to get shadowed by classes inheriting from this by their own
|
||||
<<<<<<< Updated upstream
|
||||
Model *modelCustom;
|
||||
Model *modelSlim;
|
||||
=======
|
||||
Model *modelSlim;
|
||||
Model *newModel;
|
||||
Model *newModelSlim;
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
protected:
|
||||
TileRenderer *tileRenderer; // 4J - changed to protected so derived classes can use instead of shadowing their own
|
||||
|
|
@ -76,13 +71,8 @@ public:
|
|||
public:
|
||||
// 4J Added
|
||||
virtual Model *getModel() { return model; }
|
||||
<<<<<<< Updated upstream
|
||||
virtual Model *getModelCustom() { return modelCustom; }
|
||||
virtual Model *getModelSlim() { return modelSlim; }
|
||||
=======
|
||||
virtual Model *getModelSlim() { return modelSlim; }
|
||||
virtual Model *getNewModel() { return newModel; }
|
||||
virtual Model *getNewModelSlim() { return newModelSlim; }
|
||||
>>>>>>> Stashed changes
|
||||
virtual void SetItemFrame(bool bSet) {}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -58,11 +58,7 @@ ModelPart * HumanoidModel::AddOrRetrievePart(SKIN_BOX *pBox)
|
|||
return pNewBox;
|
||||
}
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
void HumanoidModel::_init(float g, float yOffset, int texWidth, int texHeight, int skinType)
|
||||
=======
|
||||
void HumanoidModel::_init(float g, float yOffset, int texWidth, int texHeight, bool slimHands, bool mirror)
|
||||
>>>>>>> Stashed changes
|
||||
{
|
||||
this->texWidth = texWidth;
|
||||
this->texHeight = texHeight;
|
||||
|
|
@ -99,31 +95,6 @@ void HumanoidModel::_init(float g, float yOffset, int texWidth, int texHeight, b
|
|||
body->addHumanoidBox(-4, 0, -2, 8, 12, 4, g); // Body
|
||||
body->setPos(0, 0 + yOffset, 0);
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
arm0 = new ModelPart(this, 24 + 16, 16);
|
||||
arm0->setPos(-5, 2 + yOffset, 0);
|
||||
|
||||
if (skinType == 2)
|
||||
{
|
||||
arm0->addHumanoidBox(-2, -2, -2, 3, 12, 4, g); // Arm0 Slim
|
||||
|
||||
arm1 = new ModelPart(this, 16 + 16, 16 * 3);
|
||||
arm1->addHumanoidBox(-1, -2, -2, 3, 12, 4, g); // Arm1 Slim
|
||||
}
|
||||
else
|
||||
{
|
||||
arm0->addHumanoidBox(-3, -2, -2, 4, 12, 4, g); // Arm0
|
||||
|
||||
if (skinType == 1)
|
||||
arm1 = new ModelPart(this, 16 + 16, 16 * 3); // Arm1 Custom
|
||||
else
|
||||
{
|
||||
arm1 = new ModelPart(this, 24 + 16, 16);
|
||||
arm1->bMirror = true;
|
||||
}
|
||||
arm1->addHumanoidBox(-1, -2, -2, 4, 12, 4, g); // Arm1
|
||||
}
|
||||
=======
|
||||
if (texWidth == 64 && texHeight == 64)
|
||||
{
|
||||
arm0 = new ModelPart(this, 24 + 16, 16);
|
||||
|
|
@ -164,7 +135,6 @@ void HumanoidModel::_init(float g, float yOffset, int texWidth, int texHeight, b
|
|||
}
|
||||
|
||||
arm0->setPos(-5, 2 + yOffset, 0);
|
||||
>>>>>>> Stashed changes
|
||||
arm1->setPos(5, 2 + yOffset, 0);
|
||||
|
||||
if (mirror == true)
|
||||
|
|
@ -192,16 +162,6 @@ void HumanoidModel::_init(float g, float yOffset, int texWidth, int texHeight, b
|
|||
leg0->addHumanoidBox(-2, 0, -2, 4, 12, 4, g); // Leg0
|
||||
leg0->setPos(-1.9, 12 + yOffset, 0);
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
if (skinType >= 1)
|
||||
leg1 = new ModelPart(this, 16, 16 * 3);
|
||||
else
|
||||
{
|
||||
leg1 = new ModelPart(this, 0, 16);
|
||||
leg1->bMirror = true;
|
||||
}
|
||||
=======
|
||||
>>>>>>> Stashed changes
|
||||
leg1->addHumanoidBox(-2, 0, -2, 4, 12, 4, g); // Leg1
|
||||
leg1->setPos(1.9, 12 + yOffset, 0);
|
||||
|
||||
|
|
@ -247,32 +207,16 @@ void HumanoidModel::_init(float g, float yOffset, int texWidth, int texHeight, b
|
|||
|
||||
HumanoidModel::HumanoidModel() : Model()
|
||||
{
|
||||
<<<<<<< Updated upstream
|
||||
_init(0, 0, 64, 32, 0);
|
||||
=======
|
||||
_init(0, 0, 64, 32, false, true);
|
||||
>>>>>>> Stashed changes
|
||||
}
|
||||
|
||||
HumanoidModel::HumanoidModel(float g) : Model()
|
||||
{
|
||||
<<<<<<< Updated upstream
|
||||
_init(g, 0, 64, 32, 0);
|
||||
=======
|
||||
_init(g, 0, 64, 32, false, true);
|
||||
>>>>>>> Stashed changes
|
||||
}
|
||||
|
||||
HumanoidModel::HumanoidModel(float g, float yOffset, int texWidth, int texHeight) : Model()
|
||||
{
|
||||
<<<<<<< Updated upstream
|
||||
_init(g,yOffset,texWidth,texHeight,0);
|
||||
}
|
||||
|
||||
HumanoidModel::HumanoidModel(float g, float yOffset, int texWidth, int texHeight, int skinType) : Model()
|
||||
{
|
||||
_init(g,yOffset,texWidth,texHeight,skinType);
|
||||
=======
|
||||
_init(g,yOffset,texWidth,texHeight, false, true);
|
||||
}
|
||||
|
||||
|
|
@ -284,7 +228,6 @@ HumanoidModel::HumanoidModel(float g, float yOffset, int texWidth, int texHeight
|
|||
HumanoidModel::HumanoidModel(float g, float yOffset, int texWidth, int texHeight, bool slimHands, bool mirror) : Model()
|
||||
{
|
||||
_init(g,yOffset,texWidth,texHeight, slimHands, mirror);
|
||||
>>>>>>> Stashed changes
|
||||
}
|
||||
|
||||
void HumanoidModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled)
|
||||
|
|
|
|||
|
|
@ -50,20 +50,12 @@ public:
|
|||
(1<<HumanoidModel::eAnim_DisableRenderHair);
|
||||
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
void _init(float g, float yOffset, int texWidth, int texHeight, int skinType); // 4J added
|
||||
HumanoidModel();
|
||||
HumanoidModel(float g);
|
||||
HumanoidModel(float g, float yOffset, int texWidth, int texHeight);
|
||||
HumanoidModel(float g, float yOffset, int texWidth, int texHeight, int skinType);
|
||||
=======
|
||||
void _init(float g, float yOffset, int texWidth, int texHeight, bool slimHands, bool mirror); // 4J added
|
||||
HumanoidModel();
|
||||
HumanoidModel(float g);
|
||||
HumanoidModel(float g, float yOffset, int texWidth, int texHeight);
|
||||
HumanoidModel(float g, float yOffset, int texWidth, int texHeight, bool slimHands);
|
||||
HumanoidModel(float g, float yOffset, int texWidth, int texHeight, bool slimHands, bool mirror);
|
||||
>>>>>>> Stashed changes
|
||||
virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled);
|
||||
virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, shared_ptr<Entity> entity, unsigned int uiBitmaskOverrideAnim = 0);
|
||||
void renderHair(float scale, bool usecompiled);
|
||||
|
|
|
|||
|
|
@ -15,10 +15,6 @@ int LivingEntityRenderer::MAX_ARMOR_LAYERS = 4;
|
|||
LivingEntityRenderer::LivingEntityRenderer(Model *model, float shadow, bool slimHands, bool createNewVar)
|
||||
{
|
||||
this->model = model;
|
||||
<<<<<<< Updated upstream
|
||||
this->modelCustom = new HumanoidModel(0, 0, 64, 64, 1);
|
||||
this->modelSlim = new HumanoidModel(0, 0, 64, 64, 2);
|
||||
=======
|
||||
|
||||
if (slimHands == true)
|
||||
this->modelSlim = new HumanoidModel(0, 0, 64, 32, true);
|
||||
|
|
@ -30,7 +26,6 @@ LivingEntityRenderer::LivingEntityRenderer(Model *model, float shadow, bool slim
|
|||
if (slimHands == true)
|
||||
this->newModelSlim = new HumanoidModel(0, 0, 64, 64, true, false);
|
||||
}
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
shadowRadius = shadow;
|
||||
armor = nullptr;
|
||||
|
|
@ -70,15 +65,9 @@ void LivingEntityRenderer::render(shared_ptr<Entity> _mob, double x, double y, d
|
|||
glPushMatrix();
|
||||
glDisable(GL_CULL_FACE);
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
if (player != nullptr && model != nullptr && player->getCustomSkin() >= 0 && player->getCustomSkin() <= 9) resModel = model;
|
||||
else if (player != nullptr && modelSlim != nullptr && player->getCustomSkin() >= 10 && player->getCustomSkin() <= 17) resModel = modelSlim;
|
||||
else resModel = modelCustom;
|
||||
=======
|
||||
if (player != nullptr && newModel != nullptr && player->getCustomSkin() == 18) resModel = newModel;
|
||||
else if (player != nullptr && newModelSlim != nullptr && player->getCustomSkin() >= 8 && player->getCustomSkin() <= 17) resModel = newModelSlim;
|
||||
else resModel = model;
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
resModel->attackTime = getAttackAnim(mob, a);
|
||||
if (armor != nullptr) armor->attackTime = resModel->attackTime;
|
||||
|
|
@ -273,15 +262,9 @@ void LivingEntityRenderer::renderModel(shared_ptr<LivingEntity> mob, float wp, f
|
|||
shared_ptr<Player> player = dynamic_pointer_cast<Player>(mob);
|
||||
Model *resModel;
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
if (player != nullptr && model != nullptr && player->getCustomSkin() >= 0 && player->getCustomSkin() <= 9) resModel = model;
|
||||
else if (player != nullptr && modelSlim != nullptr && player->getCustomSkin() >= 10 && player->getCustomSkin() <= 17) resModel = modelSlim;
|
||||
else resModel = modelCustom;
|
||||
=======
|
||||
if (player != nullptr && newModel != nullptr && player->getCustomSkin() == 18) resModel = newModel;
|
||||
else if (player != nullptr && newModelSlim != nullptr && player->getCustomSkin() >= 8 && player->getCustomSkin() <= 17) resModel = newModelSlim;
|
||||
else resModel = model;
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
bindTexture(mob);
|
||||
if (!mob->isInvisible())
|
||||
|
|
@ -357,15 +340,9 @@ void LivingEntityRenderer::renderArrows(shared_ptr<LivingEntity> mob, float a)
|
|||
shared_ptr<Player> player = dynamic_pointer_cast<Player>(mob);
|
||||
Model *resModel;
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
if (player != nullptr && model != nullptr && player->getCustomSkin() >= 0 && player->getCustomSkin() <= 9) resModel = model;
|
||||
else if (player != nullptr && modelSlim != nullptr && player->getCustomSkin() >= 10 && player->getCustomSkin() <= 17) resModel = modelSlim;
|
||||
else resModel = modelCustom;
|
||||
=======
|
||||
if (player != nullptr && newModel != nullptr && player->getCustomSkin() == 18) resModel = newModel;
|
||||
else if (player != nullptr && newModelSlim != nullptr && player->getCustomSkin() >= 8 && player->getCustomSkin() <= 17) resModel = newModelSlim;
|
||||
else resModel = model;
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
int arrowCount = mob->getArrowCount();
|
||||
|
||||
|
|
|
|||
|
|
@ -58,14 +58,9 @@ ResourceLocation PlayerRenderer::DEFAULT_LOCATION = ResourceLocation(TN_MOB_CHAR
|
|||
PlayerRenderer::PlayerRenderer() : LivingEntityRenderer( new HumanoidModel(0), 0.5f, true, true )
|
||||
{
|
||||
humanoidModel = static_cast<HumanoidModel *>(model);
|
||||
<<<<<<< Updated upstream
|
||||
humanoidModelCustom = static_cast<HumanoidModel *>(modelCustom);
|
||||
humanoidModelSlim = static_cast<HumanoidModel *>(modelSlim);
|
||||
=======
|
||||
humanoidModelSlim = static_cast<HumanoidModel *>(modelSlim);
|
||||
newHumanoidModel = static_cast<HumanoidModel *>(newModel);
|
||||
newHumanoidModelSlim = static_cast<HumanoidModel *>(newModelSlim);
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
armorParts1 = new HumanoidModel(1.0f);
|
||||
armorParts2 = new HumanoidModel(0.5f);
|
||||
|
|
@ -173,15 +168,9 @@ void PlayerRenderer::render(shared_ptr<Entity> _mob, double x, double y, double
|
|||
if(mob == nullptr) return;
|
||||
if(mob->hasInvisiblePrivilege()) return;
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
if (mob != nullptr && humanoidModel != nullptr && mob->getCustomSkin() >= 0 && mob->getCustomSkin() <= 9) resModel = humanoidModel;
|
||||
else if (mob != nullptr && humanoidModelSlim != nullptr && mob->getCustomSkin() >= 10 && mob->getCustomSkin() <= 17) resModel = humanoidModelSlim;
|
||||
else resModel = humanoidModelCustom;
|
||||
=======
|
||||
if (mob != nullptr && newHumanoidModel != nullptr && mob->getCustomSkin() == 18) resModel = newHumanoidModel;
|
||||
else if (mob != nullptr && newHumanoidModelSlim != nullptr && mob->getCustomSkin() >= 8 && mob->getCustomSkin() <= 17) resModel = newHumanoidModelSlim;
|
||||
else resModel = humanoidModel;
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
shared_ptr<ItemInstance> item = mob->inventory->getSelected();
|
||||
|
||||
|
|
@ -286,15 +275,9 @@ void PlayerRenderer::additionalRendering(shared_ptr<LivingEntity> _mob, float a)
|
|||
shared_ptr<Player> mob = dynamic_pointer_cast<Player>(_mob);
|
||||
HumanoidModel *resModel;
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
if (mob != nullptr && humanoidModel != nullptr && mob->getCustomSkin() >= 0 && mob->getCustomSkin() <= 9) resModel = humanoidModel;
|
||||
else if (mob != nullptr && humanoidModelSlim != nullptr && mob->getCustomSkin() >= 10 && mob->getCustomSkin() <= 17) resModel = humanoidModelSlim;
|
||||
else resModel = humanoidModelCustom;
|
||||
=======
|
||||
if (mob != nullptr && newHumanoidModel != nullptr && mob->getCustomSkin() == 18) resModel = newHumanoidModel;
|
||||
else if (mob != nullptr && newHumanoidModelSlim != nullptr && mob->getCustomSkin() >= 8 && mob->getCustomSkin() <= 17) resModel = newHumanoidModelSlim;
|
||||
else resModel = humanoidModel;
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
shared_ptr<ItemInstance> headGear = mob->inventory->getArmor(3);
|
||||
if (headGear != nullptr)
|
||||
|
|
@ -541,15 +524,9 @@ void PlayerRenderer::renderHand()
|
|||
shared_ptr<Player> player = dynamic_pointer_cast<Player>(Minecraft::GetInstance()->player);
|
||||
HumanoidModel *resModel;
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
if (player != nullptr && humanoidModel != nullptr && player->getCustomSkin() >= 0 && player->getCustomSkin() <= 9) resModel = humanoidModel;
|
||||
else if (player != nullptr && humanoidModelSlim != nullptr && player->getCustomSkin() >= 10 && player->getCustomSkin() <= 17) resModel = humanoidModelSlim;
|
||||
else resModel = humanoidModelCustom;
|
||||
=======
|
||||
if (player != nullptr && newHumanoidModel != nullptr && player->getCustomSkin() == 18) resModel = newHumanoidModel;
|
||||
else if (player != nullptr && newHumanoidModelSlim != nullptr && player->getCustomSkin() >= 8 && player->getCustomSkin() <= 17) resModel = newHumanoidModelSlim;
|
||||
else resModel = humanoidModel;
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
float brightness = 1;
|
||||
glColor3f(brightness, brightness, brightness);
|
||||
|
|
|
|||
|
|
@ -14,13 +14,6 @@ public:
|
|||
|
||||
private:
|
||||
HumanoidModel *humanoidModel;
|
||||
<<<<<<< Updated upstream
|
||||
HumanoidModel *humanoidModelCustom;
|
||||
HumanoidModel *humanoidModelSlim;
|
||||
HumanoidModel *armorParts1;
|
||||
HumanoidModel *armorParts2;
|
||||
int defaultSkinType;
|
||||
=======
|
||||
HumanoidModel *humanoidModelSlim;
|
||||
HumanoidModel *newHumanoidModel;
|
||||
HumanoidModel *newHumanoidModelSlim;
|
||||
|
|
@ -28,7 +21,6 @@ private:
|
|||
HumanoidModel *armorParts1;
|
||||
HumanoidModel *armorParts2;
|
||||
bool defaultSlimHands;
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
public:
|
||||
PlayerRenderer();
|
||||
|
|
|
|||
Loading…
Reference in a new issue