diff --git a/stepmania/src/Model.cpp b/stepmania/src/Model.cpp index 903e3d3616..219e4e43aa 100644 --- a/stepmania/src/Model.cpp +++ b/stepmania/src/Model.cpp @@ -676,22 +676,18 @@ void Model::SetBones( const msAnimation* pAnimation, float fFrame, vectorfTime, pThisRotationKey->fTime, 0, 1 ); - RageVector4 q1, q2, q; - RageQuatFromHPR( &q1, pLastRotationKey->Rotation ); - RageQuatFromHPR( &q2, pThisRotationKey->Rotation ); - RageQuatSlerp( &q, q1, q2, s ); + RageVector4 q; + RageQuatSlerp( &q, pLastRotationKey->Rotation, pThisRotationKey->Rotation, s ); RageMatrixFromQuat( &m, q ); } else if( pLastRotationKey == 0 ) { - vRot = pThisRotationKey->Rotation; - RageMatrixAngles( &m, vRot ); + RageMatrixFromQuat( &m, pThisRotationKey->Rotation ); } else if( pThisRotationKey == 0 ) { - vRot = pLastRotationKey->Rotation; - RageMatrixAngles( &m, vRot ); + RageMatrixFromQuat( &m, pLastRotationKey->Rotation ); } m.m[3][0] = vPos[0]; m.m[3][1] = vPos[1]; diff --git a/stepmania/src/ModelTypes.cpp b/stepmania/src/ModelTypes.cpp index 1710527323..f9e5630b74 100644 --- a/stepmania/src/ModelTypes.cpp +++ b/stepmania/src/ModelTypes.cpp @@ -340,7 +340,8 @@ bool msAnimation::LoadMilkshapeAsciiBones( RString sAniName, RString sPath ) msRotationKey key; key.fTime = fTime; - key.Rotation = RageVector3( Rotation[0], Rotation[1], Rotation[2] ); + RageVector3 Rotation = RageVector3( Rotation[0], Rotation[1], Rotation[2] ); + RageQuatFromHPR( &key.Rotation, Rotation ); Bone.RotationKeys[j] = key; } } diff --git a/stepmania/src/ModelTypes.h b/stepmania/src/ModelTypes.h index fb87ec263b..bc0ba114da 100644 --- a/stepmania/src/ModelTypes.h +++ b/stepmania/src/ModelTypes.h @@ -110,7 +110,7 @@ struct msPositionKey struct msRotationKey { float fTime; - RageVector3 Rotation; + RageVector4 Rotation; }; struct msBone