From: Rudolf Polzer Date: Tue, 24 Mar 2015 18:51:00 +0000 (+0100) Subject: Make the face normal calculation clearer by using less variables. X-Git-Tag: xonotic-v0.8.1~99 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=87aafe7dc86c3cd91abd813d038d2dd7964df371;p=xonotic%2Fxonotic-data.pk3dir.git Make the face normal calculation clearer by using less variables. --- diff --git a/qcsrc/warpzonelib/server.qc b/qcsrc/warpzonelib/server.qc index d5a3f4e92..c4dc7287f 100644 --- a/qcsrc/warpzonelib/server.qc +++ b/qcsrc/warpzonelib/server.qc @@ -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);