summaryrefslogtreecommitdiffstats
path: root/src/core/Camera.cpp
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2020-05-12 01:24:57 +0200
committerFilip Gawin <filip.gawin@zoho.com>2020-05-12 23:18:54 +0200
commitc2ac6b3759901ecede7b22c1e9ab9f5a04ddd527 (patch)
treecf51d6ab8430cd186e02f0e8105004f8e5476728 /src/core/Camera.cpp
parentfix shotgun (diff)
downloadre3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.gz
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.bz2
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.lz
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.xz
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.zst
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.zip
Diffstat (limited to 'src/core/Camera.cpp')
-rw-r--r--src/core/Camera.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index 9b178f35..35d230dc 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -80,6 +80,10 @@ CCamera::CCamera(void)
Init();
}
+CCamera::CCamera(float)
+{
+}
+
void
CCamera::Init(void)
{
@@ -87,7 +91,12 @@ CCamera::Init(void)
float fMouseAccelHorzntl = m_fMouseAccelHorzntl;
float fMouseAccelVertical = m_fMouseAccelVertical;
#endif
+#ifdef FIX_BUGS
+ static const CCamera DummyCamera = CCamera(0.f);
+ *this = DummyCamera;
+#else
memset(this, 0, sizeof(CCamera)); // getting rid of vtable, eh?
+#endif
#ifdef GTA3_1_1_PATCH
m_fMouseAccelHorzntl = fMouseAccelHorzntl;
m_fMouseAccelVertical = fMouseAccelVertical;
@@ -740,6 +749,7 @@ CCamera::CamControl(void)
case VEHICLE_TYPE_BOAT:
ReqMode = CCam::MODE_BEHINDBOAT;
break;
+ default: break;
}
// Car zoom value
@@ -2992,7 +3002,7 @@ CCamera::SetZoomValueFollowPedScript(int16 dist)
case 0: m_fPedZoomValueScript = 0.25f; break;
case 1: m_fPedZoomValueScript = 1.5f; break;
case 2: m_fPedZoomValueScript = 2.9f; break;
- default: m_fPedZoomValueScript = m_fPedZoomValueScript; break;
+ default: break;
}
m_bUseScriptZoomValuePed = true;
@@ -3007,7 +3017,7 @@ CCamera::SetZoomValueCamStringScript(int16 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;
+ default: break;
}
} else
#endif
@@ -3016,7 +3026,7 @@ CCamera::SetZoomValueCamStringScript(int16 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;
+ default: break;
}
}