From 6db5246d2c46ce22851b8e71f1288f20303c8dd7 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 21 Jan 2012 16:40:38 +0100 Subject: [PATCH] fix scroll vs drag detection in the weapons list --- qcsrc/menu/xonotic/weaponslist.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/qcsrc/menu/xonotic/weaponslist.c b/qcsrc/menu/xonotic/weaponslist.c index e64cc72d0..952c3c956 100644 --- a/qcsrc/menu/xonotic/weaponslist.c +++ b/qcsrc/menu/xonotic/weaponslist.c @@ -69,13 +69,7 @@ float XonoticWeaponsList_mouseDrag(entity me, vector pos) i = me.selectedItem; f = SUPER(XonoticWeaponsList).mouseDrag(me, pos); - scrollbar = 1; - if(pos_x < 1 - me.controlWidth - me.tolerance_y * me.controlWidth) scrollbar = 0; - if(pos_y < 0 - me.tolerance_x) scrollbar = 0; - if(pos_x >= 1 + me.tolerance_y * me.controlWidth) scrollbar = 0; - if(pos_y >= 1 + me.tolerance_x) scrollbar = 0; - - if not(scrollbar) // don't change priority if the person is just scrolling + if(me.pressed != 1) // don't change priority if the person is just scrolling { if(me.selectedItem != i) cvar_set("cl_weaponpriority", swapInPriorityList(cvar_string("cl_weaponpriority"), me.selectedItem, i)); -- 2.39.2