summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-10-14 00:44:48 +0300
committerNikolay Korolev <nickvnuk@gmail.com>2019-10-14 00:44:48 +0300
commitf93285df7960b75f616d9bbdb364e113714151ee (patch)
treeafa425c6f56716ff4d610e2ed9497996c1fe9d06 /src/core
parent2411558bab50929cbc067c9f4083f24ad1af65c9 (diff)
parent94b389ee16e194546754bc65bb92a6e256bd6062 (diff)
Merge remote-tracking branch 'upstream/master' into script_dev
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Camera.cpp15
-rw-r--r--src/core/Camera.h4
2 files changed, 17 insertions, 2 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index 28cced53..20c2ebd0 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -1357,6 +1357,18 @@ void CCamera::SetCameraDirectlyInFrontForFollowPed_CamOnAString()
m_PedOrientForBehindOrInFront = CGeneral::GetATanOfXY(player->GetForward().x, player->GetForward().y);
}
+void
+CCamera::SetWideScreenOn(void)
+{
+ m_WideScreenOn = true;
+}
+
+void
+CCamera::SetWideScreenOff(void)
+{
+ m_bWantsToSwitchWidescreenOff = m_WideScreenOn;
+}
+
STARTPATCHES
InjectHook(0x42C760, (bool (CCamera::*)(const CVector &center, float radius, const CMatrix *mat))&CCamera::IsSphereVisible, PATCH_JUMP);
InjectHook(0x46FD00, &CCamera::SetFadeColour, PATCH_JUMP);
@@ -1367,6 +1379,9 @@ STARTPATCHES
InjectHook(0x46FC90, &CCamera::SetCameraDirectlyInFrontForFollowPed_CamOnAString, PATCH_JUMP);
+ InjectHook(0x46FF00, &CCamera::SetWideScreenOn, PATCH_JUMP);
+ InjectHook(0x46FF10, &CCamera::SetWideScreenOff, PATCH_JUMP);
+
InjectHook(0x456F40, WellBufferMe, PATCH_JUMP);
InjectHook(0x4582F0, &CCam::GetVectorsReadyForRW, PATCH_JUMP);
InjectHook(0x457710, &CCam::DoAverageOnVector, PATCH_JUMP);
diff --git a/src/core/Camera.h b/src/core/Camera.h
index 7d765a06..e2717934 100644
--- a/src/core/Camera.h
+++ b/src/core/Camera.h
@@ -468,8 +468,8 @@ int m_iModeObbeCamIsInForCar;
void DrawBordersForWideScreen(void);
void Restore(void);
- void SetWideScreenOn(void) { m_WideScreenOn = true; }
- void SetWideScreenOff(void) { m_WideScreenOn = false; }
+ void SetWideScreenOn(void);
+ void SetWideScreenOff(void);
float Find3rdPersonQuickAimPitch(void);