summaryrefslogtreecommitdiffstats
path: root/src/core/Camera.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-10-08 22:57:58 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-10-08 22:57:58 +0200
commit9e5a5f2ab6432ec64a6a7f7ac78fa514fdf5038e (patch)
tree0041b54ddeb9d9dd1eee4a1ef474bb953f2608fe /src/core/Camera.cpp
parentfixed bugs (diff)
parentFull CGameLogic (diff)
downloadre3-9e5a5f2ab6432ec64a6a7f7ac78fa514fdf5038e.tar
re3-9e5a5f2ab6432ec64a6a7f7ac78fa514fdf5038e.tar.gz
re3-9e5a5f2ab6432ec64a6a7f7ac78fa514fdf5038e.tar.bz2
re3-9e5a5f2ab6432ec64a6a7f7ac78fa514fdf5038e.tar.lz
re3-9e5a5f2ab6432ec64a6a7f7ac78fa514fdf5038e.tar.xz
re3-9e5a5f2ab6432ec64a6a7f7ac78fa514fdf5038e.tar.zst
re3-9e5a5f2ab6432ec64a6a7f7ac78fa514fdf5038e.zip
Diffstat (limited to 'src/core/Camera.cpp')
-rw-r--r--src/core/Camera.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index 775ab46a..28cced53 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -1349,6 +1349,14 @@ CCamera::TakeControlWithSpline(short nSwitch)
//FindPlayerPed(); // unused
};
+void CCamera::SetCameraDirectlyInFrontForFollowPed_CamOnAString()
+{
+ m_bCamDirectlyInFront = true;
+ CPlayerPed *player = FindPlayerPed();
+ if (player)
+ m_PedOrientForBehindOrInFront = CGeneral::GetATanOfXY(player->GetForward().x, player->GetForward().y);
+}
+
STARTPATCHES
InjectHook(0x42C760, (bool (CCamera::*)(const CVector &center, float radius, const CMatrix *mat))&CCamera::IsSphereVisible, PATCH_JUMP);
InjectHook(0x46FD00, &CCamera::SetFadeColour, PATCH_JUMP);
@@ -1357,6 +1365,8 @@ STARTPATCHES
InjectHook(0x46FD80, &CCamera::SetMotionBlurAlpha, PATCH_JUMP);
InjectHook(0x46F940, &CCamera::RenderMotionBlur, PATCH_JUMP);
+ InjectHook(0x46FC90, &CCamera::SetCameraDirectlyInFrontForFollowPed_CamOnAString, PATCH_JUMP);
+
InjectHook(0x456F40, WellBufferMe, PATCH_JUMP);
InjectHook(0x4582F0, &CCam::GetVectorsReadyForRW, PATCH_JUMP);
InjectHook(0x457710, &CCam::DoAverageOnVector, PATCH_JUMP);