diff options
author | withmorten <morten.with@gmail.com> | 2021-01-23 23:13:40 +0100 |
---|---|---|
committer | withmorten <morten.with@gmail.com> | 2021-01-24 17:08:34 +0100 |
commit | 29fb996b00bd5ab231fb6347d3dfe9d13ec7f652 (patch) | |
tree | 72da2a9aae7f4e957cba15e4125d68ec1277a0c4 /src/core/Ropes.cpp | |
parent | mission cleanup fix (diff) | |
download | re3-29fb996b00bd5ab231fb6347d3dfe9d13ec7f652.tar re3-29fb996b00bd5ab231fb6347d3dfe9d13ec7f652.tar.gz re3-29fb996b00bd5ab231fb6347d3dfe9d13ec7f652.tar.bz2 re3-29fb996b00bd5ab231fb6347d3dfe9d13ec7f652.tar.lz re3-29fb996b00bd5ab231fb6347d3dfe9d13ec7f652.tar.xz re3-29fb996b00bd5ab231fb6347d3dfe9d13ec7f652.tar.zst re3-29fb996b00bd5ab231fb6347d3dfe9d13ec7f652.zip |
Diffstat (limited to 'src/core/Ropes.cpp')
-rw-r--r-- | src/core/Ropes.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/Ropes.cpp b/src/core/Ropes.cpp index dbae9ee3..ffce36f9 100644 --- a/src/core/Ropes.cpp +++ b/src/core/Ropes.cpp @@ -116,7 +116,7 @@ CRopes::RegisterRope(uintptr id, CVector pos, bool setUpdateTimer) aRopes[i].m_unk = false; aRopes[i].m_bWasRegistered = true; aRopes[i].m_updateTimer = setUpdateTimer ? CTimer::GetTimeInMilliseconds() + 20000 : 0; - for(j = 1; j < ARRAY_SIZE(CRope::m_pos); j++){ + for(j = 1; j < ARRAY_SIZE(aRopes[0].m_pos); j++){ if(j & 1) aRopes[i].m_pos[j] = aRopes[i].m_pos[j-1] + CVector(0.0f, 0.0f, 0.625f); else @@ -147,7 +147,7 @@ CRopes::FindCoorsAlongRope(uintptr id, float t, CVector *coors) float f; for(i = 0; i < ARRAY_SIZE(aRopes); i++) if(aRopes[i].m_bActive && aRopes[i].m_id == id){ - t = (ARRAY_SIZE(CRope::m_pos)-1)*clamp(t, 0.0f, 0.999f); + t = (ARRAY_SIZE(aRopes[0].m_pos)-1)*clamp(t, 0.0f, 0.999f); j = t; f = t - j; *coors = (1.0f-f)*aRopes[i].m_pos[j] + f*aRopes[i].m_pos[j+1]; |