X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fcolorpicker_string.qc;fp=qcsrc%2Fmenu%2Fxonotic%2Fcolorpicker_string.qc;h=f0e3e6da09e234c962b0d14f8520a2327f4ae32c;hb=6c4f62990980e74d4a0963b7179c7c964f535398;hp=5d53135e9cca1967c7e3f0d68b8a4b631b7e1ef3;hpb=9cb8f5c0cdd70570f3694d8f0ccb079753c78e7c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/colorpicker_string.qc b/qcsrc/menu/xonotic/colorpicker_string.qc index 5d53135e9..f0e3e6da0 100644 --- a/qcsrc/menu/xonotic/colorpicker_string.qc +++ b/qcsrc/menu/xonotic/colorpicker_string.qc @@ -63,9 +63,9 @@ void XonoticColorPickerString_saveCvars(entity me) if(substring(me.cvarName, -1, 1) == "_") { vector v = hslimage_color(me.prevcoords, me.imagemargin); - cvar_set(strcat(me.cvarName, "red"), ftos(v_x)); - cvar_set(strcat(me.cvarName, "green"), ftos(v_y)); - cvar_set(strcat(me.cvarName, "blue"), ftos(v_z)); + cvar_set(strcat(me.cvarName, "red"), ftos(v.x)); + cvar_set(strcat(me.cvarName, "green"), ftos(v.y)); + cvar_set(strcat(me.cvarName, "blue"), ftos(v.z)); } else cvar_set(me.cvarName, sprintf("%v", hslimage_color(me.prevcoords, me.imagemargin))); @@ -83,10 +83,10 @@ float XonoticColorpickerString_mouseDrag(entity me, vector coords) return 0; vector margin; margin = me.imagemargin; - if(coords_x >= margin_x) - if(coords_y >= margin_y) - if(coords_x <= 1 - margin_x) - if(coords_y <= 1 - margin_y) + if(coords.x >= margin.x) + if(coords.y >= margin.y) + if(coords.x <= 1 - margin.x) + if(coords.y <= 1 - margin.y) { me.prevcoords = coords; me.saveCvars(me);