Proper CAnimData::GetLocatorTransform imp

This commit is contained in:
Phillip Stephens 2016-09-02 20:58:41 -07:00
parent 5979ccaf93
commit 4d4288858b
1 changed files with 9 additions and 4 deletions

View File

@ -183,12 +183,17 @@ zeus::CTransform CAnimData::GetLocatorTransform(CSegId id, const CCharAnimTime*
zeus::CTransform ret; zeus::CTransform ret;
if (!x220_31_poseCached) if (!x220_31_poseCached)
{
const_cast<CAnimData*>(this)->RecalcPoseBuilder(time); const_cast<CAnimData*>(this)->RecalcPoseBuilder(time);
const_cast<CAnimData*>(this)->x220_31_poseCached = true;
}
x2fc_poseBuilder.BuildTransform(id, ret); if (!x220_31_poseCached)
x2fc_poseBuilder.BuildTransform(id, ret);
else
{
zeus::CMatrix3f rot = x224_pose.GetRotation(id);
zeus::CVector3f offset = x224_pose.GetOffset(id);
ret.setRotation(rot);
ret.origin = offset;
}
return ret; return ret;
} }