]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/common/polylib.c
Undoing revision 377 (reverting just those files modified by that
[xonotic/netradiant.git] / tools / quake3 / common / polylib.c
index 83cc9ed9c334f6902a5226b1b2102a4a2281367a..839f7ea5d1ee3071fa7aa26539cb601ceadce9f7 100644 (file)
@@ -253,9 +253,13 @@ winding_t *BaseWindingForPlane (vec3_t normal, vec_t dist)
                        vright[2] = normal[1];
                        break;
        }
-       // NOTE: vright is NOT a unit vector at this point.
-       VectorSetLength(vright, MAX_WORLD_COORD * 2, vright);
        CrossProduct(normal, vright, vup);
+
+       // IMPORTANT NOTE: vright and vup are NOT unit vectors at this point.
+       // However, normal, vup, and vright are pairwise perpendicular.
+
+       VectorSetLength(vup, MAX_WORLD_COORD * 2, vup);
+       VectorSetLength(vright, MAX_WORLD_COORD * 2, vright);
        VectorScale(normal, dist, org);
 
        w = AllocWinding(4);