From: terencehill Date: Sat, 16 Mar 2024 01:53:46 +0000 (+0100) Subject: Explain those numbers X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=e33a694642757da94c91edcf090491bde1bcf6ae Explain those numbers --- diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index b9e951149..ca120d295 100644 --- a/qcsrc/common/util.qc +++ b/qcsrc/common/util.qc @@ -1204,17 +1204,17 @@ float compressShotOrigin(vector v) int rx = rint(fabs(v.x) * 2); int ry = rint(fabs(v.y) * 2); int rz = rint(fabs(v.z) * 2); - if(rx > 255) + if(rx > 255) // 128 * 2 - 1 { LOG_DEBUG("shot origin ", vtos(v), " x out of bounds\n"); rx = bound(0, rx, 255); } - if(ry > 63) + if(ry > 63) // 32 * 2 - 1 { LOG_DEBUG("shot origin ", vtos(v), " y out of bounds\n"); ry = bound(0, ry, 63); } - if(rz > 63) + if(rz > 63) // 32 * 2 - 1 { LOG_DEBUG("shot origin ", vtos(v), " z out of bounds\n"); rz = bound(0, rz, 63);