From 0d453fe2fdb4b18f16a8498a3953c2f97edf0473 Mon Sep 17 00:00:00 2001 From: FruitieX Date: Thu, 17 Jun 2010 13:16:12 +0300 Subject: [PATCH] don't even check for collisions against target panel if our resizerorigin is within it --- qcsrc/client/hud.qc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 658af451c..59ac44f85 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -1055,6 +1055,10 @@ vector HUD_Panel_CheckResize(float id, vector mySize, vector resizeorigin, float targSize = HUD_Panel_GetSize(i) + '2 2 0' * targBorder; targEndPos = targPos + targSize; + // resizeorigin is WITHIN target panel, just abort any collision testing against that particular panel to produce expected behaviour! + if(resizeorigin_x > targPos_x && resizeorigin_x < targPos_x + targSize_x && resizeorigin_y > targPos_y && resizeorigin_y < targPos_y + targSize_y) + continue; + if (resizeCorner == 1) { // check if this panel is on our way -- 2.39.2