vector v, vo;
vector vf_size, vf_min;
float a;
- float hud;
hud = getstati(STAT_HUD);
button_attack2 = (input_buttons & BUTTON_3);
sound(world, CHAN_AUTO, "misc/typehit.wav", VOL_BASE, ATTN_NONE);
nextsound_typehit_time = time + autocvar_cl_hitsound_antispam_time;
}
- if(hud && !intermission)
- {
- if(hud == HUD_SPIDERBOT)
- CSQC_SPIDER_HUD();
- else if(hud == HUD_WAKIZASHI)
- CSQC_WAKIZASHI_HUD();
- else if(hud == HUD_RAPTOR)
- CSQC_RAPTOR_HUD();
- else if(hud == HUD_BUMBLEBEE)
- CSQC_BUMBLE_HUD();
- }
- else
+
+ //else
{
if(gametype == GAME_FREEZETAG)
{
CSQC_common_hud();
// crosshair goes VERY LAST
- if(!scoreboard_active && !camera_active && intermission != 2 && spectatee_status != -1) {
+ if(!scoreboard_active && !camera_active && intermission != 2 && spectatee_status != -1 && hud == HUD_NORMAL) {
string wcross_style;
float wcross_alpha, wcross_resolution;
wcross_style = autocvar_crosshair;
if(autocvar__hud_configure)
HUD_Panel_Mouse();
-
+
+ if(hud && !intermission)
+ {
+ if(hud == HUD_SPIDERBOT)
+ CSQC_SPIDER_HUD();
+ else if(hud == HUD_WAKIZASHI)
+ CSQC_WAKIZASHI_HUD();
+ else if(hud == HUD_RAPTOR)
+ CSQC_RAPTOR_HUD();
+ else if(hud == HUD_BUMBLEBEE)
+ CSQC_BUMBLE_HUD();
+ }
// let's reset the view back to normal for the end
R_SetView(VF_MIN, '0 0 0');
R_SetView(VF_SIZE, '1 0 0' * w + '0 1 0' * h);
void CSQC_common_hud(void)
{
- // HUD_SortFrags(); done in HUD_Draw
- float hud;
- hud = getstati(STAT_HUD);
-
- if(intermission)
- hud = HUD_NORMAL;
-
- //hud = 10;
- switch(hud)
- {
- case HUD_NORMAL:
- // do some accuracy var caching
- float i;
- if(!(gametype == GAME_RACE || gametype == GAME_CTS))
- {
- if(autocvar_accuracy_color_levels != acc_color_levels)
- {
- if(acc_color_levels)
- strunzone(acc_color_levels);
- acc_color_levels = strzone(autocvar_accuracy_color_levels);
- acc_levels = tokenize(acc_color_levels);
- if (acc_levels > MAX_ACCURACY_LEVELS)
- acc_levels = MAX_ACCURACY_LEVELS;
-
- for (i = 0; i < acc_levels; ++i)
- acc_lev[i] = stof(argv(i)) / 100.0;
- }
- // let know that acc_col[] needs to be loaded
- acc_col_x[0] = -1;
- }
-
- HUD_Main(); // always run these functions for alpha checks
- HUD_DrawScoreboard();
+ // do some accuracy var caching
+ float i;
+ if(!(gametype == GAME_RACE || gametype == GAME_CTS))
+ {
+ if(autocvar_accuracy_color_levels != acc_color_levels)
+ {
+ if(acc_color_levels)
+ strunzone(acc_color_levels);
+ acc_color_levels = strzone(autocvar_accuracy_color_levels);
+ acc_levels = tokenize(acc_color_levels);
+ if (acc_levels > MAX_ACCURACY_LEVELS)
+ acc_levels = MAX_ACCURACY_LEVELS;
+
+ for (i = 0; i < acc_levels; ++i)
+ acc_lev[i] = stof(argv(i)) / 100.0;
+ }
+ // let know that acc_col[] needs to be loaded
+ acc_col_x[0] = -1;
+ }
- if (scoreboard_active) // scoreboard/accuracy
- {
- HUD_Reset();
- // HUD_DrawScoreboard takes care of centerprint_start
- }
- else if (intermission == 2) // map voting screen
- {
- HUD_FinaleOverlay();
- HUD_Reset();
+ HUD_Main(); // always run these functions for alpha checks
+ HUD_DrawScoreboard();
- centerprint_start_x = 0;
- centerprint_start_y = autocvar_scr_centerpos * vid_conheight;
- }
- else // hud
- {
- centerprint_start_x = 0;
- centerprint_start_y = autocvar_scr_centerpos * vid_conheight;
- }
+ if (scoreboard_active) // scoreboard/accuracy
+ {
+ HUD_Reset();
+ // HUD_DrawScoreboard takes care of centerprint_start
+ }
+ else if (intermission == 2) // map voting screen
+ {
+ HUD_FinaleOverlay();
+ HUD_Reset();
- HUD_DrawCenterPrint();
- break;
+ centerprint_start_x = 0;
+ centerprint_start_y = autocvar_scr_centerpos * vid_conheight;
+ }
+ else // hud
+ {
+ centerprint_start_x = 0;
+ centerprint_start_y = autocvar_scr_centerpos * vid_conheight;
+ }
+ /*
+ switch(hud)
+ {
case HUD_SPIDERBOT:
CSQC_SPIDER_HUD();
break;
case HUD_BUMBLEBEE:
CSQC_BUMBLE_HUD();
break;
-
}
+ */
+
+ HUD_DrawCenterPrint();
+
}