zoomdir = button_zoom;
if(hud == HUD_NORMAL)
- if((getstati(STAT_ACTIVEWEAPON) == WEP_NEX && nex_scope) || (getstati(STAT_ACTIVEWEAPON) == WEP_RIFLE && rifle_scope)) // do NOT use switchweapon here
+ if((activeweapon == WEP_NEX && nex_scope) || (activeweapon == WEP_RIFLE && rifle_scope)) // do NOT use switchweapon here
zoomdir += button_attack2;
if(spectatee_status > 0 || isdemo())
{
}
ColorTranslateMode = autocvar_cl_stripcolorcodes;
- activeswitchweapon = getstati(STAT_SWITCHWEAPON);
- activeweapon = getstati(STAT_WEAPON);
+ switchweapon = getstati(STAT_SWITCHWEAPON);
+ activeweapon = getstati(STAT_ACTIVEWEAPON);
f = (serverflags & SERVERFLAG_TEAMPLAY);
if(f != teamplay)
{
f = autocvar_crosshair_effect_speed;
if(f < 0)
- f *= -2 * g_weaponswitchdelay;
+ f *= -1 * g_weaponswitchdelay; // anim starts when weapon has been lowered and new weapon comes up
if(wcross_scale != wcross_scale_goal_prev || wcross_alpha != wcross_alpha_goal_prev || wcross_color != wcross_color_goal_prev)
{
wcross_changedonetime = time + f;
weapid = self.impulse;
// draw background behind currently selected weapon
- if(self.weapon == activeswitchweapon)
+ if(self.weapon == switchweapon)
drawpic_aspect_skin(wpnpos, "weapon_current_bg", wpnsize, '1 1 1', wpnalpha, DRAWFLAG_NORMAL);
// draw the weapon accuracy
if(rows == 2)
pos_x += weapon_width / 2;
- if(getstati(STAT_SWITCHWEAPON) == WEP_MINSTANEX)
+ if(switchweapon == WEP_MINSTANEX)
g_minstagib = 1; // TODO: real detection for minstagib?
float weapon_stats;