diff options
author | aap <aap@papnet.eu> | 2019-07-16 18:25:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-16 18:25:46 +0200 |
commit | 568b3de9cc682b4963d4fc6129692d11cfffe64a (patch) | |
tree | e119d9af8c6dc6fe93387c1cb264ea12304fbc0a /src/core/Camera.cpp | |
parent | started making frontend accurate to game (diff) | |
parent | fix (diff) | |
download | re3-568b3de9cc682b4963d4fc6129692d11cfffe64a.tar re3-568b3de9cc682b4963d4fc6129692d11cfffe64a.tar.gz re3-568b3de9cc682b4963d4fc6129692d11cfffe64a.tar.bz2 re3-568b3de9cc682b4963d4fc6129692d11cfffe64a.tar.lz re3-568b3de9cc682b4963d4fc6129692d11cfffe64a.tar.xz re3-568b3de9cc682b4963d4fc6129692d11cfffe64a.tar.zst re3-568b3de9cc682b4963d4fc6129692d11cfffe64a.zip |
Diffstat (limited to 'src/core/Camera.cpp')
-rw-r--r-- | src/core/Camera.cpp | 9 |
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 ¢er, float radius, const CMatrix *mat } bool +CCamera::IsSphereVisible(const CVector ¢er, float radius) +{ + CMatrix mat = m_cameraMatrix; + return IsSphereVisible(center, radius, &mat); +} + +bool CCamera::IsPointVisible(const CVector ¢er, const CMatrix *mat) { RwV3d c; @@ -1290,7 +1297,7 @@ CCam::GetWeaponFirstPersonOn() } STARTPATCHES - InjectHook(0x42C760, &CCamera::IsSphereVisible, PATCH_JUMP); + InjectHook(0x42C760, (bool (CCamera::*)(const CVector ¢er, float radius, const CMatrix *mat))&CCamera::IsSphereVisible, PATCH_JUMP); InjectHook(0x46FD00, &CCamera::SetFadeColour, PATCH_JUMP); InjectHook(0x46FD40, &CCamera::SetMotionBlur, PATCH_JUMP); |