mirror of
https://github.com/GTAmodding/re3.git
synced 2021-02-19 17:49:54 +01:00
avoid UB
This commit is contained in:
parent
b8c2cf597d
commit
efd49962d2
@ -3622,7 +3622,7 @@ bool
|
||||
CCamera::IsPointVisible(const CVector ¢er, const CMatrix *mat)
|
||||
{
|
||||
RwV3d c;
|
||||
c = *(RwV3d*)¢er;
|
||||
c = center;
|
||||
RwV3dTransformPoints(&c, &c, 1, &mat->m_matrix);
|
||||
if(c.y < CDraw::GetNearClipZ()) return false;
|
||||
if(c.y > CDraw::GetFarClipZ()) return false;
|
||||
@ -3637,7 +3637,7 @@ bool
|
||||
CCamera::IsSphereVisible(const CVector ¢er, float radius, const CMatrix *mat)
|
||||
{
|
||||
RwV3d c;
|
||||
c = *(RwV3d*)¢er;
|
||||
c = center;
|
||||
RwV3dTransformPoints(&c, &c, 1, &mat->m_matrix);
|
||||
if(c.y + radius < CDraw::GetNearClipZ()) return false;
|
||||
if(c.y - radius > CDraw::GetFarClipZ()) return false;
|
||||
|
Loading…
Reference in New Issue
Block a user