diff options
Diffstat (limited to 'Minecraft.Client/ModelPart.cpp')
| -rw-r--r-- | Minecraft.Client/ModelPart.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Minecraft.Client/ModelPart.cpp b/Minecraft.Client/ModelPart.cpp index 89386621..615ff8bd 100644 --- a/Minecraft.Client/ModelPart.cpp +++ b/Minecraft.Client/ModelPart.cpp @@ -16,6 +16,7 @@ void ModelPart::_init() neverRender = false; x=y=z = 0.0f; xRot=yRot=zRot = 0.0f; + translateX = translateY = translateZ = 0.0f; } ModelPart::ModelPart() @@ -158,6 +159,8 @@ void ModelPart::render(float scale, bool usecompiled, bool bHideParentBodyPart) if (!visible) return; if (!compiled) compile(scale); + glTranslatef(translateX, translateY, translateZ); + if (xRot != 0 || yRot != 0 || zRot != 0) { glPushMatrix(); @@ -243,6 +246,8 @@ void ModelPart::render(float scale, bool usecompiled, bool bHideParentBodyPart) } } } + + glTranslatef(-translateX, -translateY, -translateZ); } void ModelPart::renderRollable(float scale, bool usecompiled) |
