seta crosshair_dot_color_custom 1 "use a custom color for the crosshair dot"
// smooth transitions for crosshair changes
-seta crosshair_effect_speed -1 "how fast (in seconds) some crosshair effects should take place, 0 = instant, -1 = 2x weapon switch time"
+seta crosshair_effect_time 0.4 "how fast (in seconds) some crosshair effects should take place, 0 = instant"
seta crosshair_effect_scalefade 1 "use scaling and fading for crosshair effects"
// item pickup animation settings
armorblockpercent = ReadByte() / 255.0;
- g_weaponswitchdelay = ReadByte() / 255.0;
-
g_balance_grenadelauncher_bouncefactor = ReadCoord();
g_balance_grenadelauncher_bouncestop = ReadCoord();
g_balance_electro_secondary_bouncefactor = ReadCoord();
if(shottype == SHOTTYPE_HITTEAM)
wcross_scale /= autocvar_crosshair_hittest; // is not queried if hittest is 0
- f = autocvar_crosshair_effect_speed;
- if(f < 0)
- f *= -2 * g_weaponswitchdelay; // anim starts when weapon has been lowered and new weapon comes up
+ f = fabs(autocvar_crosshair_effect_time);
if(wcross_scale != wcross_scale_goal_prev || wcross_alpha != wcross_alpha_goal_prev || wcross_color != wcross_color_goal_prev)
{
wcross_changedonetime = time + f;
}
// if in weapon switch animation, fade ring out/in
- if(g_weaponswitchdelay > 0)
+ if(fabs(autocvar_crosshair_effect_time) > 0)
{
- f = (time - wcross_name_changestarttime) / g_weaponswitchdelay;
+ f = (time - wcross_name_changestarttime) / wcross_changedonetime;
if(f > 0 && f < 2)
ring_alpha *= fabs(1 - f);
}
var float autocvar_crosshair_dot_color_custom = 1;
float autocvar_crosshair_dot_size;
float autocvar_crosshair_effect_scalefade;
-float autocvar_crosshair_effect_speed;
+var float autocvar_crosshair_effect_time = 0.2;
var float autocvar_crosshair_enabled = 1;
float autocvar_crosshair_hitindication;
string autocvar_crosshair_hitindication_color;
#define ALPHA_MIN_VISIBLE 0.003
float armorblockpercent;
-float g_weaponswitchdelay;
//hooks
float calledhooks;
float autocvar_g_balance_nex_secondary_damagefalloff_mindist;
float autocvar_g_balance_nex_secondary_force;
float autocvar_g_balance_nex_secondary_refire;
-noref float autocvar_g_balance_nex_switchdelay_drop;
-noref float autocvar_g_balance_nex_switchdelay_raise;
float autocvar_g_balance_nex_reload_ammo;
float autocvar_g_balance_nex_reload_time;
float autocvar_g_balance_nexball_primary_animtime;
float autocvar_g_balance_uzi_sustained_spread;
float autocvar_g_balance_uzi_reload_ammo;
float autocvar_g_balance_uzi_reload_time;
-float autocvar_g_balance_weaponswitchdelay;
float autocvar_g_ballistics_density_corpse;
float autocvar_g_ballistics_density_player;
float autocvar_g_ballistics_materialconstant;
else
WriteString(MSG_ENTITY, "");
WriteByte(MSG_ENTITY, self.count * 255.0); // g_balance_armor_blockpercent
- WriteByte(MSG_ENTITY, self.cnt * 255.0); // g_balance_weaponswitchdelay
WriteCoord(MSG_ENTITY, self.bouncefactor); // g_balance_grenadelauncher_bouncefactor
WriteCoord(MSG_ENTITY, self.bouncestop); // g_balance_grenadelauncher_bouncestop
WriteCoord(MSG_ENTITY, self.ebouncefactor); // g_balance_grenadelauncher_bouncefactor
self.count = autocvar_g_balance_armor_blockpercent;
self.SendFlags |= 1;
}
- if(self.cnt != autocvar_g_balance_weaponswitchdelay)
- {
- self.cnt = autocvar_g_balance_weaponswitchdelay;
- self.SendFlags |= 1;
- }
if(self.bouncefactor != autocvar_g_balance_grenadelauncher_bouncefactor)
{
self.bouncefactor = autocvar_g_balance_grenadelauncher_bouncefactor;