]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use a different crosshair setting in side-scrolling mode
authorMario <mario@smbclan.net>
Sat, 10 Feb 2018 14:56:14 +0000 (00:56 +1000)
committerMario <mario@smbclan.net>
Sat, 10 Feb 2018 14:56:14 +0000 (00:56 +1000)
crosshairs.cfg
qcsrc/client/autocvars.qh
qcsrc/client/view.qc

index fb341c5b8537f37c492a2de2c7148ebd39b9b579..8e7bc9b4f74f414ac766859647221abbdf4ddd5b 100644 (file)
@@ -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
index 6d3fb626771723a0d86af77ab2e775f7a24364f7..b6b33c3b1766670b0f8350b37236fa37bbb23da1 100644 (file)
@@ -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;
index 6a294d5ad5d35322c4576e063a844bcc0da16a15..28b10da9ed4b5a9e4a0fe39f6fb7da941303fcff 100644 (file)
@@ -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;