X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud.qc;h=a8ddc029433b12b28c488ee91429233b9f1cc224;hb=7b0290e8ce71067769672555e9233f720b463bdb;hp=dbae62cbdef08c40cde94676b407e014673e5169;hpb=05375be95785001ea4228a59f830308501e59b5e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index dbae62cbd..a8ddc0294 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -380,7 +380,6 @@ void HUD_Weapons(void) vector color; // check to see if we want to continue - if(intermission == 2) return; if(hud != HUD_NORMAL) return; if(!autocvar__hud_configure) @@ -966,7 +965,6 @@ int nade_prevframe; float nade_statuschange_time; void HUD_Ammo(void) { - if(intermission == 2) return; if(hud != HUD_NORMAL) return; if(!autocvar__hud_configure) { @@ -1241,8 +1239,6 @@ int getPowerupItemAlign(int align, int column, int row, int columns, int rows, b void HUD_Powerups() { - if(intermission == 2) return; - int allItems = getstati(STAT_ITEMS, 0, 24); int allBuffs = getstati(STAT_BUFFS, 0, 24); int strengthTime, shieldTime, superTime; @@ -1406,7 +1402,6 @@ void HUD_Powerups() void HUD_HealthArmor(void) { int armor, health, fuel; - if(intermission == 2) return; if(!autocvar__hud_configure) { if(!autocvar_hud_panel_healtharmor) return; @@ -1713,7 +1708,6 @@ void HUD_Notify_Push(string icon, string attacker, string victim) void HUD_Notify(void) { - if(intermission == 2) return; if (!autocvar__hud_configure) if (!autocvar_hud_panel_notify) return; @@ -1827,7 +1821,6 @@ void HUD_Notify(void) void HUD_Timer(void) { - if(intermission == 2) return; if(!autocvar__hud_configure) { if(!autocvar_hud_panel_timer) return; @@ -2048,7 +2041,6 @@ void HUD_Radar_Mouse() void HUD_Radar(void) { - if(intermission == 2) return; if (!autocvar__hud_configure) { if (hud_panel_radar_maximized) @@ -2397,7 +2389,6 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me) void HUD_Score(void) { - if(intermission == 2) return; if(!autocvar__hud_configure) { if(!autocvar_hud_panel_score) return; @@ -2581,7 +2572,6 @@ void HUD_Score(void) // void HUD_RaceTimer (void) { - if(intermission == 2) return; if(!autocvar__hud_configure) { if(!autocvar_hud_panel_racetimer) return; @@ -2732,7 +2722,6 @@ void HUD_RaceTimer (void) void HUD_Vote(void) { - if(intermission == 2) return; if(autocvar_cl_allow_uid2name == -1 && (gametype == MAPINFO_TYPE_CTS || gametype == MAPINFO_TYPE_RACE || (serverflags & SERVERFLAG_PLAYERSTATS))) { vote_active = 1; @@ -3609,7 +3598,6 @@ float mod_change; // "time" when mod_active changed void HUD_ModIcons(void) { - if(intermission == 2) return; if(!autocvar__hud_configure) { if(!autocvar_hud_panel_modicons) return; @@ -3651,7 +3639,6 @@ void HUD_ModIcons(void) // void HUD_PressedKeys(void) { - if(intermission == 2) return; if(!autocvar__hud_configure) { if(!autocvar_hud_panel_pressedkeys) return; @@ -3815,7 +3802,6 @@ float frametimeavg1; // 1 frame ago float frametimeavg2; // 2 frames ago void HUD_EngineInfo(void) { - //if(intermission == 2) return; if(!autocvar__hud_configure) { if(!autocvar_hud_panel_engineinfo) return; @@ -3877,7 +3863,6 @@ void HUD_EngineInfo(void) } while(0) void HUD_InfoMessages(void) { - if(intermission == 2) return; if(!autocvar__hud_configure) { if(!autocvar_hud_panel_infomessages) return; @@ -4059,7 +4044,6 @@ float acc_prevtime, acc_avg, top_speed, top_speed_time; float physics_update_time, discrete_speed, discrete_acceleration; void HUD_Physics(void) { - if(intermission == 2) return; if(!autocvar__hud_configure) { if(!autocvar_hud_panel_physics) return; @@ -4451,7 +4435,6 @@ void reset_centerprint_messages(void) float hud_configure_cp_generation_time; void HUD_CenterPrint (void) { - if(intermission == 2) return; if(!autocvar__hud_configure) { if(!autocvar_hud_panel_centerprint) return; @@ -4695,28 +4678,48 @@ Main HUD system ================== */ +void HUD_Vehicle() +{ + if(autocvar__hud_configure) return; + if(intermission == 2) return; + + if(hud == HUD_BUMBLEBEE_GUN) + CSQC_BUMBLE_GUN_HUD(); + else { + Vehicle info = get_vehicleinfo(hud); + info.vr_hud(info); + } +} + bool HUD_Panel_CheckFlags(int showflags) { if ( HUD_Minigame_Showpanels() ) return showflags & PANEL_SHOW_MINIGAME; + if(intermission == 2) + return showflags & PANEL_SHOW_MAPVOTE; return showflags & PANEL_SHOW_MAINGAME; } void HUD_Panel_Draw(entity panent) { panel = panent; - if ( HUD_Panel_CheckFlags(panel.panel_showflags) ) + if(autocvar__hud_configure) + { + if(panel.panel_configflags & PANEL_CONFIG_MAIN) + panel.panel_draw(); + } + else if(HUD_Panel_CheckFlags(panel.panel_showflags)) panel.panel_draw(); } -void HUD_Reset (void) +void HUD_Reset(void) { // reset gametype specific icons if(gametype == MAPINFO_TYPE_CTF) HUD_Mod_CTF_Reset(); } -void HUD_Main (void) +void HUD_Main(void) { int i; // global hud theAlpha fade @@ -4845,6 +4848,8 @@ void HUD_Main (void) for(i = hud_panels_COUNT - 1; i >= 0; --i) HUD_Panel_Draw(hud_panels[panel_order[i]]); + HUD_Vehicle(); + hud_draw_maximized = 1; // panels that may be maximized must check this var // draw maximized panels on top if(hud_panel_radar_maximized) @@ -4854,6 +4859,9 @@ void HUD_Main (void) if(hud_panel_quickmenu) HUD_Panel_Draw(HUD_PANEL(QUICKMENU)); + if (scoreboard_active || intermission == 2) + HUD_Reset(); + HUD_Configure_PostDraw(); hud_configure_prev = autocvar__hud_configure;