diff options
author | bigbossbro08 <bigbossbro08@gmail.com> | 2020-05-10 18:05:45 +0200 |
---|---|---|
committer | bigbossbro08 <bigbossbro08@gmail.com> | 2020-05-10 18:05:45 +0200 |
commit | bd302ecca157982a2bfe83d6cfb3167418fd8bb3 (patch) | |
tree | b9d849f3fc61246f0038e5bec53ef8f61b040b83 /src/modelinfo/ClumpModelInfo.cpp | |
parent | fixed few more typos (diff) | |
parent | some fixes and cosmetic changes (diff) | |
download | re3-bd302ecca157982a2bfe83d6cfb3167418fd8bb3.tar re3-bd302ecca157982a2bfe83d6cfb3167418fd8bb3.tar.gz re3-bd302ecca157982a2bfe83d6cfb3167418fd8bb3.tar.bz2 re3-bd302ecca157982a2bfe83d6cfb3167418fd8bb3.tar.lz re3-bd302ecca157982a2bfe83d6cfb3167418fd8bb3.tar.xz re3-bd302ecca157982a2bfe83d6cfb3167418fd8bb3.tar.zst re3-bd302ecca157982a2bfe83d6cfb3167418fd8bb3.zip |
Diffstat (limited to 'src/modelinfo/ClumpModelInfo.cpp')
-rw-r--r-- | src/modelinfo/ClumpModelInfo.cpp | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/modelinfo/ClumpModelInfo.cpp b/src/modelinfo/ClumpModelInfo.cpp index 44faf3c5..ccfcd304 100644 --- a/src/modelinfo/ClumpModelInfo.cpp +++ b/src/modelinfo/ClumpModelInfo.cpp @@ -43,7 +43,7 @@ CClumpModelInfo::CreateInstance(void) RpClumpForAllAtomics(clone, SetHierarchyForSkinAtomic, hier); anim = HAnimAnimationCreateForHierarchy(hier); RpHAnimHierarchySetCurrentAnim(hier, anim); -// RpHAnimHierarchySetFlags(hier, (RpHAnimHierarchyFlag)(rpHANIMHIERARCHYUPDATEMODELLINGMATRICES|rpHANIMHIERARCHYUPDATELTMS)); + RpHAnimHierarchySetFlags(hier, (RpHAnimHierarchyFlag)(rpHANIMHIERARCHYUPDATEMODELLINGMATRICES|rpHANIMHIERARCHYUPDATELTMS)); // the rest is xbox only: // RpSkinGetNumBones(RpSkinGeometryGetSkin(RpAtomicGetGeometry(IsClumpSkinned(clone)))); RpHAnimHierarchyUpdateMatrices(hier); @@ -113,7 +113,7 @@ CClumpModelInfo::SetClump(RpClump *clump) weights->w2 /= sum; weights->w3 /= sum; } -// RpHAnimHierarchySetFlags(hier, (RpHAnimHierarchyFlag)(rpHANIMHIERARCHYUPDATEMODELLINGMATRICES|rpHANIMHIERARCHYUPDATELTMS)); + RpHAnimHierarchySetFlags(hier, (RpHAnimHierarchyFlag)(rpHANIMHIERARCHYUPDATEMODELLINGMATRICES|rpHANIMHIERARCHYUPDATELTMS)); } #endif } @@ -139,13 +139,12 @@ CClumpModelInfo::FindFrameFromIdCB(RwFrame *frame, void *data) { RwObjectIdAssociation *assoc = (RwObjectIdAssociation*)data; - if(CVisibilityPlugins::GetFrameHierarchyId(frame) != assoc->id){ - RwFrameForAllChildren(frame, FindFrameFromIdCB, assoc); - return assoc->frame ? nil : frame; - }else{ + if(CVisibilityPlugins::GetFrameHierarchyId(frame) == assoc->id){ assoc->frame = frame; return nil; } + RwFrameForAllChildren(frame, FindFrameFromIdCB, assoc); + return assoc->frame ? nil : frame; } RwFrame* @@ -153,13 +152,12 @@ CClumpModelInfo::FindFrameFromNameCB(RwFrame *frame, void *data) { RwObjectNameAssociation *assoc = (RwObjectNameAssociation*)data; - if(CGeneral::faststricmp(GetFrameNodeName(frame), assoc->name)){ - RwFrameForAllChildren(frame, FindFrameFromNameCB, assoc); - return assoc->frame ? nil : frame; - }else{ + if(!CGeneral::faststricmp(GetFrameNodeName(frame), assoc->name)){ assoc->frame = frame; return nil; } + RwFrameForAllChildren(frame, FindFrameFromNameCB, assoc); + return assoc->frame ? nil : frame; } RwFrame* @@ -167,14 +165,13 @@ CClumpModelInfo::FindFrameFromNameWithoutIdCB(RwFrame *frame, void *data) { RwObjectNameAssociation *assoc = (RwObjectNameAssociation*)data; - if(CVisibilityPlugins::GetFrameHierarchyId(frame) || - CGeneral::faststricmp(GetFrameNodeName(frame), assoc->name)){ - RwFrameForAllChildren(frame, FindFrameFromNameWithoutIdCB, assoc); - return assoc->frame ? nil : frame; - }else{ + if(CVisibilityPlugins::GetFrameHierarchyId(frame) == 0 && + !CGeneral::faststricmp(GetFrameNodeName(frame), assoc->name)){ assoc->frame = frame; return nil; } + RwFrameForAllChildren(frame, FindFrameFromNameWithoutIdCB, assoc); + return assoc->frame ? nil : frame; } RwFrame* |