summaryrefslogtreecommitdiffstats
path: root/src/core/Camera.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-07-14 13:49:27 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-07-14 13:49:27 +0200
commitb77a9ce9550d0326c8bd69fdc1474af4f3a1d268 (patch)
treebe1eba74734de4b37a0795627e3129fd1ed93f92 /src/core/Camera.cpp
parentMerge remote-tracking branch 'upstream/master' (diff)
downloadre3-b77a9ce9550d0326c8bd69fdc1474af4f3a1d268.tar
re3-b77a9ce9550d0326c8bd69fdc1474af4f3a1d268.tar.gz
re3-b77a9ce9550d0326c8bd69fdc1474af4f3a1d268.tar.bz2
re3-b77a9ce9550d0326c8bd69fdc1474af4f3a1d268.tar.lz
re3-b77a9ce9550d0326c8bd69fdc1474af4f3a1d268.tar.xz
re3-b77a9ce9550d0326c8bd69fdc1474af4f3a1d268.tar.zst
re3-b77a9ce9550d0326c8bd69fdc1474af4f3a1d268.zip
Diffstat (limited to 'src/core/Camera.cpp')
-rw-r--r--src/core/Camera.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index c06ee48b..166928c1 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -41,6 +41,13 @@ CCamera::IsSphereVisible(const CVector &center, float radius, const CMatrix *mat
}
bool
+CCamera::IsSphereVisible(const CVector &center, float radius)
+{
+ CMatrix mat = m_cameraMatrix;
+ return IsSphereVisible(center, radius, &mat);
+}
+
+bool
CCamera::IsPointVisible(const CVector &center, const CMatrix *mat)
{
RwV3d c;
@@ -1290,7 +1297,7 @@ CCam::GetWeaponFirstPersonOn()
}
STARTPATCHES
- InjectHook(0x42C760, &CCamera::IsSphereVisible, PATCH_JUMP);
+ InjectHook(0x42C760, (bool (CCamera::*)(const CVector &center, float radius, const CMatrix *mat))&CCamera::IsSphereVisible, PATCH_JUMP);
InjectHook(0x46FD00, &CCamera::SetFadeColour, PATCH_JUMP);
InjectHook(0x46FD40, &CCamera::SetMotionBlur, PATCH_JUMP);