#include "announcer.qh"
#include "hud/all.qh"
#include "mapvoting.qh"
-#include "scoreboard.qh"
#include "shownames.qh"
+#include "hud/panel/scoreboard.qh"
#include "hud/panel/quickmenu.qh"
#include "mutators/events.qh"
{
entity e = new_pure(porto);
e.draw = Porto_Draw;
+ IL_PUSH(g_drawables, e);
e.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP;
}
zoomspeed = 3.5;
zoomdir = button_zoom;
- if(hud == HUD_NORMAL)
+ if(hud == HUD_NORMAL && !spectatee_status)
if(switchweapon == activeweapon)
if((activeweapon == WEP_VORTEX && !WEP_CVAR(vortex, secondary)) || (activeweapon == WEP_RIFLE && !WEP_CVAR(rifle, secondary))) // do NOT use switchweapon here
zoomdir += button_attack2;
void PostInit();
void CSQC_Demo_Camera();
-float HUD_WouldDrawScoreboard();
+float Scoreboard_WouldDraw();
float camera_mode;
const float CAMERA_FREE = 1;
const float CAMERA_CHASE = 2;
{
case 1: // crosshair_color_per_weapon
{
- if(this != WEP_Null)
+ if(this != WEP_Null && hud == HUD_NORMAL)
{
wcross_color = this.wpcolor;
break;
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);
Accuracy_LoadLevels();
HUD_Main();
- HUD_DrawScoreboard();
HUD_Scale_Disable();
}
int lasthud;
float vh_notice_time;
void WaypointSprite_Load();
-void CSQC_UpdateView(float w, float h)
-{ENGINE_EVENT();
+void CSQC_UpdateView(entity this, float w, float h)
+{
TC(int, w); TC(int, h);
entity e;
float fov;
// 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;
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())))
{
if(f != teamplay)
{
teamplay = f;
- HUD_InitScores();
+ Scoreboard_InitScores();
}
if(last_switchweapon != switchweapon)
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();
} 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();
- scoreboard_active = HUD_WouldDrawScoreboard();
+ scoreboard_active = Scoreboard_WouldDraw();
HUD_Draw(this); // this parameter for deep vehicle function
// 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();
}