Merge pull request #72 from Reonu/fix_geo_bone

Fixed geo_bone
This commit is contained in:
thecozies
2021-10-06 13:51:47 -05:00
committed by GitHub

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();