diff options
author | withmorten <morten.with@gmail.com> | 2021-06-28 13:31:35 +0200 |
---|---|---|
committer | withmorten <morten.with@gmail.com> | 2021-06-28 13:31:35 +0200 |
commit | cb3b3855b844c14c0e943c1a7614fc29820cf666 (patch) | |
tree | 8e9a6ae74e9c98515b813f412476058274d3fde4 /src/core/Camera.cpp | |
parent | Less invasive red tint on Delete Game page (diff) | |
download | re3-cb3b3855b844c14c0e943c1a7614fc29820cf666.tar re3-cb3b3855b844c14c0e943c1a7614fc29820cf666.tar.gz re3-cb3b3855b844c14c0e943c1a7614fc29820cf666.tar.bz2 re3-cb3b3855b844c14c0e943c1a7614fc29820cf666.tar.lz re3-cb3b3855b844c14c0e943c1a7614fc29820cf666.tar.xz re3-cb3b3855b844c14c0e943c1a7614fc29820cf666.tar.zst re3-cb3b3855b844c14c0e943c1a7614fc29820cf666.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/Camera.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index 5881dacd..f3b41655 100644 --- a/src/core/Camera.cpp +++ b/src/core/Camera.cpp @@ -661,7 +661,7 @@ CCamera::Process(void) // Process Shake float shakeStrength = m_fCamShakeForce - 0.28f*(CTimer::GetTimeInMilliseconds()-m_uiCamShakeStart)/1000.0f; - shakeStrength = clamp(shakeStrength, 0.0f, 2.0f); + shakeStrength = Clamp(shakeStrength, 0.0f, 2.0f); int shakeRand = CGeneral::GetRandomNumber(); float shakeOffset = shakeStrength*0.1f; GetMatrix().GetPosition().x += shakeOffset * ((shakeRand & 0xF) - 7); @@ -1877,7 +1877,7 @@ CCamera::CamShake(float strength, float x, float y, float z) float curForce = mult*(m_fCamShakeForce - (CTimer::GetTimeInMilliseconds() - m_uiCamShakeStart)/1000.0f); strength = mult*strength; - if(clamp(curForce, 0.0f, 2.0f) < strength){ + if(Clamp(curForce, 0.0f, 2.0f) < strength){ m_fCamShakeForce = strength; m_uiCamShakeStart = CTimer::GetTimeInMilliseconds(); } @@ -1888,7 +1888,7 @@ void CamShakeNoPos(CCamera *cam, float strength) { float curForce = cam->m_fCamShakeForce - (CTimer::GetTimeInMilliseconds() - cam->m_uiCamShakeStart)/1000.0f; - if(clamp(curForce, 0.0f, 2.0f) < strength){ + if(Clamp(curForce, 0.0f, 2.0f) < strength){ cam->m_fCamShakeForce = strength; cam->m_uiCamShakeStart = CTimer::GetTimeInMilliseconds(); } @@ -3572,7 +3572,7 @@ CCamera::Find3rdPersonCamTargetVector(float dist, CVector pos, CVector &source, float CCamera::Find3rdPersonQuickAimPitch(void) { - float clampedFrontZ = clamp(Cams[ActiveCam].Front.z, -1.0f, 1.0f); + float clampedFrontZ = Clamp(Cams[ActiveCam].Front.z, -1.0f, 1.0f); float rot = Asin(clampedFrontZ); |