Skip to content

Commit

Permalink
spearmint: Move if statements to separate lines in cm_load.c
Browse files Browse the repository at this point in the history
  • Loading branch information
zturtleman committed Aug 10, 2017
1 parent aae9ee7 commit 86ccd40
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions code/qcommon/cm_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,13 +460,16 @@ static int CMod_GetBestSurfaceNumForBrushSide( const cbrushside_t *buildSide ) {
vert[1] = &bspDrawVerts[s->firstVert + bspDrawIndexes[s->firstIndex + t + 1]];
vert[2] = &bspDrawVerts[s->firstVert + bspDrawIndexes[s->firstIndex + t + 2]];
if ( s->surfaceType == MST_PLANAR && VectorCompare( vert[0]->normal, vert[1]->normal ) && VectorCompare( vert[1]->normal, vert[2]->normal ) ) {
VectorSubtract( vert[0]->normal, buildPlane->normal, normdiff ); if ( VectorLength( normdiff ) >= normalEpsilon ) {
VectorSubtract( vert[0]->normal, buildPlane->normal, normdiff );
if ( VectorLength( normdiff ) >= normalEpsilon ) {
continue;
}
VectorSubtract( vert[1]->normal, buildPlane->normal, normdiff ); if ( VectorLength( normdiff ) >= normalEpsilon ) {
VectorSubtract( vert[1]->normal, buildPlane->normal, normdiff );
if ( VectorLength( normdiff ) >= normalEpsilon ) {
continue;
}
VectorSubtract( vert[2]->normal, buildPlane->normal, normdiff ); if ( VectorLength( normdiff ) >= normalEpsilon ) {
VectorSubtract( vert[2]->normal, buildPlane->normal, normdiff );
if ( VectorLength( normdiff ) >= normalEpsilon ) {
continue;
}
}
Expand All @@ -478,7 +481,8 @@ static int CMod_GetBestSurfaceNumForBrushSide( const cbrushside_t *buildSide ) {
VectorSubtract( vert[2]->xyz, vert[0]->xyz, v2v0 );
CrossProduct( v2v0, v1v0, norm );
VectorNormalize( norm );
VectorSubtract( norm, buildPlane->normal, normdiff ); if ( VectorLength( normdiff ) >= normalEpsilon ) {
VectorSubtract( norm, buildPlane->normal, normdiff );
if ( VectorLength( normdiff ) >= normalEpsilon ) {
continue;
}
}
Expand Down

0 comments on commit 86ccd40

Please sign in to comment.