]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/minigames/minigame/pong.qc
Simplify maths for most vlen cases
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / minigames / minigame / pong.qc
index 359003fffc8e676a051d972ead0bc304e3cad08f..87c75f48c59ab05ac3b9ce01d4c628ccb66a3580 100644 (file)
@@ -124,7 +124,7 @@ bool pong_paddle_hit(entity ball, int pteam)
                return false;
        vector near_point = box_nearest(paddle.mins+paddle.origin,
                                                                        paddle.maxs+paddle.origin, ball.origin);
-       return vlen(near_point-ball.origin) <= ball.pong_length ;
+       return vdist(near_point - ball.origin, <=, ball.pong_length);
 }
 
 // Checks for a goal, when that happes adds scores and resets the ball