Fix IsSphereVisible calls

This commit is contained in:
Sergeanur
2021-05-27 16:50:15 +03:00
parent 50058371ef
commit 2ad3a75be5
5 changed files with 11 additions and 17 deletions

View File

@ -3650,7 +3650,7 @@ CCamera::IsPointVisible(const CVector &center, const CMatrix *mat)
}
bool
CCamera::IsSphereVisible(const CVector &center, float radius, const CMatrix *mat)
CCamera::IsSphereVisible(const CVector &center, float radius, Const CMatrix *mat)
{
#ifdef GTA_PS2
CVuVector c;
@ -3680,7 +3680,7 @@ CCamera::IsSphereVisible(const CVector &center, float radius)
return IsSphereVisible(center, radius, &m_cameraMatrix);
#else
// ...and on PC they decided to call the other one with a default matrix.
CMatrix mat(m_cameraMatrix); // this matrix construction is stupid and gone in VC
CMatrix mat(GetCameraMatrix()); // this matrix construction is stupid and gone in VC
return IsSphereVisible(center, radius, &mat);
#endif
}

View File

@ -639,7 +639,7 @@ public:
CVector &GetGameCamPosition(void) { return m_vecGameCamPos; }
void CalculateDerivedValues(void);
bool IsPointVisible(const CVector &center, const CMatrix *mat);
bool IsSphereVisible(const CVector &center, float radius, const CMatrix *mat);
bool IsSphereVisible(const CVector &center, float radius, Const CMatrix *mat);
bool IsSphereVisible(const CVector &center, float radius);
bool IsBoxVisible(CVUVECTOR *box, const CMatrix *mat);
};