mirror of https://github.com/AxioDL/metaforce.git
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:
parent
4e9b22962c
commit
4b140d8954
|
@ -448,15 +448,15 @@ zeus::CTransform CAnimData::GetLocatorTransform(CSegId id, const CCharAnimTime*
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
zeus::CTransform ret;
|
|
||||||
if (time || !x220_31_poseCached) {
|
if (time || !x220_31_poseCached) {
|
||||||
const_cast<CAnimData*>(this)->RecalcPoseBuilder(time);
|
const_cast<CAnimData*>(this)->RecalcPoseBuilder(time);
|
||||||
const_cast<CAnimData*>(this)->x220_31_poseCached = time == nullptr;
|
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);
|
x2fc_poseBuilder.BuildTransform(id, ret);
|
||||||
else {
|
} else {
|
||||||
ret.setRotation(x224_pose.GetTransformMinusOffset(id));
|
ret.setRotation(x224_pose.GetTransformMinusOffset(id));
|
||||||
ret.origin = x224_pose.GetOffset(id);
|
ret.origin = x224_pose.GetOffset(id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue