mirror of
https://github.com/halpz/re3.git
synced 2024-12-22 17:35:29 +00: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 a new issue