summaryrefslogtreecommitdiffstats
path: root/src/core/Camera.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-06-30 20:26:36 +0200
committerSergeanur <s.anureev@yandex.ua>2021-06-30 20:26:36 +0200
commit138abb91f6232ef40e1093b3c37122e1b0bf2cf1 (patch)
treec4c694734bb56c29ddf8b5bbd891741540a7c68b /src/core/Camera.cpp
parentFix script load (diff)
parentPause radio when game is paused (diff)
downloadre3-138abb91f6232ef40e1093b3c37122e1b0bf2cf1.tar
re3-138abb91f6232ef40e1093b3c37122e1b0bf2cf1.tar.gz
re3-138abb91f6232ef40e1093b3c37122e1b0bf2cf1.tar.bz2
re3-138abb91f6232ef40e1093b3c37122e1b0bf2cf1.tar.lz
re3-138abb91f6232ef40e1093b3c37122e1b0bf2cf1.tar.xz
re3-138abb91f6232ef40e1093b3c37122e1b0bf2cf1.tar.zst
re3-138abb91f6232ef40e1093b3c37122e1b0bf2cf1.zip
Diffstat (limited to 'src/core/Camera.cpp')
-rw-r--r--src/core/Camera.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index 987efe04..6e632c7c 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -348,7 +348,7 @@ CCamera::Process(void)
currentTime = m_uiTransitionDuration;
float fractionInter = (float) currentTime / m_uiTransitionDuration;
float fractionInterTarget = (float) currentTime / m_uiTransitionDurationTargetCoors;
- fractionInterTarget = clamp(fractionInterTarget, 0.0f, 1.0f);
+ fractionInterTarget = Clamp(fractionInterTarget, 0.0f, 1.0f);
// Interpolate target separately
if(fractionInterTarget <= m_fFractionInterToStopMovingTarget){
@@ -552,7 +552,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);
@@ -1914,7 +1914,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();
}
@@ -1925,7 +1925,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();
}
@@ -3987,7 +3987,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);