mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-10 00:41:59 +00:00
fix: boat plr height & sneak height (#1459)
This commit is contained in:
@@ -286,6 +286,20 @@ void ItemInHandRenderer::renderItem(shared_ptr<LivingEntity> mob, shared_ptr<Ite
|
||||
|
||||
float xo = 0.0f;
|
||||
float yo = 0.3f;
|
||||
|
||||
|
||||
// Re position height of held item if skin is small
|
||||
if (mob->getAnimOverrideBitmask() & (1 << HumanoidModel::eAnim_SmallModel))
|
||||
{
|
||||
if (mob->isRiding())
|
||||
{
|
||||
std::shared_ptr<Entity> ridingEntity = mob->riding;
|
||||
if (ridingEntity != nullptr) // Safety check;
|
||||
{
|
||||
yo += 0.3f; // reverts the change in Boat.cpp for smaller models.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
glEnable(GL_RESCALE_NORMAL);
|
||||
glTranslatef(-xo, -yo, 0);
|
||||
|
||||
Reference in New Issue
Block a user