summaryrefslogtreecommitdiffstats
path: root/src/animation/CutsceneMgr.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-12-18 23:46:51 +0100
committeraap <aap@papnet.eu>2020-12-18 23:46:51 +0100
commit9982f1f21bca3bb51ac7d31cede606beef5c0f67 (patch)
tree853255a2c6fb8765f8ec6f83cccf872b35d43a05 /src/animation/CutsceneMgr.cpp
parentsilly mistake (diff)
downloadre3-9982f1f21bca3bb51ac7d31cede606beef5c0f67.tar
re3-9982f1f21bca3bb51ac7d31cede606beef5c0f67.tar.gz
re3-9982f1f21bca3bb51ac7d31cede606beef5c0f67.tar.bz2
re3-9982f1f21bca3bb51ac7d31cede606beef5c0f67.tar.lz
re3-9982f1f21bca3bb51ac7d31cede606beef5c0f67.tar.xz
re3-9982f1f21bca3bb51ac7d31cede606beef5c0f67.tar.zst
re3-9982f1f21bca3bb51ac7d31cede606beef5c0f67.zip
Diffstat (limited to '')
-rw-r--r--src/animation/CutsceneMgr.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/animation/CutsceneMgr.cpp b/src/animation/CutsceneMgr.cpp
index 64951a87..b312236b 100644
--- a/src/animation/CutsceneMgr.cpp
+++ b/src/animation/CutsceneMgr.cpp
@@ -291,12 +291,15 @@ CCutsceneMgr::SetupCutsceneToStart(void)
if (ms_pCutsceneObjects[i]->m_pAttachTo != nil) {
pAnimBlendAssoc->flags &= (~ASSOC_HAS_TRANSLATION);
} else {
- KeyFrameTrans* keyFrames;
- if (pAnimBlendAssoc->hierarchy->IsCompressed())
- keyFrames = ((KeyFrameTrans*)pAnimBlendAssoc->hierarchy->sequences[0].GetKeyFrameCompressed(0));
- else
- keyFrames = ((KeyFrameTrans*)pAnimBlendAssoc->hierarchy->sequences[0].GetKeyFrame(0));
- ms_pCutsceneObjects[i]->SetPosition(ms_cutsceneOffset + keyFrames->translation);
+ if (pAnimBlendAssoc->hierarchy->IsCompressed()){
+ KeyFrameTransCompressed *keyFrames = ((KeyFrameTransCompressed*)pAnimBlendAssoc->hierarchy->sequences[0].GetKeyFrameCompressed(0));
+ CVector trans;
+ keyFrames->GetTranslation(&trans);
+ ms_pCutsceneObjects[i]->SetPosition(ms_cutsceneOffset + trans);
+ }else{
+ KeyFrameTrans *keyFrames = ((KeyFrameTrans*)pAnimBlendAssoc->hierarchy->sequences[0].GetKeyFrame(0));
+ ms_pCutsceneObjects[i]->SetPosition(ms_cutsceneOffset + keyFrames->translation);
+ }
}
pAnimBlendAssoc->SetRun();
} else {
@@ -331,7 +334,7 @@ CCutsceneMgr::SetCutsceneAnim(const char *animName, CObject *pObject)
}
if (pNewAnim->hierarchy->IsCompressed())
- pNewAnim->hierarchy->compressed2 = true;
+ pNewAnim->hierarchy->keepCompressed = true;
CStreaming::ImGonnaUseStreamingMemory();
pNewAnim = ms_cutsceneAssociations.CopyAnimation(animName);
@@ -344,8 +347,8 @@ CCutsceneMgr::SetCutsceneAnim(const char *animName, CObject *pObject)
pAnimBlendClumpData = *RPANIMBLENDCLUMPDATA(pObject->m_rwObject);
pAnimBlendClumpData->link.Prepend(&pNewAnim->link);
- if (pNewAnim->hierarchy->compressed2)
- pAnimBlendClumpData->frames->flag |= AnimBlendFrameData::UNK_COMPRESSED;
+ if (pNewAnim->hierarchy->keepCompressed)
+ pAnimBlendClumpData->frames->flag |= AnimBlendFrameData::COMPRESSED;
}
void