X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fcrosshairbutton.c;h=7fe3a600f2e57d49338a1f7b3ac358fa9f09590e;hb=387861a0bee1121b0869bfaf8cff5b703ffc1ad2;hp=9456cd66da2d2f22fdb48dd0db6d9560e1ccc086;hpb=2d2a167c9d4f4ffd8f4234309c936d99e842869b;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/crosshairbutton.c b/qcsrc/menu/xonotic/crosshairbutton.c index 9456cd66d..7fe3a600f 100644 --- a/qcsrc/menu/xonotic/crosshairbutton.c +++ b/qcsrc/menu/xonotic/crosshairbutton.c @@ -50,14 +50,14 @@ void XonoticCrosshairButton_setChecked(entity me, float val) } void XonoticCrosshairButton_loadCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; me.checked = (cvar(me.cvarName) == me.cvarValueFloat); } void XonoticCrosshairButton_saveCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; if(me.checked) @@ -118,10 +118,11 @@ void XonoticCrosshairButton_draw(entity me) draw_Picture('0.5 0.5 0' - 0.5 * sz, me.src3, sz, rgb, a); if(cvar("crosshair_dot")) - { - if(cvar_string("crosshair_dot_color") != "0") - rgb = stov(cvar_string("crosshair_dot_color")); + { + if(cvar("crosshair_dot_color_custom") && (cvar_string("crosshair_dot_color") != "0")) + rgb = stov(cvar_string("crosshair_dot_color")); + draw_Picture('0.5 0.5 0' - 0.5 * sz * cvar("crosshair_dot_size"), me.src4, sz * cvar("crosshair_dot_size"), rgb, a * cvar("crosshair_dot_alpha")); - } + } } #endif