]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
don't even check for collisions against target panel if our resizerorigin is within it
authorFruitieX <rasse@rasse-lappy.localdomain>
Thu, 17 Jun 2010 10:16:12 +0000 (13:16 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Thu, 17 Jun 2010 10:16:12 +0000 (13:16 +0300)
qcsrc/client/hud.qc

index 658af451ce6ffd318e1576709b124f1b8003d577..59ac44f85d75b057776d495309e8c60f47ca911b 100644 (file)
@@ -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