From: Mario Date: Sat, 10 Feb 2018 14:56:14 +0000 (+1000) Subject: Use a different crosshair setting in side-scrolling mode X-Git-Tag: xonotic-v0.8.5~2330 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dc883f73996838c82ad7c2cf043e37cfaf2e81d7;p=xonotic%2Fxonotic-data.pk3dir.git Use a different crosshair setting in side-scrolling mode --- diff --git a/crosshairs.cfg b/crosshairs.cfg index fb341c5b8..8e7bc9b4f 100644 --- a/crosshairs.cfg +++ b/crosshairs.cfg @@ -45,6 +45,9 @@ seta crosshair_color_special_rainbow_brightness 20 "color brightness of the rand // per-weapon crosshairs seta crosshair_per_weapon 1 "when 1, each gun will display a different crosshair" +// side-scrolling crosshair +seta crosshair_2d 54 "selects crosshair to use in side-scrolling mode (\"\" uses regular crosshair and 0 is none)" + // ========================= // Crosshair ring settings diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index 6d3fb6267..b6b33c3b1 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -103,6 +103,7 @@ float autocvar_con_chatsize; float autocvar_con_notify; float autocvar_con_notifysize; string autocvar_crosshair; +string autocvar_crosshair_2d = "54"; float autocvar_crosshair_alpha; string autocvar_crosshair_color; int autocvar_crosshair_color_special; diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 6a294d5ad..28b10da9e 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -997,6 +997,8 @@ void HUD_Crosshair(entity this) string wcross_style; float wcross_alpha, wcross_resolution; wcross_style = autocvar_crosshair; + if (csqcplayer.viewloc && (csqcplayer.viewloc.spawnflags & VIEWLOC_FREEAIM) && autocvar_crosshair_2d != "") + wcross_style = autocvar_crosshair_2d; if (wcross_style == "0") return; wcross_resolution = autocvar_crosshair_size;