From 14ce4c2f16825ce455d4dfef657284bf7a6c1f81 Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 17 Jun 2010 01:09:12 +0200 Subject: [PATCH] Revert "Snap panel to the central vertical/horizontal axis if enough close" This reverts commit d75681bd6b453b17da410aaeea66213af2c5ce1b. --- qcsrc/client/hud.qc | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 39fbe9750c..222823039d 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -786,7 +786,6 @@ float HUD_Panel_SetSize(float id, vector mySize) return didntresize; } -// check if the panel is enough close to central vertical/horizontal axis, and // check if move will result in panel being moved into another panel. If so, return snapped vector, otherwise return the given vector vector HUD_Panel_CheckMove(float id, vector myPos, vector mySize) { @@ -800,29 +799,6 @@ vector HUD_Panel_CheckMove(float id, vector myPos, vector mySize) vector myCenter; vector targCenter; - vector snapDistance; - snapDistance_x = vid_conwidth / 64; - snapDistance_y = vid_conheight / 64; - - myCenter = eX * (myPos_x + 0.5 * mySize_x); - targCenter = eX * (vid_conwidth * 0.5); - if (myCenter_x > targCenter_x - snapDistance_x && myCenter_x < targCenter_x + snapDistance_x) - { - // snap to central vertical axis - myTarget_x = targCenter_x - mySize_x * 0.5; - myTarget_y = myPos_y; - } - - myCenter = eY * (myPos_y + 0.5 * mySize_y); - targCenter = eY * (vid_conheight * 0.5); - if (myCenter_y > targCenter_y - snapDistance_y && myCenter_y < targCenter_y + snapDistance_y) - { - // snap to central horizontal axis - if (myTarget_x == 0) - myTarget_x = myPos_x; - myTarget_y = targCenter_y - mySize_y * 0.5; - } - for (i = 0; i < panel_cnt; ++i) { if(i == id || !HUD_Panel_CheckActive(i)) continue; -- 2.39.2