mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-05 22:09:59 +03:00
misaligment fixes
This commit is contained in:
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -4099,7 +4099,9 @@ CBrushBatchRender::brushrender_t *CBrushBatchRender::FindOrCreateRenderBatch( mo
|
||||
surfaceList.Sort( SurfaceCmp );
|
||||
renderT.pPlanes = new cplane_t *[planeList.Count()];
|
||||
renderT.planeCount = planeList.Count();
|
||||
memcpy( renderT.pPlanes, planeList.Base(), sizeof(cplane_t *)*planeList.Count() );
|
||||
|
||||
if( planeList.Base() )
|
||||
memcpy( renderT.pPlanes, planeList.Base(), sizeof(cplane_t *)*planeList.Count() );
|
||||
renderT.pSurfaces = new brushrendersurface_t[surfaceList.Count()];
|
||||
renderT.surfaceCount = surfaceList.Count();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user