]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Explain those numbers
authorterencehill <piuntn@gmail.com>
Sat, 16 Mar 2024 01:53:46 +0000 (02:53 +0100)
committerterencehill <piuntn@gmail.com>
Sat, 16 Mar 2024 01:53:46 +0000 (02:53 +0100)
qcsrc/common/util.qc

index b9e951149a59ed2ea38aa71691eba615f50b71e3..ca120d29535b154ecaeb4e9855cd8a5fc297183e 100644 (file)
@@ -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);