From 0d7a2b01b03855b09e3363e347d520c9fdf82dcd Mon Sep 17 00:00:00 2001 From: div0 Date: Sat, 14 Nov 2009 09:03:49 +0000 Subject: [PATCH] change a shot origin error to warning git-svn-id: svn://svn.icculus.org/nexuiz/trunk@8276 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/common/util.qc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/data/qcsrc/common/util.qc b/data/qcsrc/common/util.qc index b2ad966ee..8eb1ddb5f 100644 --- a/data/qcsrc/common/util.qc +++ b/data/qcsrc/common/util.qc @@ -1531,11 +1531,20 @@ float compressShotOrigin(vector v) y = rint(v_y * 4) + 128; z = rint(v_z * 4) + 128; if(x > 255 || x < 0) - error("shot origin x out of bounds"); + { + print("shot origin ", vtos(v), " x out of bounds\n"); + x = bound(0, x, 255); + } if(y > 255 || y < 0) - error("shot origin y out of bounds"); + { + print("shot origin ", vtos(v), " y out of bounds\n"); + y = bound(0, y, 255); + } if(z > 255 || z < 0) - error("shot origin z out of bounds"); + { + print("shot origin ", vtos(v), " z out of bounds\n"); + z = bound(0, z, 255); + } return x * 0x10000 + y * 0x100 + z; } vector decompressShotOrigin(float f) -- 2.39.2