this.viewmodel_angles = this.angles;
}
anim_update(this);
- if (!this.animstate_override && !this.animstate_looping)
+ if ((!this.animstate_override && !this.animstate_looping) || time > this.animstate_endtime)
anim_set(this, this.anim_idle, true, false, false);
}
float f = 0; // 0..1; 0: fully active
current_zoomfraction = (current_viewzoom - 1) / (1/zoomfactor - 1);
if(zoomsensitivity < 1)
- setsensitivityscale(pow(current_viewzoom, 1 - zoomsensitivity));
+ setsensitivityscale(current_viewzoom ** (1 - zoomsensitivity));
else
setsensitivityscale(1);
sound(NULL, CH_INFO, SND_TYPEHIT, VOL_BASE, ATTN_NONE);
typehit_time_prev = typehit_time;
}
+
+ static float kill_time_prev = 0;
+ float kill_time = STAT(KILL_TIME);
+ if (COMPARE_INCREASING(kill_time, kill_time_prev) > autocvar_cl_hitsound_antispam_time)
+ {
+ sound(NULL, CH_INFO, SND_KILL, VOL_BASE, ATTN_NONE);
+ kill_time_prev = kill_time;
+ }
}
vector crosshair_getcolor(entity this, float health_stat)
t = (time - blurtest_time0) / (blurtest_time1 - blurtest_time0);
r = t * blurtest_radius;
- f = 1 / pow(t, blurtest_power) - 1;
+ f = 1 / (t ** blurtest_power) - 1;
cvar_set("r_glsl_postprocess", "1");
cvar_set("r_glsl_postprocess_uservec1", strcat(ftos(r), " ", ftos(f), " 0 0"));
switch(reticle_type)
{
case 1: drawpic(reticle_pos, "gfx/reticle_normal", reticle_size, '1 1 1', f * autocvar_cl_reticle_normal_alpha, DRAWFLAG_NORMAL); break;
- case 2: drawpic(reticle_pos, reticle_image, reticle_size, '1 1 1', f * autocvar_cl_reticle_weapon_alpha, DRAWFLAG_NORMAL); break;
+ case 2: if(reticle_image) drawpic(reticle_pos, reticle_image, reticle_size, '1 1 1', f * autocvar_cl_reticle_weapon_alpha, DRAWFLAG_NORMAL); break;
}
}
}