X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2FView.qc;h=e6dc7309832da9e182e0661d6dc0c9d4d898adb3;hb=068f027f0c402702df2e3029b8223d9524692601;hp=16c388f8bad4c743ca647e5d01394649d7f7ce03;hpb=70b696e4e2bbe7322bf580be42961b2d5a159f31;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 16c388f8b..e6dc73098 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -1,7 +1,5 @@ entity porto; vector polyline[16]; -float trace_dphitcontents; -float trace_networkentity; float Q3SURFACEFLAG_SLICK = 2; // low friction surface float DPCONTENTS_SOLID = 1; // blocks player movement float DPCONTENTS_BODY = 32; // blocks player movement @@ -93,7 +91,7 @@ void CheckForGamestartChange() { if (previous_game_starttime != startTime) { if ((time + 5.0) < startTime) { //if connecting to server while restart was active don't always play prepareforbattle - asound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/prepareforbattle.wav"), VOL_BASEVOICE, ATTN_NONE); + sound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/prepareforbattle.wav"), VOL_BASEVOICE, ATTN_NONE); } if (time < startTime) { restartAnnouncer = spawn(); @@ -177,11 +175,15 @@ vector GetCurrentFov(float fov) else setsensitivityscale(1); - velocityzoom = bound(0, drawframetime / max(0.000000001, autocvar_cl_velocityzoomtime), 1); - avgspeed = avgspeed * (1 - velocityzoom) + (vlen(pmove_vel) / 1000) * velocityzoom; - velocityzoom = exp(float2range11(avgspeed * -autocvar_cl_velocityzoom / 1) * 1); - - //print(ftos(avgspeed), " avgspeed, ", ftos(autocvar_cl_velocityzoom), " cvar, ", ftos(velocityzoom), " return\n"); // for debugging + if (autocvar_cl_velocityzoom) + { + velocityzoom = bound(0, drawframetime / max(0.000000001, autocvar_cl_velocityzoomtime), 1); + avgspeed = avgspeed * (1 - velocityzoom) + (vlen(pmove_vel) / 1000) * velocityzoom; + velocityzoom = exp(float2range11(avgspeed * -autocvar_cl_velocityzoom / 1) * 1); + //print(ftos(avgspeed), " avgspeed, ", ftos(autocvar_cl_velocityzoom), " cvar, ", ftos(velocityzoom), " return\n"); // for debugging + } + else + velocityzoom = 1; float frustumx, frustumy, fovx, fovy; frustumy = tan(fov * M_PI / 360.0) * 0.75 * current_viewzoom * velocityzoom; @@ -945,13 +947,13 @@ void CSQC_UpdateView(float w, float h) hit_time = getstatf(STAT_HIT_TIME); if(hit_time > nextsound_hit_time && autocvar_cl_hitsound) { - asound(world, CH_INFO, "misc/hit.wav", VOL_BASE, ATTN_NONE); + sound(world, CH_INFO, "misc/hit.wav", VOL_BASE, ATTN_NONE); nextsound_hit_time = time + autocvar_cl_hitsound_antispam_time; } typehit_time = getstatf(STAT_TYPEHIT_TIME); if(typehit_time > nextsound_typehit_time) { - asound(world, CH_INFO, "misc/typehit.wav", VOL_BASE, ATTN_NONE); + sound(world, CH_INFO, "misc/typehit.wav", VOL_BASE, ATTN_NONE); nextsound_typehit_time = time + autocvar_cl_hitsound_antispam_time; }