_cl_playermodel models/player/umbra.iqm
_cl_playerskin 0
seta crosshair 3
-seta crosshair_color_red 0.6
-seta crosshair_color_green 0.8
-seta crosshair_color_blue 1
+seta crosshair_color "0.6 0.8 1"
seta crosshair_alpha 1
seta crosshair_size 0.35
seta crosshair_dot 1
seta crosshair_hittest_blur 1 "blur the crosshair if the shot is obstructed"
seta crosshair_hittest_showimpact 0 "move the crosshair to the actual impact location if obstructed"
seta crosshair_laser "" "crosshair to display when wielding the laser"
-seta crosshair_laser_color_red 1 "crosshair color red component to display when wielding the laser"
-seta crosshair_laser_color_green 0.35 "crosshair color green component to display when wielding the laser"
-seta crosshair_laser_color_blue 0.2 "crosshair color blue component to display when wielding the laser"
+seta crosshair_laser_color "1 0.35 0.2" "crosshair color to display when wielding the laser"
seta crosshair_laser_alpha 0.75 "crosshair alpha value to display when wielding the laser"
seta crosshair_laser_size 0.4 "crosshair size when wielding the laser"
seta crosshair_shotgun "" "crosshair to display when wielding the shotgun"
-seta crosshair_shotgun_color_red 0.7 "crosshair color red component to display when wielding the shotgun"
-seta crosshair_shotgun_color_green 0.7 "crosshair color green component to display when wielding the shotgun"
-seta crosshair_shotgun_color_blue 0.7 "crosshair color blue component to display when wielding the shotgun"
+seta crosshair_shotgun_color "0.7 0.7 0.7" "crosshair color to display when wielding the shotgun"
seta crosshair_shotgun_alpha 1.1 "crosshair alpha value to display when wielding the shotgun"
seta crosshair_shotgun_size 0.65 "crosshair size when wielding the shotgun"
seta crosshair_uzi "" "crosshair to display when wielding the machinegun"
-seta crosshair_uzi_color_red 0.4 "crosshair color red component to display when wielding the machinegun"
-seta crosshair_uzi_color_green 0.9 "crosshair color green component to display when wielding the machinegun"
-seta crosshair_uzi_color_blue 0.35 "crosshair color blue component to display when wielding the machinegun"
+seta crosshair_uzi_color "0.4 0.9 0.35" "crosshair color to display when wielding the machinegun"
seta crosshair_uzi_alpha 0.9 "crosshair alpha value to display when wielding the machinegun"
seta crosshair_uzi_size 0.6 "crosshair size when wielding the machinegun"
seta crosshair_grenadelauncher "" "crosshair to display when wielding the mortar"
-seta crosshair_grenadelauncher_color_red 1 "crosshair color red component to display when wielding the mortar"
-seta crosshair_grenadelauncher_color_green 0.15 "crosshair color green component to display when wielding the mortar"
-seta crosshair_grenadelauncher_color_blue 0 "crosshair color blue component to display when wielding the mortar"
+seta crosshair_grenadelauncher_color "1 0.15 0" "crosshair color to display when wielding the mortar"
seta crosshair_grenadelauncher_alpha 1.15 "crosshair alpha value to display when wielding the mortar"
seta crosshair_grenadelauncher_size 0.7 "crosshair size when wielding the mortar"
seta crosshair_minelayer "" "crosshair to display when wielding the mortar"
-seta crosshair_minelayer_color_red 0.75 "crosshair color red component to display when wielding the mortar"
-seta crosshair_minelayer_color_green 0.75 "crosshair color green component to display when wielding the mortar"
-seta crosshair_minelayer_color_blue 0 "crosshair color blue component to display when wielding the mortar"
+seta crosshair_minelayer_color "0.75 0.75 0" "crosshair color to display when wielding the mortar"
seta crosshair_minelayer_alpha 1.15 "crosshair alpha value to display when wielding the mortar"
seta crosshair_minelayer_size 0.9 "crosshair size when wielding the mortar"
seta crosshair_electro "" "crosshair to display when wielding the electro"
-seta crosshair_electro_color_red 0.35 "crosshair color red component to display when wielding the electro"
-seta crosshair_electro_color_green 0.5 "crosshair color green component to display when wielding the electro"
-seta crosshair_electro_color_blue 1 "crosshair color blue component to display when wielding the electro"
+seta crosshair_electro_color "0.35 0.5 1" "crosshair color to display when wielding the electro"
seta crosshair_electro_alpha 1 "crosshair alpha value to display when wielding the electro"
seta crosshair_electro_size 0.5 "crosshair size when wielding the electro"
seta crosshair_crylink "" "crosshair to display when wielding the crylink"
-seta crosshair_crylink_color_red 0.85 "crosshair color red component to display when wielding the crylink"
-seta crosshair_crylink_color_green 0.25 "crosshair color green component to display when wielding the crylink"
-seta crosshair_crylink_color_blue 1 "crosshair color blue component to display when wielding the crylink"
+seta crosshair_crylink_color "0.85 0.25 1" "crosshair color to display when wielding the crylink"
seta crosshair_crylink_alpha 0.85 "crosshair alpha value to display when wielding the crylink"
seta crosshair_crylink_size 0.4 "crosshair size when wielding the crylink"
seta crosshair_nex "" "crosshair to display when wielding the nex gun"
-seta crosshair_nex_color_red 0 "crosshair color red component to display when wielding the nex gun"
-seta crosshair_nex_color_green 0.9 "crosshair color green component to display when wielding the nex gun"
-seta crosshair_nex_color_blue 1 "crosshair color blue component to display when wielding the nex gun"
+seta crosshair_nex_color "0 0.9 1" "crosshair color to display when wielding the nex gun"
seta crosshair_nex_alpha 0.85 "crosshair alpha value to display when wielding the nex gun"
seta crosshair_nex_size 0.65 "crosshair size when wielding the nex gun"
seta crosshair_hagar "" "crosshair to display when wielding the hagar"
-seta crosshair_hagar_color_red 0.85 "crosshair color red component to display when wielding the hagar"
-seta crosshair_hagar_color_green 0.5 "crosshair color green component to display when wielding the hagar"
-seta crosshair_hagar_color_blue 0.35 "crosshair color blue component to display when wielding the hagar"
+seta crosshair_hagar_color "0.85 0.5 0.35" "crosshair color to display when wielding the hagar"
seta crosshair_hagar_alpha 1 "crosshair alpha value to display when wielding the hagar"
seta crosshair_hagar_size 0.8 "crosshair size when wielding the hagar"
seta crosshair_rocketlauncher "" "crosshair to display when wielding the rocketlauncher"
-seta crosshair_rocketlauncher_color_red 1 "crosshair color red component to display when wielding the rocketlauncher"
-seta crosshair_rocketlauncher_color_green 0.75 "crosshair color green component to display when wielding the rocketlauncher"
-seta crosshair_rocketlauncher_color_blue 0.2 "crosshair color blue component to display when wielding the rocketlauncher"
+seta crosshair_rocketlauncher_color "1 0.75 0.2" "crosshair color to display when wielding the rocketlauncher"
seta crosshair_rocketlauncher_alpha 1 "crosshair alpha value to display when wielding the rocketlauncher"
seta crosshair_rocketlauncher_size 0.5875 "crosshair size when wielding the rocketlauncher"
seta crosshair_porto "" "crosshair to display when wielding the porto"
-seta crosshair_porto_color_red 0.5 "crosshair color red component to display when wielding the porto"
-seta crosshair_porto_color_green 1 "crosshair color green component to display when wielding the porto"
-seta crosshair_porto_color_blue 0.5 "crosshair color blue component to display when wielding the porto"
+seta crosshair_porto_color "0.5 1 0.5" "crosshair color to display when wielding the porto"
seta crosshair_porto_alpha 0.85 "crosshair alpha value to display when wielding the porto"
seta crosshair_porto_size 0.6 "crosshair size when wielding the porto"
seta crosshair_minstanex "" "crosshair to display when wielding the minstanex gun"
-seta crosshair_minstanex_color_red 0.65 "crosshair color red component to display when wielding the minstanex gun"
-seta crosshair_minstanex_color_green 0.65 "crosshair color green component to display when wielding the minstanex gun"
-seta crosshair_minstanex_color_blue 1 "crosshair color blue component to display when wielding the minstanex gun"
+seta crosshair_minstanex_color "0.65 0.65 1" "crosshair color to display when wielding the minstanex gun"
seta crosshair_minstanex_alpha 1 "crosshair alpha value to display when wielding the minstanex gun"
seta crosshair_minstanex_size 0.4 "crosshair size when wielding the minstanex gun"
seta crosshair_hook "" "crosshair to display when wielding the hook"
-seta crosshair_hook_color_red 0.65 "crosshair color red component to display when wielding the hook"
-seta crosshair_hook_color_green 1 "crosshair color green component to display when wielding the hook"
-seta crosshair_hook_color_blue 0.85 "crosshair color blue component to display when wielding the hook"
+seta crosshair_hook_color "0.65 1 0.85" "crosshair color to display when wielding the hook"
seta crosshair_hook_alpha 0.85 "crosshair alpha value to display when wielding the hook"
seta crosshair_hook_size 0.5 "crosshair size when wielding the hook"
seta crosshair_hlac "" "crosshair to display when wielding the H.L.A.C"
-seta crosshair_hlac_color_red 1 "crosshair color red component to display when wielding the H.L.A.C."
-seta crosshair_hlac_color_green 0.65 "crosshair color green component to display when wielding the H.L.A.C."
-seta crosshair_hlac_color_blue 0.2 "crosshair color blue component to display when wielding the H.L.A.C."
+seta crosshair_hlac_color "1 0.65 0.2" "crosshair color to display when wielding the H.L.A.C."
seta crosshair_hlac_alpha 1 "crosshair alpha value to display when wielding the H.L.A.C."
seta crosshair_hlac_size 0.6 "crosshair size when wielding the H.L.A.C."
seta crosshair_seeker "" "crosshair to display when wielding the TAG Seeker"
-seta crosshair_seeker_color_red 1 "crosshair color red component to display when wielding the TAG seeker"
-seta crosshair_seeker_color_green 0.35 "crosshair color green component to display when wielding the TAG seeker"
-seta crosshair_seeker_color_blue 0.35 "crosshair color blue component to display when wielding the TAG seeker"
+seta crosshair_seeker_color "1 0.35 0.35" "crosshair color to display when wielding the TAG seeker"
seta crosshair_seeker_alpha 0.9 "crosshair alpha value to display when wielding the TAG seeker"
seta crosshair_seeker_size 0.8 "crosshair size when wielding the TAG seeker"
seta crosshair_campingrifle "" "crosshair to display when wielding the campingrifle"
-seta crosshair_campingrifle_color_red 0.85 "crosshair color red component to display when wielding the campingrifle"
-seta crosshair_campingrifle_color_green 0.5 "crosshair color green component to display when wielding the campingrifle"
-seta crosshair_campingrifle_color_blue 0.25 "crosshair color blue component to display when wielding the campingrifle"
+seta crosshair_campingrifle_color "0.85 0.5 0.25" "crosshair color to display when wielding the campingrifle"
seta crosshair_campingrifle_alpha 1 "crosshair alpha value to display when wielding the campingrifle"
seta crosshair_campingrifle_size 0.65 "crosshair size when wielding the campingrifle"
seta crosshair_tuba "" "crosshair to display when wielding the tuba"
-seta crosshair_tuba_color_red 0.85 "crosshair color red component to display when wielding the tuba"
-seta crosshair_tuba_color_green 0.5 "crosshair color green component to display when wielding the tuba"
-seta crosshair_tuba_color_blue 0.25 "crosshair color blue component to display when wielding the tuba"
+seta crosshair_tuba_color "0.85 0.5 0.25" "crosshair color to display when wielding the tuba"
seta crosshair_tuba_alpha 1 "crosshair alpha value to display when wielding the tuba"
seta crosshair_tuba_size 1 "crosshair size when wielding the tuba"
seta crosshair_fireball "" "crosshair to display when wielding the fireball"
-seta crosshair_fireball_color_red 0.2 "crosshair color red component to display when wielding the fireball"
-seta crosshair_fireball_color_green 1.0 "crosshair color green component to display when wielding the fireball"
-seta crosshair_fireball_color_blue 0.2 "crosshair color blue component to display when wielding the fireball"
+seta crosshair_fireball_color "0.2 1.0 0.2" "crosshair color to display when wielding the fireball"
seta crosshair_fireball_alpha 1 "crosshair alpha value to display when wielding the fireball"
seta crosshair_fireball_size 1 "crosshair size when wielding the fireball"
seta crosshair_ring_size 2 "bullet counter ring size for Rifle, velocity ring for Nex"
string wcross_wep, wcross_name;
float wcross_scale, wcross_blur;
- wcross_color_x = cvar("crosshair_color_red");
- wcross_color_y = cvar("crosshair_color_green");
- wcross_color_z = cvar("crosshair_color_blue");
- if (cvar("crosshair_per_weapon")) {
+ if (cvar("crosshair_per_weapon") || cvar("crosshair_color_per_weapon")) {
e = get_weaponinfo(activeweapon);
if (e && e.netname != "")
{
wcross_wep = e.netname;
- wcross_resolution *= cvar(strcat("crosshair_", wcross_wep, "_size"));
- if (wcross_resolution == 0)
- return;
- wcross_alpha *= cvar(strcat("crosshair_", wcross_wep, "_alpha"));
- if (wcross_alpha == 0)
- return;
-
- wcross_style = cvar_string(strcat("crosshair_", wcross_wep));
- if(wcross_style == "")
- wcross_style = e.netname;
-
- if(!cvar("crosshair_color_override"))
+ if(cvar("crosshair_per_weapon"))
{
- wcross_color_x = cvar(strcat("crosshair_", wcross_wep, "_color_red"));
- wcross_color_y = cvar(strcat("crosshair_", wcross_wep, "_color_green"));
- wcross_color_z = cvar(strcat("crosshair_", wcross_wep, "_color_blue"));
+ wcross_resolution *= cvar(strcat("crosshair_", wcross_wep, "_size"));
+ if (wcross_resolution == 0)
+ return;
+ wcross_alpha *= cvar(strcat("crosshair_", wcross_wep, "_alpha"));
+ if (wcross_alpha == 0)
+ return;
+
+ wcross_style = cvar_string(strcat("crosshair_", wcross_wep));
+ if(wcross_style == "" || wcross_style == "0")
+ wcross_style = wcross_wep;
}
}
}
+ if(wcross_wep != "" && cvar("crosshair_color_per_weapon"))
+ wcross_color = stov(cvar_string(strcat("crosshair_", wcross_wep, "_color")));
+ else
+ wcross_color = stov(cvar_string("crosshair_color"));
wcross_name = strcat("gfx/crosshair", wcross_style);
e0.textEntity = main.weaponsDialog;
e0.allowCut = 1;
me.TR(me);
- me.TD(me, 1, 0.75, e = makeXonoticTextLabel(0, "Crosshair:"));
- me.TD(me, 1, 1.00, e = makeXonoticCheckBox(0, "crosshair_per_weapon", "Per weapon"));
- me.TD(me, 1, 1.25, e = makeXonoticCheckBox(1, "crosshair_color_override", "& Per weapon colors"));
- setDependent(e, "crosshair_per_weapon", 1, 1);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair:"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "crosshair_per_weapon", "Per weapon"));
me.TR(me);
me.TDempty(me, 0.5);
for(i = 1; i <= 10; ++i) {
me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.1, "crosshair_alpha"));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair red:"));
- me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_red"));
- setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair color:"));
+ me.TD(me, 2, 1.8, e = makeXonoticColorpickerString("crosshair_color"));
+ setDependent(e, "crosshair_color_per_weapon", 1, 1);
me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair green:"));
- me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_green"));
- setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair blue:"));
- me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_blue"));
- setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
+ me.TDempty(me, 0.3);
+ me.TD(me, 1, 0.7, e = makeXonoticCheckBox(0, "crosshair_color_per_weapon", "Per weapon"));
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_dot", "Enable centered dot"));
me.TR(me);
me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "0", "None"));
me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "1", "TrueAim"));
me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "1.25", "Enemies"));
+ me.TR(me);
me.TR(me);
me.TDempty(me, 0.4);
me.TD(me, 1, 2.2, e = makeXonoticButton("Waypoints setup...", '0 0 0'));