summaryrefslogtreecommitdiffstats
path: root/src/core/Camera.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-04-07 01:15:55 +0200
committereray orçunus <erayorcunus@gmail.com>2020-04-07 19:18:24 +0200
commit1f8e073c0a446a6c6fe959cc39e27df6e456becc (patch)
tree4f6829e3ada8874d0ad7fa8bf1f4778b682e0756 /src/core/Camera.cpp
parentfinished CCollision (diff)
downloadre3-1f8e073c0a446a6c6fe959cc39e27df6e456becc.tar
re3-1f8e073c0a446a6c6fe959cc39e27df6e456becc.tar.gz
re3-1f8e073c0a446a6c6fe959cc39e27df6e456becc.tar.bz2
re3-1f8e073c0a446a6c6fe959cc39e27df6e456becc.tar.lz
re3-1f8e073c0a446a6c6fe959cc39e27df6e456becc.tar.xz
re3-1f8e073c0a446a6c6fe959cc39e27df6e456becc.tar.zst
re3-1f8e073c0a446a6c6fe959cc39e27df6e456becc.zip
Diffstat (limited to '')
-rw-r--r--src/core/Camera.cpp42
1 files changed, 33 insertions, 9 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index e5bc09c8..9d927354 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -727,12 +727,24 @@ CCamera::CamControl(void)
if(CarZoomIndicator == CAM_ZOOM_1STPRS && !m_bPlayerIsInGarage){
CarZoomValue = 0.0f;
ReqMode = CCam::MODE_1STPERSON;
- }else if(CarZoomIndicator == CAM_ZOOM_1)
- CarZoomValue = 0.05f;
+ }
+#ifdef FREE_CAM
+ else if (bFreeCam) {
+ if (CarZoomIndicator == CAM_ZOOM_1)
+ CarZoomValue = ((CVehicle*)pTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_1 : FREE_CAR_ZOOM_VALUE_1;
+ else if (CarZoomIndicator == CAM_ZOOM_2)
+ CarZoomValue = ((CVehicle*)pTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_2 : FREE_CAR_ZOOM_VALUE_2;
+ else if (CarZoomIndicator == CAM_ZOOM_3)
+ CarZoomValue = ((CVehicle*)pTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_3 : FREE_CAR_ZOOM_VALUE_3;
+ }
+#endif
+ else if(CarZoomIndicator == CAM_ZOOM_1)
+ CarZoomValue = DEFAULT_CAR_ZOOM_VALUE_1;
else if(CarZoomIndicator == CAM_ZOOM_2)
- CarZoomValue = 1.9f;
+ CarZoomValue = DEFAULT_CAR_ZOOM_VALUE_2;
else if(CarZoomIndicator == CAM_ZOOM_3)
- CarZoomValue = 3.9f;
+ CarZoomValue = DEFAULT_CAR_ZOOM_VALUE_3;
+
if(CarZoomIndicator == CAM_ZOOM_TOPDOWN && !m_bPlayerIsInGarage){
CarZoomValue = 1.0f;
ReqMode = CCam::MODE_TOPDOWN;
@@ -2956,11 +2968,23 @@ CCamera::SetZoomValueFollowPedScript(int16 dist)
void
CCamera::SetZoomValueCamStringScript(int16 dist)
{
- switch (dist) {
- case 0: m_fCarZoomValueScript = 0.05f; break;
- case 1: m_fCarZoomValueScript = 1.9f; break;
- case 2: m_fCarZoomValueScript = 3.9f; break;
- default: m_fCarZoomValueScript = m_fCarZoomValueScript; break;
+#ifdef FREE_CAM
+ if (bFreeCam) {
+ switch (dist) {
+ case 0: m_fCarZoomValueScript = ((CVehicle*)Cams[ActiveCam].CamTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_1 : FREE_CAR_ZOOM_VALUE_1; break;
+ case 1: m_fCarZoomValueScript = ((CVehicle*)Cams[ActiveCam].CamTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_2 : FREE_CAR_ZOOM_VALUE_2; break;
+ case 2: m_fCarZoomValueScript = ((CVehicle*)Cams[ActiveCam].CamTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_3 : FREE_CAR_ZOOM_VALUE_3; break;
+ default: m_fCarZoomValueScript = m_fCarZoomValueScript; break;
+ }
+ } else
+#endif
+ {
+ switch (dist) {
+ case 0: m_fCarZoomValueScript = DEFAULT_CAR_ZOOM_VALUE_1; break;
+ case 1: m_fCarZoomValueScript = DEFAULT_CAR_ZOOM_VALUE_2; break;
+ case 2: m_fCarZoomValueScript = DEFAULT_CAR_ZOOM_VALUE_3; break;
+ default: m_fCarZoomValueScript = m_fCarZoomValueScript; break;
+ }
}
m_bUseScriptZoomValueCar = true;