diff --git a/src/port/interpolation/FrameInterpolation.cpp b/src/port/interpolation/FrameInterpolation.cpp index c1d787119..4da081ac1 100644 --- a/src/port/interpolation/FrameInterpolation.cpp +++ b/src/port/interpolation/FrameInterpolation.cpp @@ -391,7 +391,8 @@ struct InterpolateCtx { // break; case Op::MatrixMult: - //interpolate_mtxf(&tmp_mtxf, &old_op.matrix_mult.mf, &new_op.matrix_mult.mf); + interpolate_mtxf(&tmp_mtxf, &old_op.matrix_mult.mf, &new_op.matrix_mult.mf); + mtxf_multiplication(*gInterpolationMatrix, tmp_mtxf.mf, new_op.matrix_mult.mf.mf); // Matrix_Mult(gInterpolationMatrix, (Matrix*) &tmp_mtxf, new_op.matrix_mult.mode); break; diff --git a/src/port/interpolation/FrameInterpolation.h b/src/port/interpolation/FrameInterpolation.h index 612db4160..debb5b890 100644 --- a/src/port/interpolation/FrameInterpolation.h +++ b/src/port/interpolation/FrameInterpolation.h @@ -45,7 +45,7 @@ void FrameInterpolation_RecordMatrixPush(Mat4* matrix); void FrameInterpolation_RecordMatrixPop(Mat4* matrix); -//void FrameInterpolation_RecordMatrixMult(Matrix* matrix, MtxF* mf, u8 mode); +void FrameInterpolation_RecordMatrixMult(Mat4* matrix, MtxF* mf, u8 mode); void FrameInterpolation_RecordMatrixTranslate(Mat4* matrix, Vec3f b); diff --git a/src/racing/math_util.c b/src/racing/math_util.c index 5c099dda7..a67bc7f65 100644 --- a/src/racing/math_util.c +++ b/src/racing/math_util.c @@ -803,6 +803,9 @@ void func_802B6D58(Mat4 arg0, Vec3f arg1, Vec3f arg2) { void mtxf_multiplication(Mat4 dest, Mat4 mat1, Mat4 mat2) { Mat4 product; + + FrameInterpolation_RecordMatrixMult(dest, product, 0); + product[0][0] = (mat1[0][0] * mat2[0][0]) + (mat1[0][1] * mat2[1][0]) + (mat1[0][2] * mat2[2][0]) + (mat1[0][3] * mat2[3][0]); product[0][1] =