From 4b140d89544ec12c1894320474477267dfc9185b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 2 Aug 2020 02:20:08 -0400 Subject: [PATCH] CAnimData: Move variable closer to usage spot Keeps the code localized, and doesn't unnecessarily execute the constructor until necessary. --- Runtime/Character/CAnimData.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Runtime/Character/CAnimData.cpp b/Runtime/Character/CAnimData.cpp index 72b60a44c..a4957a835 100644 --- a/Runtime/Character/CAnimData.cpp +++ b/Runtime/Character/CAnimData.cpp @@ -448,15 +448,15 @@ zeus::CTransform CAnimData::GetLocatorTransform(CSegId id, const CCharAnimTime* return {}; } - zeus::CTransform ret; if (time || !x220_31_poseCached) { const_cast(this)->RecalcPoseBuilder(time); const_cast(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); }