Skip to content

Commit

Permalink
fix floating point errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Garux committed Nov 16, 2024
1 parent c488aa1 commit 2afef41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tools/quake3/q3map2/light_ydnar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down
2 changes: 1 addition & 1 deletion tools/quake3/q3map2/surface_meta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 2afef41

Please sign in to comment.