diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-05-12 23:55:52 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-05-12 23:55:52 +0200 |
commit | 7c2b9478d52e5122eff2e11298f31bfc1b896f94 (patch) | |
tree | 53ad6828eb1366a5dd00d9977eec330bd3d7b52f /src/core/Camera.cpp | |
parent | Merge remote-tracking branch 'origin/master' into miami (diff) | |
parent | Merge pull request #537 from ShFil119/linux_warns (diff) | |
download | re3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.tar re3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.tar.gz re3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.tar.bz2 re3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.tar.lz re3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.tar.xz re3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.tar.zst re3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.zip |
Diffstat (limited to 'src/core/Camera.cpp')
-rw-r--r-- | src/core/Camera.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index ffaa5884..623b2ea9 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; @@ -744,6 +753,7 @@ CCamera::CamControl(void) case VEHICLE_TYPE_BOAT: ReqMode = CCam::MODE_BEHINDBOAT; break; + default: break; } // Car zoom value @@ -2991,7 +3001,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; @@ -3006,7 +3016,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 @@ -3015,7 +3025,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; } } |