From: terencehill Date: Thu, 22 Dec 2022 23:29:52 +0000 (+0100) Subject: Small cleanup X-Git-Tag: xonotic-v0.8.6~247 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9a9c177923332a4fea8d3f5f01445d08d631f87c;p=xonotic%2Fxonotic-data.pk3dir.git Small cleanup --- diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index 3fb2d7e1a..98418767a 100644 --- a/qcsrc/common/util.qc +++ b/qcsrc/common/util.qc @@ -442,7 +442,7 @@ vector decompressShortVector(int data) float q = (data & 0x0F80) / 0x80; int len = (data & 0x007F); - //print("\ndecompress: p ", ftos(p)); print("q ", ftos(q)); print("len ", ftos(len), "\n"); + //print("\ndecompress: p:", ftos(p)); print(" q:", ftos(q)); print(" len:", ftos(len), "\n"); if(p == 0) { @@ -455,7 +455,7 @@ vector decompressShortVector(int data) } else { - q = .19634954084936207740 * q; + q = .19634954084936207740 * q; p = .19634954084936207740 * p - 1.57079632679489661922; out.x = cos(q) * cos(p); out.y = sin(q) * cos(p); @@ -491,10 +491,10 @@ float compressShortVector(vector vec) y = 30; } else - y = floor(0.5 + ang.y * 32 / 360) & 31; // 0..360 to 0..32 + y = floor(0.5 + ang.y * 32 / 360) & 31; // 0..360 to 0..32 len = invertLengthLog(vlen(vec)); - //print("compressed: p ", ftos(p)); print("y ", ftos(y)); print("len ", ftos(len), "\n"); + //print("compressed: p:", ftos(p)); print(" y:", ftos(y)); print(" len:", ftos(len), "\n"); return (p * 0x1000) + (y * 0x80) + len; }