int init_reverse = 0;
int unique_edge_count = 0;
- int discard_splits = 1;
/* Try remove splitting faces first */
{
+ int split_total = 0;
for( int j=0; j<solid->count; j++ )
{
cxr_polygon *poly = &mesh->polys[ solid_buffer[solid->start+j] ];
}
if( interior_count < poly->loop_total-1 )
+ {
+ split_total ++;
continue;
+ }
temp_solid[ temp_solid_len ++ ] = solid_buffer[solid->start+j];
}
- if( temp_solid_len < 3 )
+ if( temp_solid_len < 3 || (split_total & 0x2) /* unkown reasons */ )
{
- /* Revert back to normal */
- free( temp_solid );
-
- temp_solid = &solid_buffer[ solid->start ];
- temp_solid_len = solid->count;
- discard_splits = 0;
}
else
{
solid->count = temp_solid_len;
}
- if( discard_splits )
- free( temp_solid );
+ free( temp_solid );
}
for( int j=0; j<solid->count; j++ )