X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fview.qc;h=47cf9337d9a98e3375aa3dae1e0ed5f706c89f57;hp=4ca30d4a8de656478a7bc75ebf54ee4b33c9b73b;hb=f8fd182f4c9d44790436a2e1aff424c1bdeeb6da;hpb=ccf145b9b0372a5b402465ab578ca48d943ffd88 diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 4ca30d4a8d..47cf9337d9 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -363,6 +363,7 @@ STATIC_INIT(Porto) { entity e = new_pure(porto); e.draw = Porto_Draw; + IL_PUSH(g_drawables, e); e.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP; } @@ -860,7 +861,7 @@ vector crosshair_getcolor(entity this, float health_stat) { case 1: // crosshair_color_per_weapon { - if(this != WEP_Null) + if(this != WEP_Null && hud == HUD_NORMAL) { wcross_color = this.wpcolor; break; @@ -942,6 +943,9 @@ void HUD_Crosshair(entity this) if (!autocvar_crosshair_enabled) // main toggle for crosshair rendering return; + if (spectatee_status > 0 && STAT(CAMERA_SPECTATOR) == 2) + return; + if (hud != HUD_NORMAL) { HUD_Crosshair_Vehicle(this); @@ -1346,7 +1350,6 @@ void HUD_Draw(entity this) Accuracy_LoadLevels(); HUD_Main(); - HUD_DrawScoreboard(); HUD_Scale_Disable(); } @@ -1459,6 +1462,25 @@ void CSQC_UpdateView(entity this, float w, float h) // event chase camera if(autocvar_chase_active <= 0) // greater than 0 means it's enabled manually, and this code is skipped { + if(STAT(CAMERA_SPECTATOR)) + { + if(spectatee_status > 0) + { + if(!autocvar_chase_active) + { + cvar_set("chase_active", "-2"); + goto skip_eventchase_death; + } + } + else if(autocvar_chase_active == -2) + cvar_set("chase_active", "0"); + + if(autocvar_chase_active == -2) + goto skip_eventchase_death; + } + else if(autocvar_chase_active == -2) + cvar_set("chase_active", "0"); + float vehicle_chase = (hud != HUD_NORMAL && (autocvar_cl_eventchase_vehicle || spectatee_status > 0)); float ons_roundlost = (gametype == MAPINFO_TYPE_ONSLAUGHT && STAT(ROUNDLOST)); entity gen = NULL; @@ -1569,6 +1591,8 @@ void CSQC_UpdateView(entity this, float w, float h) eventchase_current_distance = 0; } + LABEL(skip_eventchase_death); + // do lockview after event chase camera so that it still applies whenever necessary. if(autocvar_cl_lockview || (!autocvar_hud_cursormode && (autocvar__hud_configure && spectatee_status <= 0 || intermission > 1 || QuickMenu_IsOpened()))) { @@ -1847,7 +1871,7 @@ void CSQC_UpdateView(entity this, float w, float h) mousepos = mousepos*0.5 + getmousepos(); */ - FOREACH_ENTITY(it.draw, it.draw(it)); + IL_EACH(g_drawables, it.draw, it.draw(it)); addentities(MASK_NORMAL | MASK_ENGINE | MASK_ENGINEVIEWMODELS); renderscene(); @@ -2177,7 +2201,7 @@ void CSQC_UpdateView(entity this, float w, float h) } else */ // draw 2D entities - FOREACH_ENTITY(it.draw2d, it.draw2d(it)); + IL_EACH(g_drawables_2d, it.draw2d, it.draw2d(it)); Draw_ShowNames_All(); Debug_Draw(); @@ -2234,6 +2258,8 @@ void CSQC_UpdateView(entity this, float w, float h) // let's reset the view back to normal for the end setproperty(VF_MIN, '0 0 0'); setproperty(VF_SIZE, '1 0 0' * w + '0 1 0' * h); + + IL_ENDFRAME(); }