ksys/phys: Fix matching issues in SupportBone

This commit is contained in:
Léo Lam 2021-08-01 22:39:19 +02:00 committed by MonsterDruide1
parent 90c34d80fe
commit c64fb93fbd
1 changed files with 5 additions and 5 deletions

View File

@ -233,22 +233,22 @@ float SupportBoneResource::getInterpolatedConnectionCurve(u32 index, float looku
return std::isnan(result) ? 0.0f : result;
}
// NON_MATCHING: Due to seadQuat::normalize() mismatch, this function does not match.
void SupportBoneResource::BaseBone::postRead_() {
sead::Vector3f aim_local = aim.ref();
sead::Vector3f up_local = up.ref();
aim_local.normalize();
side = sead::cross(aim_local, up_local);
side.normalize();
// XXX: this looks like a hack. Why does this not match without an inline function?
[&] { side.normalize(); }();
up_local = sead::cross(side, aim_local);
up_local.normalize();
aim = aim_local;
up = up_local;
aim = aim_local;
base_rotate->normalize();
reverse_rotate = base_rotate->inverse();
base_rotate->invert(&reverse_rotate);
}
} // namespace ksys::phys