]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make the face normal calculation clearer by using less variables.
authorRudolf Polzer <divVerent@xonotic.org>
Tue, 24 Mar 2015 18:51:00 +0000 (19:51 +0100)
committerRudolf Polzer <divVerent@xonotic.org>
Tue, 24 Mar 2015 18:51:00 +0000 (19:51 +0100)
qcsrc/warpzonelib/server.qc

index d5a3f4e9271eae56cc4ba79dcb25c2788a705d91..c4dc7287f1c182e79ac96e009a8000902678043c 100644 (file)
@@ -537,7 +537,7 @@ void WarpZone_InitStep_UpdateTransform()
 {
        vector org, ang, norm, point;
        float area;
-       vector tri, a, b, c, p, q, n;
+       vector tri, a, b, c, n;
        float i_s, i_t, n_t;
        string tex;
 
@@ -561,9 +561,7 @@ void WarpZone_InitStep_UpdateTransform()
                        a = getsurfacepoint(self, i_s, tri.x);
                        b = getsurfacepoint(self, i_s, tri.y);
                        c = getsurfacepoint(self, i_s, tri.z);
-                       p = b - a;
-                       q = c - a;
-                       n = cross(q, p);
+                       n = cross(c - a, b - a);
                        area = area + vlen(n);
                        norm = norm + n;
                        point = point + vlen(n) * (a + b + c);