2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-07-16 21:25:52 +00:00

CCharLayoutInfo: Invert conditional within GetFromParentUnrotated()

Inverts the conditional to be in terms of the true case, making it a
little nicer to read.
This commit is contained in:
Lioncash 2019-10-26 21:24:08 -04:00
parent 9193f4c4d7
commit bb9da96870

View File

@ -5,11 +5,12 @@ namespace urde {
zeus::CVector3f CCharLayoutInfo::GetFromParentUnrotated(const CSegId& id) const { zeus::CVector3f CCharLayoutInfo::GetFromParentUnrotated(const CSegId& id) const {
const CCharLayoutNode::Bone& bone = x0_node->GetBoneMap()[id]; const CCharLayoutNode::Bone& bone = x0_node->GetBoneMap()[id];
if (!x0_node->GetBoneMap().HasElement(bone.x0_parentId))
if (x0_node->GetBoneMap().HasElement(bone.x0_parentId)) {
const CCharLayoutNode::Bone& parent = x0_node->GetBoneMap()[bone.x0_parentId];
return bone.x4_origin - parent.x4_origin;
} else {
return bone.x4_origin; return bone.x4_origin;
else {
const CCharLayoutNode::Bone& pBone = x0_node->GetBoneMap()[bone.x0_parentId];
return bone.x4_origin - pBone.x4_origin;
} }
} }