mirror of https://github.com/AxioDL/metaforce.git
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:
parent
9193f4c4d7
commit
bb9da96870
|
@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue