fix floating point errors

This commit is contained in:
Garux
2024-11-16 05:52:52 +05:00
parent c488aa115b
commit 2afef413c0
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -3061,13 +3061,13 @@ void IlluminateVertexes( int num ){
{
/* clear vertex luxel */
radVertLuxel.set( -1.0f );
/* setup trace */
trace.normal = verts[ i ].normal;
/* try at initial origin */
trace.cluster = ClusterForPointExtFilter( verts[ i ].xyz, VERTEX_EPSILON, info->numSurfaceClusters, &surfaceClusters[ info->firstSurfaceCluster ] );
if ( trace.cluster >= 0 ) {
/* setup trace */
trace.origin = verts[ i ].xyz;
trace.normal = verts[ i ].normal;
/* r7 dirt */
if ( dirty && !bouncing ) {
+1 -1
View File
@@ -1444,7 +1444,7 @@ static int AddMetaTriangleToSurface( mapDrawSurface_t *ds, const metaTriangle_t&
newTexMinMax.extend( Vector3( tri.m_vertices[ 0 ]->st ) );
newTexMinMax.extend( Vector3( tri.m_vertices[ 1 ]->st ) );
newTexMinMax.extend( Vector3( tri.m_vertices[ 2 ]->st ) );
if( texMinMax.surrounds( newTexMinMax ) ){
if( numVerts_original == 0 || texMinMax.surrounds( newTexMinMax ) ){
score += 4 * ST_SCORE;
}
else{