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
1 changed files with 5 additions and 4 deletions

View File

@ -5,11 +5,12 @@ namespace urde {
zeus::CVector3f CCharLayoutInfo::GetFromParentUnrotated(const CSegId& id) const {
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;
else {
const CCharLayoutNode::Bone& pBone = x0_node->GetBoneMap()[bone.x0_parentId];
return bone.x4_origin - pBone.x4_origin;
}
}