]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into terencehill/crosshair_fix
authorterencehill <piuntn@gmail.com>
Mon, 1 Nov 2010 13:35:46 +0000 (14:35 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 1 Nov 2010 13:35:46 +0000 (14:35 +0100)
Conflicts:
qcsrc/client/View.qc

1  2 
defaultXonotic.cfg
qcsrc/client/View.qc
qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c

diff --combined defaultXonotic.cfg
index 9b073652d48e6e4b998e6022b755525a27649598,af27e5d9c746eaafa411df1c1ae242477ba55d57..5d16591000a0b0f7e40a0b87080d4b17571a6a35
@@@ -96,6 -96,8 +96,8 @@@ seta crosshair_size 0.3
  seta crosshair_dot 1
  seta crosshair_dot_alpha 1
  seta crosshair_dot_size 1
+ seta crosshair_pickup 0.25
+ seta crosshair_pickup_speed 4
  seta crosshair_per_weapon 0   "when 1, each gun will display a different crosshair"
  seta crosshair_color_override 0       "when 1, crosshair_color_* overrides the per-weapon color"
  seta crosshair_effect_speed -1 "how fast (in seconds) some crosshair effects should take place, 0 = instant, -1 = 2x weapon switch time"
@@@ -107,109 -109,109 +109,109 @@@ seta crosshair_laser ""      "crosshair to d
  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_alpha 0.75 "crosshair alpha value 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_alpha 1.1        "crosshair alpha value 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_alpha 0.9    "crosshair alpha value 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_alpha 1.15       "crosshair alpha value 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_alpha 1.15     "crosshair alpha value 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_alpha 1  "crosshair alpha value 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_alpha 0.85       "crosshair alpha value 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_alpha 0.85   "crosshair alpha value 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_alpha 1    "crosshair alpha value 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_alpha 1   "crosshair alpha value 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_alpha 0.85 "crosshair alpha value 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_alpha 1        "crosshair alpha value 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_alpha 0.85  "crosshair alpha value 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_alpha 1     "crosshair alpha value 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_alpha 0.9 "crosshair alpha value 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_alpha 1     "crosshair alpha value 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_alpha 1     "crosshair alpha value 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_alpha 1 "crosshair alpha value 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"
  seta crosshair_campingrifle_bulletcounter_alpha 0.15
diff --combined qcsrc/client/View.qc
index 00c395893c596f4d142d0db66d70f4a4241faebf,1ef5bb5a15c73f398770272973bcace0860386e1..074a3be5eec6f8d63eb1e671e48e70ca44189980
@@@ -349,6 -349,8 +349,8 @@@ void CSQC_RAPTOR_HUD()
  vector freeze_pmove_org, freeze_input_angles;
  entity nightvision_noise, nightvision_noise2;
  
+ float pickup_crosshair_time, pickup_crosshair_size;
  void CSQC_UpdateView(float w, float h)
  {
        entity e;
        float f, i, j;
        vector v, vo;
        vector vf_size, vf_min;
+       float a;
  
        vf_size = R_SetView3fv(VF_SIZE);
        vf_min = R_SetView3fv(VF_MIN);
        {
                // apply night vision effect
                vector rgb, tc_00, tc_01, tc_10, tc_11;
-               float a;
  
                if(!nightvision_noise)
                {
  
                // crosshair goes VERY LAST
                if(!scoreboard_active && !camera_active && intermission != 2) {
 +                      string wcross_style;
 +                      float wcross_alpha, wcross_resolution;
 +                      wcross_style = cvar_string("crosshair");
 +                      if (wcross_style == "0")
 +                              return;
 +                      wcross_resolution = cvar("crosshair_size");
 +                      if (wcross_resolution == 0)
 +                              return;
 +                      wcross_alpha = cvar("crosshair_alpha");
 +                      if (wcross_alpha == 0)
 +                              return;
 +
                        // TrueAim check
                        float shottype;
                        float bullets, ring_scale;
                        else
                                shottype = SHOTTYPE_HITWORLD;
  
 -                      string wcross_style;
 -                      wcross_style = cvar_string("crosshair");
 +                      vector wcross_color, wcross_size;
 +                      string wcross_wep, wcross_name;
 +                      float wcross_scale, wcross_blur;
  
 -                      if (wcross_style != "0") {
 -                              vector wcross_color, wcross_size;
 -                              string wcross_wep, wcross_name;
 -                              float wcross_alpha, wcross_scale, wcross_blur, wcross_resolution;
 -
 -                              wcross_color_x = cvar("crosshair_color_red");
 -                              wcross_color_y = cvar("crosshair_color_green");
 -                              wcross_color_z = cvar("crosshair_color_blue");
 -                              wcross_alpha = cvar("crosshair_color_alpha");
 -                              wcross_resolution = cvar("crosshair_size");
 -                              if (cvar("crosshair_per_weapon")) {
 -                                      e = get_weaponinfo(activeweapon);
 -                                      if (e && e.netname != "")
 +                      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")) {
 +                              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"))
                                        {
 -                                              wcross_wep = e.netname;
 -                                              wcross_style = cvar_string(strcat("crosshair_", wcross_wep));
 -                                              if(wcross_style == "")
 -                                                      wcross_style = e.netname;
 -
 -                                              if(!cvar("crosshair_color_override"))
 -                                              {
 -                                                      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_alpha *= cvar(strcat("crosshair_", wcross_wep, "_color_alpha"));
 -                                              wcross_resolution *= cvar(strcat("crosshair_", wcross_wep, "_size"));
 +                                              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_name = strcat("gfx/crosshair", wcross_style);
 +                      wcross_name = strcat("gfx/crosshair", wcross_style);
  
 -                              if(cvar("crosshair_effect_scalefade"))
 -                              {
 -                                      wcross_scale = wcross_resolution;
 -                                      wcross_resolution = 1;
 -                              }
 -                              else
 -                              {
 -                                      wcross_scale = 1;
 -                              }
 +                      if(cvar("crosshair_effect_scalefade"))
 +                      {
 +                              wcross_scale = wcross_resolution;
 +                              wcross_resolution = 1;
 +                      }
 +                      else
 +                      {
 +                              wcross_scale = 1;
 +                      }
  
 -                              if(cvar("crosshair_pickup"))
++                      if(cvar("crosshair_pickup"))
++                      {
++                              if(pickup_crosshair_time < getstatf(STAT_LAST_PICKUP))
+                               {
 -                                      if(pickup_crosshair_time < getstatf(STAT_LAST_PICKUP))
 -                                      {
 -                                              pickup_crosshair_size = 1;
 -                                              pickup_crosshair_time = getstatf(STAT_LAST_PICKUP);
 -                                      }
++                                      pickup_crosshair_size = 1;
++                                      pickup_crosshair_time = getstatf(STAT_LAST_PICKUP);
++                              }
 -                                      if(pickup_crosshair_size > 0)
 -                                              pickup_crosshair_size -= cvar("crosshair_pickup_speed") * frametime;
 -                                      else
 -                                              pickup_crosshair_size = 0;
++                              if(pickup_crosshair_size > 0)
++                                      pickup_crosshair_size -= cvar("crosshair_pickup_speed") * frametime;
++                              else
++                                      pickup_crosshair_size = 0;
 -                                      wcross_scale += sin(pickup_crosshair_size) * cvar("crosshair_pickup");
 -                              }
++                              wcross_scale += sin(pickup_crosshair_size) * cvar("crosshair_pickup");
++                      }
 -                              if(shottype == SHOTTYPE_HITENEMY)
 -                                      wcross_scale *= cvar("crosshair_hittest"); // is not queried if hittest is 0
 -                              if(shottype == SHOTTYPE_HITTEAM)
 -                                      wcross_scale /= cvar("crosshair_hittest"); // is not queried if hittest is 0
 +                      if(shottype == SHOTTYPE_HITENEMY)
 +                              wcross_scale *= cvar("crosshair_hittest"); // is not queried if hittest is 0
-                       else if(shottype == SHOTTYPE_HITTEAM)
++                      if(shottype == SHOTTYPE_HITTEAM)
 +                              wcross_scale /= cvar("crosshair_hittest"); // is not queried if hittest is 0
  
 -                              f = cvar("crosshair_effect_speed");
 -                              if(f < 0)
 -                                      f *= -2 * g_weaponswitchdelay;
 -                              if(wcross_scale != wcross_scale_goal_prev || wcross_alpha != wcross_alpha_goal_prev || wcross_color != wcross_color_goal_prev)
 -                              {
 -                                      wcross_changedonetime = time + f;
 -                              }
 -                              if(wcross_name != wcross_name_goal_prev || wcross_resolution != wcross_resolution_goal_prev)
 -                              {
 -                                      wcross_name_changestarttime = time;
 -                                      wcross_name_changedonetime = time + f;
 -                                      if(wcross_name_goal_prev_prev)
 -                                              strunzone(wcross_name_goal_prev_prev);
 -                                      wcross_name_goal_prev_prev = wcross_name_goal_prev;
 -                                      wcross_name_goal_prev = strzone(wcross_name);
 -                                      wcross_name_alpha_goal_prev_prev = wcross_name_alpha_goal_prev;
 -                                      wcross_resolution_goal_prev_prev = wcross_resolution_goal_prev;
 -                                      wcross_resolution_goal_prev = wcross_resolution;
 -                              }
 +                      f = cvar("crosshair_effect_speed");
 +                      if(f < 0)
 +                              f *= -2 * g_weaponswitchdelay;
 +                      if(wcross_scale != wcross_scale_goal_prev || wcross_alpha != wcross_alpha_goal_prev || wcross_color != wcross_color_goal_prev)
 +                      {
 +                              wcross_changedonetime = time + f;
 +                      }
 +                      if(wcross_name != wcross_name_goal_prev || wcross_resolution != wcross_resolution_goal_prev)
 +                      {
 +                              wcross_name_changestarttime = time;
 +                              wcross_name_changedonetime = time + f;
 +                              if(wcross_name_goal_prev_prev)
 +                                      strunzone(wcross_name_goal_prev_prev);
 +                              wcross_name_goal_prev_prev = wcross_name_goal_prev;
 +                              wcross_name_goal_prev = strzone(wcross_name);
 +                              wcross_name_alpha_goal_prev_prev = wcross_name_alpha_goal_prev;
 +                              wcross_resolution_goal_prev_prev = wcross_resolution_goal_prev;
 +                              wcross_resolution_goal_prev = wcross_resolution;
 +                      }
  
 -                              wcross_scale_goal_prev = wcross_scale;
 -                              wcross_alpha_goal_prev = wcross_alpha;
 -                              wcross_color_goal_prev = wcross_color;
 +                      wcross_scale_goal_prev = wcross_scale;
 +                      wcross_alpha_goal_prev = wcross_alpha;
 +                      wcross_color_goal_prev = wcross_color;
  
 -                              if(shottype == SHOTTYPE_HITTEAM || (shottype == SHOTTYPE_HITOBSTRUCTION && cvar("crosshair_hittest_blur") && !cvar("chase_active")))
 -                              {
 -                                      wcross_blur = 1;
 -                                      wcross_alpha *= 0.75;
 -                              }
 -                              else
 -                                      wcross_blur = 0;
 -                              // *_prev is at time-frametime
 -                              // * is at wcross_changedonetime+f
 -                              // what do we have at time?
 -                              if(time < wcross_changedonetime)
 -                              {
 -                                      f = frametime / (wcross_changedonetime - time + frametime);
 -                                      wcross_scale = f * wcross_scale + (1 - f) * wcross_scale_prev;
 -                                      wcross_alpha = f * wcross_alpha + (1 - f) * wcross_alpha_prev;
 -                                      wcross_color = f * wcross_color + (1 - f) * wcross_color_prev;
 -                              }
 +                      if(shottype == SHOTTYPE_HITTEAM || (shottype == SHOTTYPE_HITOBSTRUCTION && cvar("crosshair_hittest_blur") && !cvar("chase_active")))
 +                      {
 +                              wcross_blur = 1;
 +                              wcross_alpha *= 0.75;
 +                      }
 +                      else
 +                              wcross_blur = 0;
 +                      // *_prev is at time-frametime
 +                      // * is at wcross_changedonetime+f
 +                      // what do we have at time?
 +                      if(time < wcross_changedonetime)
 +                      {
 +                              f = frametime / (wcross_changedonetime - time + frametime);
 +                              wcross_scale = f * wcross_scale + (1 - f) * wcross_scale_prev;
 +                              wcross_alpha = f * wcross_alpha + (1 - f) * wcross_alpha_prev;
 +                              wcross_color = f * wcross_color + (1 - f) * wcross_color_prev;
 +                      }
  
 -                              wcross_scale_prev = wcross_scale;
 -                              wcross_alpha_prev = wcross_alpha;
 -                              wcross_color_prev = wcross_color;
 +                      wcross_scale_prev = wcross_scale;
 +                      wcross_alpha_prev = wcross_alpha;
 +                      wcross_color_prev = wcross_color;
  
 -                              wcross_scale *= 1 - cvar("_menu_alpha");
 -                              wcross_alpha *= 1 - cvar("_menu_alpha");
 +                      wcross_scale *= 1 - cvar("_menu_alpha");
 +                      wcross_alpha *= 1 - cvar("_menu_alpha");
  
 -                              ring_scale = cvar("crosshair_ring_size");
 +                      ring_scale = cvar("crosshair_ring_size");
  
 -                              wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
 +                      wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
  
 -                              float nex_charge;
 -                              nex_charge = getstatf(STAT_NEX_CHARGE);
 +                      float nex_charge;
 +                      nex_charge = getstatf(STAT_NEX_CHARGE);
  
 -                              // ring around crosshair representing bullets left in camping rifle clip
 -                              if (activeweapon == WEP_CAMPINGRIFLE && cr_maxbullets)
 -                              {
 -                                      bullets = getstati(STAT_BULLETS_LOADED);
 -                                      f = bound(0, bullets / cr_maxbullets, 1);
 +                      // ring around crosshair representing bullets left in camping rifle clip
 +                      if (activeweapon == WEP_CAMPINGRIFLE && cr_maxbullets)
 +                      {
 +                              bullets = getstati(STAT_BULLETS_LOADED);
 +                              f = bound(0, bullets / cr_maxbullets, 1);
  
 -                                      a = cvar("crosshair_campingrifle_bulletcounter_alpha");
 -                                      DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
 -                              }
 -                              else if (activeweapon == WEP_NEX && nex_charge) // ring around crosshair representing velocity-dependent damage for the nex
 -                              {
 -                                      a = cvar("crosshair_nexvelocity_alpha");
 -                                      DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", nex_charge, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
 -                              }
 +                              a = cvar("crosshair_campingrifle_bulletcounter_alpha");
 +                              DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
 +                      }
 +                      else if (activeweapon == WEP_NEX && nex_charge) // ring around crosshair representing velocity-dependent damage for the nex
 +                      {
 +                              a = cvar("crosshair_nexvelocity_alpha");
 +                              DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", nex_charge, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
 +                      }
  
  #define CROSSHAIR_DO_BLUR(M,sz,wcross_name,wcross_alpha) \
 -                              do \
 +                      do \
 +                      { \
 +                              if(wcross_blur > 0) \
 +                              { \
 +                                      for(i = -2; i <= 2; ++i) \
 +                                              for(j = -2; j <= 2; ++j) \
 +                                                      M(i,j,sz,wcross_name,wcross_alpha*0.04); \
 +                              } \
 +                              else \
                                { \
 -                                      if(wcross_blur > 0) \
 -                                      { \
 -                                              for(i = -2; i <= 2; ++i) \
 -                                                      for(j = -2; j <= 2; ++j) \
 -                                                              M(i,j,sz,wcross_name,wcross_alpha*0.04); \
 -                                      } \
 -                                      else \
 -                                      { \
 -                                              M(0,0,sz,wcross_name,wcross_alpha); \
 -                                      } \
 +                                      M(0,0,sz,wcross_name,wcross_alpha); \
                                } \
 -                              while(0)
 +                      } \
 +                      while(0)
  
  #define CROSSHAIR_DRAW_SINGLE(i,j,sz,wcross_name,wcross_alpha) \
 -                              drawpic(wcross_origin - ('0.5 0 0' * (sz * wcross_size_x + i * wcross_blur) + '0 0.5 0' * (sz * wcross_size_y + j * wcross_blur)), wcross_name, sz * wcross_size, wcross_color, wcross_alpha, DRAWFLAG_NORMAL)
 +                      drawpic(wcross_origin - ('0.5 0 0' * (sz * wcross_size_x + i * wcross_blur) + '0 0.5 0' * (sz * wcross_size_y + j * wcross_blur)), wcross_name, sz * wcross_size, wcross_color, wcross_alpha, DRAWFLAG_NORMAL)
  
  #define CROSSHAIR_DRAW(sz,wcross_name,wcross_alpha) \
 -                              CROSSHAIR_DO_BLUR(CROSSHAIR_DRAW_SINGLE,sz,wcross_name,wcross_alpha)
 +                      CROSSHAIR_DO_BLUR(CROSSHAIR_DRAW_SINGLE,sz,wcross_name,wcross_alpha)
  
 -                              if(time < wcross_name_changedonetime && wcross_name != wcross_name_goal_prev_prev && wcross_name_goal_prev_prev)
 -                              {
 -                                      f = (wcross_name_changedonetime - time) / (wcross_name_changedonetime - wcross_name_changestarttime);
 -                                      wcross_size = drawgetimagesize(wcross_name_goal_prev_prev) * wcross_scale;
 -                                      CROSSHAIR_DRAW(wcross_resolution_goal_prev_prev, wcross_name_goal_prev_prev, wcross_alpha * f * wcross_name_alpha_goal_prev_prev);
 -                                      f = 1 - f;
 -                              }
 -                              else
 -                              {
 -                                      f = 1;
 -                              }
 +                      if(time < wcross_name_changedonetime && wcross_name != wcross_name_goal_prev_prev && wcross_name_goal_prev_prev)
 +                      {
 +                              f = (wcross_name_changedonetime - time) / (wcross_name_changedonetime - wcross_name_changestarttime);
 +                              wcross_size = drawgetimagesize(wcross_name_goal_prev_prev) * wcross_scale;
 +                              CROSSHAIR_DRAW(wcross_resolution_goal_prev_prev, wcross_name_goal_prev_prev, wcross_alpha * f * wcross_name_alpha_goal_prev_prev);
 +                              f = 1 - f;
 +                      }
 +                      else
 +                      {
 +                              f = 1;
 +                      }
  
 -                              wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
 -                              CROSSHAIR_DRAW(wcross_resolution, wcross_name, wcross_alpha * f);
 +                      wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
 +                      CROSSHAIR_DRAW(wcross_resolution, wcross_name, wcross_alpha * f);
  
 -                              if(cvar("crosshair_dot"))
 -                                      CROSSHAIR_DRAW(wcross_resolution * cvar("crosshair_dot_size"), "gfx/crosshairdot.tga", wcross_alpha * f * cvar("crosshair_dot_alpha"));
 +                      if(cvar("crosshair_dot"))
 +                              CROSSHAIR_DRAW(wcross_resolution * cvar("crosshair_dot_size"), "gfx/crosshairdot.tga", wcross_alpha * f * cvar("crosshair_dot_alpha"));
  
 -                              wcross_name_alpha_goal_prev = f;
 -                      }
 +                      wcross_name_alpha_goal_prev = f;
                }
                else
                {
@@@ -1083,7 -1092,7 +1101,7 @@@ void CSQC_SPIDER_HUD(
  
  void CSQC_RAPTOR_HUD()
  {
-       float rockets, reload, heat, hp, shield, energy;
+       float reload, hp, shield, energy;
        vector picsize, hudloc;
  
      // Fetch health & ammo stats
index 354c1857e2c0b133c51ffbd912df3b2f4b0a13d7,a972dedd0dd6cda0d8d2417edab6923a10408e4d..2a075f4c921e943a796e2483eedeace3b48d6e1e
@@@ -92,7 -92,8 +92,8 @@@ void XonoticPlayerSettingsTab_fill(enti
        me.TR(me);
                sl = makeXonoticSlider(0.45, 0.75, 0.01, "cl_bobcycle");
                me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, sl, "View bobbing:"));
-               me.TD(me, 1, 2, sl);    
+               makeMulti(sl, "cl_bob2cycle");
+               me.TD(me, 1, 2, sl);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Zoom factor:"));
                me.TD(me, 1, 2, e = makeXonoticSlider(2, 16, 0.5, "cl_zoomfactor"));
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair alpha:"));
 -              me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.1, "crosshair_color_alpha"));
 +              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:"));