mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-26 19:14:15 +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)
|
CCamera::IsPointVisible(const CVector ¢er, const CMatrix *mat)
|
||||||
{
|
{
|
||||||
RwV3d c;
|
RwV3d c;
|
||||||
c = *(RwV3d*)¢er;
|
c = center;
|
||||||
RwV3dTransformPoints(&c, &c, 1, &mat->m_matrix);
|
RwV3dTransformPoints(&c, &c, 1, &mat->m_matrix);
|
||||||
if(c.y < CDraw::GetNearClipZ()) return false;
|
if(c.y < CDraw::GetNearClipZ()) return false;
|
||||||
if(c.y > CDraw::GetFarClipZ()) return false;
|
if(c.y > CDraw::GetFarClipZ()) return false;
|
||||||
@ -3637,7 +3637,7 @@ bool
|
|||||||
CCamera::IsSphereVisible(const CVector ¢er, float radius, const CMatrix *mat)
|
CCamera::IsSphereVisible(const CVector ¢er, float radius, const CMatrix *mat)
|
||||||
{
|
{
|
||||||
RwV3d c;
|
RwV3d c;
|
||||||
c = *(RwV3d*)¢er;
|
c = center;
|
||||||
RwV3dTransformPoints(&c, &c, 1, &mat->m_matrix);
|
RwV3dTransformPoints(&c, &c, 1, &mat->m_matrix);
|
||||||
if(c.y + radius < CDraw::GetNearClipZ()) return false;
|
if(c.y + radius < CDraw::GetNearClipZ()) return false;
|
||||||
if(c.y - radius > CDraw::GetFarClipZ()) return false;
|
if(c.y - radius > CDraw::GetFarClipZ()) return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user