X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fview.qc;h=65df30fd89ff5ec10f4eb3804cac9e7d3776c384;hp=8b96e6a269755e07f5d4175613ea5c5bc3b542f7;hb=905ec2fbd2b610eeb2591cdddbf71ce24b7bb3ab;hpb=04f3c72e87f63adf935d05039f0e3f752b4dd99a diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 8b96e6a269..65df30fd89 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -326,7 +326,7 @@ void viewmodel_draw(entity this) 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 @@ -522,7 +522,7 @@ vector GetCurrentFov(float fov) 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); @@ -875,6 +875,14 @@ void HitSound() 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) @@ -1735,7 +1743,7 @@ void CSQC_UpdateView(entity this, float w, float h) 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"));