Fixed geo_bone

This commit is contained in:
thecozies
2021-10-06 10:24:07 -05:00
parent a3c233004f
commit d2590352af

View File

@@ -712,7 +712,7 @@ void geo_process_animated_part(struct GraphNodeAnimatedPart *node) {
* Render an animated part that has an initial rotation value
*/
void geo_process_bone(struct GraphNodeBone *node) {
Vec3s rotation = {0, 0, 0};
Vec3s rotation = {node->rotation[0], node->rotation[1], node->rotation[2] };
Vec3f translation = {node->translation[0], node->translation[1], node->translation[2]};
if (gCurAnimType == ANIM_TYPE_TRANSLATION) {
@@ -739,9 +739,9 @@ void geo_process_bone(struct GraphNodeBone *node) {
}
}
if (gCurAnimType == ANIM_TYPE_ROTATION) {
rotation[0] = gCurAnimData[retrieve_animation_index(gCurrAnimFrame, &gCurrAnimAttribute)];
rotation[1] = gCurAnimData[retrieve_animation_index(gCurrAnimFrame, &gCurrAnimAttribute)];
rotation[2] = gCurAnimData[retrieve_animation_index(gCurrAnimFrame, &gCurrAnimAttribute)];
rotation[0] += gCurAnimData[retrieve_animation_index(gCurrAnimFrame, &gCurrAnimAttribute)];
rotation[1] += gCurAnimData[retrieve_animation_index(gCurrAnimFrame, &gCurrAnimAttribute)];
rotation[2] += gCurAnimData[retrieve_animation_index(gCurrAnimFrame, &gCurrAnimAttribute)];
}
mtxf_rot_trans_mul(rotation, translation, gMatStack[gMatStackIndex + 1], gMatStack[gMatStackIndex]);
inc_mat_stack();