CAnimData: Move variable closer to usage spot

Keeps the code localized, and doesn't unnecessarily execute the
constructor until necessary.
This commit is contained in:
Lioncash 2020-08-02 02:20:08 -04:00
parent 4e9b22962c
commit 4b140d8954
1 changed files with 3 additions and 3 deletions

View File

@ -448,15 +448,15 @@ zeus::CTransform CAnimData::GetLocatorTransform(CSegId id, const CCharAnimTime*
return {};
}
zeus::CTransform ret;
if (time || !x220_31_poseCached) {
const_cast<CAnimData*>(this)->RecalcPoseBuilder(time);
const_cast<CAnimData*>(this)->x220_31_poseCached = time == nullptr;
}
if (!x220_30_poseBuilt)
zeus::CTransform ret;
if (!x220_30_poseBuilt) {
x2fc_poseBuilder.BuildTransform(id, ret);
else {
} else {
ret.setRotation(x224_pose.GetTransformMinusOffset(id));
ret.origin = x224_pose.GetOffset(id);
}