]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/map.c
Merge commit '9c4c8b725fdca551dc9379b77ebd9c498d0c6f28' into master-merge
[xonotic/netradiant.git] / tools / quake3 / q3map2 / map.c
index 5336c9c5bc0ce96be089b78c0a25cc2a50c98b54..08d0a56899bf74c98c7319115220a353696b7c7f 100644 (file)
@@ -237,7 +237,7 @@ qboolean SnapNormal( vec3_t normal ){
    snaps a plane to normal/distance epsilons
  */
 
-void SnapPlane( vec3_t normal, vec_t *dist, vec3_t center ){
+void SnapPlane( vec3_t normal, vec_t *dist ){
 // SnapPlane disabled by LordHavoc because it often messes up collision
 // brushes made from triangles of embedded models, and it has little effect
 // on anything else (axial planes are usually derived from snapped points)
@@ -326,7 +326,12 @@ int FindFloatPlane( vec3_t innormal, vec_t dist, int numPoints, vec3_t *points )
 
        VectorCopy( innormal, normal );
 #if Q3MAP2_EXPERIMENTAL_SNAP_PLANE_FIX
-       SnapPlaneImproved( normal, &dist, numPoints, (const vec3_t *) points );
+       if ( !doingModelClip ) {
+               SnapPlaneImproved( normal, &dist, numPoints, (const vec3_t *) points );
+       }
+       if ( doingModelClip && snapModelClip ) {
+               SnapPlane( normal, &dist );
+       }
 #else
        SnapPlane( normal, &dist );
 #endif