diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-05-10 01:34:21 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-06-24 20:32:43 +0200 |
commit | 6537dfe7f103161676a8850801383b0d63efd40e (patch) | |
tree | f5c7fc57cd126bfcdc27f17076d8c390efa5aa22 /src/objects | |
parent | update librw (diff) | |
download | re3-6537dfe7f103161676a8850801383b0d63efd40e.tar re3-6537dfe7f103161676a8850801383b0d63efd40e.tar.gz re3-6537dfe7f103161676a8850801383b0d63efd40e.tar.bz2 re3-6537dfe7f103161676a8850801383b0d63efd40e.tar.lz re3-6537dfe7f103161676a8850801383b0d63efd40e.tar.xz re3-6537dfe7f103161676a8850801383b0d63efd40e.tar.zst re3-6537dfe7f103161676a8850801383b0d63efd40e.zip |
Diffstat (limited to 'src/objects')
-rw-r--r-- | src/objects/CutsceneHead.cpp | 3 | ||||
-rw-r--r-- | src/objects/Object.cpp | 10 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/objects/CutsceneHead.cpp b/src/objects/CutsceneHead.cpp index 15611c29..19b3a592 100644 --- a/src/objects/CutsceneHead.cpp +++ b/src/objects/CutsceneHead.cpp @@ -85,7 +85,6 @@ CCutsceneHead::ProcessControl(void) { m_matrix.SetRotateY(PI/2); m_matrix = CMatrix(RwFrameGetLTM(m_pHeadNode)) * m_matrix; - UpdateRwFrame(); // android/xbox don't call this } assert(RwObjectGetType(m_rwObject) == rpCLUMP); @@ -95,7 +94,7 @@ CCutsceneHead::ProcessControl(void) // PS2 only plays anims in cutscene, PC always plays anims if(!lastLoadedSKA || CCutsceneMgr::IsRunning()) #endif - RpHAnimHierarchyAddAnimTime(hier, CTimer::GetTimeStepNonClipped()/50.0f); + RpHAnimHierarchyAddAnimTime(hier, CTimer::GetTimeStepNonClippedInSeconds()); } void diff --git a/src/objects/Object.cpp b/src/objects/Object.cpp index 411e245a..85936bb8 100644 --- a/src/objects/Object.cpp +++ b/src/objects/Object.cpp @@ -63,7 +63,7 @@ CObject::CObject(CDummyObject *dummy) if (dummy->m_rwObject) AttachToRwObject(dummy->m_rwObject); else - GetMatrix() = dummy->GetMatrix(); + SetMatrix(dummy->GetMatrix()); m_objectMatrix = dummy->GetMatrix(); dummy->DetachFromRwObject(); @@ -112,8 +112,8 @@ void CObject::Teleport(CVector vecPos) { CWorld::Remove(this); - m_matrix.GetPosition() = vecPos; - m_matrix.UpdateRW(); + GetMatrix().GetPosition() = vecPos; + GetMatrix().UpdateRW(); UpdateRwFrame(); CWorld::Add(this); } @@ -170,7 +170,7 @@ CObject::ObjectDamage(float amount) amount = 0.0f; } if ((amount * m_fCollisionDamageMultiplier > 150.0f || bBodyCastDamageEffect) && m_nCollisionDamageEffect) { - const CVector& vecPos = m_matrix.GetPosition(); + const CVector& vecPos = GetMatrix().GetPosition(); const float fDirectionZ = 0.0002f * amount; switch (m_nCollisionDamageEffect) { @@ -329,7 +329,7 @@ CObject::Init(void) m_pCollidingEntity = nil; CColPoint point; CEntity* outEntity = nil; - const CVector& vecPos = m_matrix.GetPosition(); + const CVector& vecPos = GetMatrix().GetPosition(); if (CWorld::ProcessVerticalLine(vecPos, vecPos.z - 10.0f, point, outEntity, true, false, false, false, false, false, nil)) m_pCurSurface = outEntity; else |