X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fview.qc;h=5172731ffb32017af4246591362dc5ec10b9a517;hp=126815cc1c3f17845a552315cc0a501543f5e6dd;hb=76dd66af43f0f01131d019c3a8dacfe35a6f6a18;hpb=15289956b1d74f0c29b79243b08b2aa65311c298 diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 126815cc1c..5172731ffb 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -831,7 +831,7 @@ int WantEventchase(entity this) } if (spectatee_status > 0 && autocvar_cl_eventchase_spectated_change) { - if (time <= spectatee_status_changed_time + 0.5) + if (time <= spectatee_status_changed_time + min(3, autocvar_cl_eventchase_spectated_change_time)) return 1; else if (eventchase_running) return -1; // disable chase_active while eventchase is still enabled so to avoid a glicth @@ -1357,20 +1357,21 @@ void HUD_Crosshair(entity this) #define CROSSHAIR_DO_BLUR(M,sz,wcross_name,wcross_alpha) \ MACRO_BEGIN { \ + vector scaled_sz = sz * wcross_size; \ if(wcross_blur > 0) \ { \ for(i = -2; i <= 2; ++i) \ for(j = -2; j <= 2; ++j) \ - M(i,j,sz,wcross_name,wcross_alpha*0.04); \ + M(i,j,sz,scaled_sz,wcross_name,wcross_alpha*0.04); \ } \ else \ { \ - M(0,0,sz,wcross_name,wcross_alpha); \ + M(0,0,sz,scaled_sz,wcross_name,wcross_alpha); \ } \ } MACRO_END -#define CROSSHAIR_DRAW_SINGLE(i,j,sz,wcross_name,wcross_alpha) \ - drawpic(wcross_origin - ('0.5 0 0' * (sz * wcross_size.x + i * wcross_blur) + '0 0.5 0' * (sz * wcross_size.y + j * wcross_blur)), wcross_name, sz * wcross_size, wcross_color, wcross_alpha, DRAWFLAG_NORMAL) +#define CROSSHAIR_DRAW_SINGLE(i,j,sz,scaled_sz,wcross_name,wcross_alpha) \ + drawpic(wcross_origin - ('0.5 0 0' * (scaled_sz.x + i * wcross_blur) + '0 0.5 0' * (scaled_sz.y + j * wcross_blur)), wcross_name, scaled_sz, wcross_color, wcross_alpha, DRAWFLAG_NORMAL) #define CROSSHAIR_DRAW(sz,wcross_name,wcross_alpha) \ CROSSHAIR_DO_BLUR(CROSSHAIR_DRAW_SINGLE,sz,wcross_name,wcross_alpha) @@ -1539,7 +1540,7 @@ void HUD_Draw(entity this) if(autocvar_r_letterbox == 0) if(autocvar_viewsize < 120) { - if(!(gametype == MAPINFO_TYPE_RACE || gametype == MAPINFO_TYPE_CTS)) + if(!(ISGAMETYPE(RACE) || ISGAMETYPE(CTS))) Accuracy_LoadLevels(); HUD_Main(); @@ -1946,10 +1947,7 @@ void CSQC_UpdateView(entity this, float w, float h) // Render the Scene view_origin = getpropertyvec(VF_ORIGIN); view_angles = getpropertyvec(VF_ANGLES); - makevectors(view_angles); - view_forward = v_forward; - view_right = v_right; - view_up = v_up; + MAKEVECTORS(makevectors, view_angles, view_forward, view_right, view_up); #ifdef BLURTEST if(time > blurtest_time0 && time < blurtest_time1) @@ -2467,7 +2465,7 @@ void CSQC_UpdateView(entity this, float w, float h) else if(cvar("r_glsl_postprocess") == 2) cvar_set("r_glsl_postprocess", "0"); - /*if(gametype == MAPINFO_TYPE_CTF) + /*if(ISGAMETYPE(CTF)) { ctf_view(); } else */