misaligment fixes

This commit is contained in:
nillerusr
2022-05-15 21:09:59 +03:00
parent 1218fa659c
commit 3a73624b7e
39 changed files with 7592 additions and 6056 deletions
+4 -2
View File
@@ -1268,7 +1268,9 @@ void CEdgeList::CullSmallOccluders()
// Sort the surfaces by screen area, in descending order
int nSurfCount = m_Surfaces.Count();
s_pSortSurfaces = m_Surfaces.Base();
qsort( m_SurfaceSort.Base(), nSurfCount, sizeof(int), SurfCompare );
if( m_SurfaceSort.Base() )
qsort( m_SurfaceSort.Base(), nSurfCount, sizeof(int), SurfCompare );
// We're going to keep the greater of r_occludermin + All surfaces with a screen area >= r_occluderarea
int nMinSurfaces = r_occludermincount.GetInt();
@@ -1282,7 +1284,7 @@ void CEdgeList::CullSmallOccluders()
bool *bUseSurface = (bool*)stackalloc( nSurfCount * sizeof(bool) );
memset( bUseSurface, 0, nSurfCount * sizeof(bool) );
int i;
for ( i = 0; i < nSurfCount; ++i )
{