From: terencehill Date: Fri, 8 Jun 2012 22:42:21 +0000 (+0200) Subject: Make so that hud_panel_itemstime / g_waypointsprite_itemstime set to 2 will show... X-Git-Tag: xonotic-v0.8.1~12^2~41 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=97939ff66718a4ecb7c54e110da979c492b8d2c6;p=xonotic%2Fxonotic-data.pk3dir.git Make so that hud_panel_itemstime / g_waypointsprite_itemstime set to 2 will show itemstime panel / MH-MA waypoints even playing in warmup stage (set to 1 only spectating). Default value is 2 for both. --- diff --git a/_hud_descriptions.cfg b/_hud_descriptions.cfg index db92f67ed..dc9c59c9d 100644 --- a/_hud_descriptions.cfg +++ b/_hud_descriptions.cfg @@ -290,7 +290,7 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "" "minimum factor t seta hud_panel_centerprint_fade_subsequent_minfontsize "" "minimum factor for the font size from the subsequent fading effects" seta hud_panel_centerprint_fade_minfontsize "" "minimum factor for the font size from the fading in/out effects" -seta hud_panel_itemstime "" "enable/disable this panel" +seta hud_panel_itemstime "" "enable/disable this panel, it shows left time until important items (mega health, large armor, powerups, superweapons, etc...) respawn in the map: 1 when spectating, 2 even playing in warmup stage" seta hud_panel_itemstime_pos "" "position of this base of the panel" seta hud_panel_itemstime_size "" "size of this panel" seta hud_panel_itemstime_bg "" "if set to something else than \"\" = override default background" diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 9870758c7..cda180cab 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1140,7 +1140,7 @@ seta g_waypointsprite_crosshairfadedistance 150 "distance in virtual pixels from seta g_waypointsprite_distancefadealpha 1 "alpha multiplier near distance" seta g_waypointsprite_distancefadescale 0.7 "scale multiplier near the distance" seta g_waypointsprite_distancefadedistancemultiplier 0.5 "distance in map sizes from distance where to stop fading" -seta g_waypointsprite_itemstime 1 "show waypoints to indicate that some important items (mega health, large armor) are about to respawn when spectating or playing/spectating in warmup stage" +seta g_waypointsprite_itemstime 2 "show waypoints to indicate that some important items (mega health, large armor) are about to respawn: 1 when spectating, 2 even playing in warmup stage" set g_waypointsprite_spam 0 "Debugging feature. Set to 10 and load courtfun in race mode to test." alias "g_waypointsprite_personal" "impulse 30" alias "g_waypointsprite_personal_p" "impulse 31" diff --git a/hud_luminos.cfg b/hud_luminos.cfg index ad32b87db..92d245acc 100644 --- a/hud_luminos.cfg +++ b/hud_luminos.cfg @@ -288,7 +288,7 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5" seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75" seta hud_panel_centerprint_fade_minfontsize "0" -seta hud_panel_itemstime 1 +seta hud_panel_itemstime 2 seta hud_panel_itemstime_pos "0.000000 0.420000" seta hud_panel_itemstime_size "0.150000 0.270000" seta hud_panel_itemstime_bg "border_itemstime" diff --git a/hud_luminos_minimal.cfg b/hud_luminos_minimal.cfg index 3999b8d8f..16a1a3924 100644 --- a/hud_luminos_minimal.cfg +++ b/hud_luminos_minimal.cfg @@ -288,7 +288,7 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5" seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75" seta hud_panel_centerprint_fade_minfontsize "0" -seta hud_panel_itemstime 1 +seta hud_panel_itemstime 2 seta hud_panel_itemstime_pos "0.000000 0.310000" seta hud_panel_itemstime_size "0.070000 0.180000" seta hud_panel_itemstime_bg "" diff --git a/hud_luminos_minimal_xhair.cfg b/hud_luminos_minimal_xhair.cfg index cd6ed7d91..9c2d6e382 100644 --- a/hud_luminos_minimal_xhair.cfg +++ b/hud_luminos_minimal_xhair.cfg @@ -288,7 +288,7 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5" seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75" seta hud_panel_centerprint_fade_minfontsize "0" -seta hud_panel_itemstime 1 +seta hud_panel_itemstime 2 seta hud_panel_itemstime_pos "0.000000 0.310000" seta hud_panel_itemstime_size "0.070000 0.180000" seta hud_panel_itemstime_bg "" diff --git a/hud_luminos_old.cfg b/hud_luminos_old.cfg index e30558007..feb939361 100644 --- a/hud_luminos_old.cfg +++ b/hud_luminos_old.cfg @@ -288,7 +288,7 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5" seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75" seta hud_panel_centerprint_fade_minfontsize "0" -seta hud_panel_itemstime 1 +seta hud_panel_itemstime 2 seta hud_panel_itemstime_pos "0.020000 0.490000" seta hud_panel_itemstime_size "0.150000 0.140000" seta hud_panel_itemstime_bg "0" diff --git a/hud_nexuiz.cfg b/hud_nexuiz.cfg index 5f0fcfaa2..4a9692596 100644 --- a/hud_nexuiz.cfg +++ b/hud_nexuiz.cfg @@ -288,7 +288,7 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5" seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75" seta hud_panel_centerprint_fade_minfontsize "0" -seta hud_panel_itemstime 1 +seta hud_panel_itemstime 2 seta hud_panel_itemstime_pos "0.000000 0.290000" seta hud_panel_itemstime_size "0.150000 0.060000" seta hud_panel_itemstime_bg "0" diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 2be805307..377480443 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -5003,8 +5003,9 @@ void HUD_ItemsTime(void) { if(!autocvar__hud_configure) { - if(!autocvar_hud_panel_itemstime) return; - if(!warmup_stage && !spectatee_status) return; + if not(autocvar_hud_panel_itemstime == 1 && spectatee_status != 0 + || autocvar_hud_panel_itemstime == 2 && (spectatee_status != 0 || warmup_stage)) + return; ItemsTime_time[0] = getstatf(STAT_ARMOR_LARGE_TIME); ItemsTime_time[1] = getstatf(STAT_HEALTH_MEGA_TIME); diff --git a/qcsrc/client/waypointsprites.qc b/qcsrc/client/waypointsprites.qc index d225adaff..c923aafb0 100644 --- a/qcsrc/client/waypointsprites.qc +++ b/qcsrc/client/waypointsprites.qc @@ -418,9 +418,8 @@ void Draw_WaypointSprite() switch(self.rule) { case SPRITERULE_SPECTATOR: - if(!autocvar_g_waypointsprite_itemstime) - return; - if(!warmup_stage && t != COLOR_SPECTATOR + 1) + if not(autocvar_g_waypointsprite_itemstime == 1 && t == COLOR_SPECTATOR + 1 + || autocvar_g_waypointsprite_itemstime == 2 && (t == COLOR_SPECTATOR + 1 || warmup_stage)) return; spriteimage = self.netname; break; diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.c b/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.c index 7528bc06a..53134f2e9 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.c +++ b/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.c @@ -16,7 +16,14 @@ void XonoticHUDItemsTimeDialog_fill(entity me) entity e; string panelname = "itemstime"; - DIALOG_HUDPANEL_COMMON(); + me.TR(me); + me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_itemstime")); + e.addValue(e, ZCTX(_("PNL^Disabled")), "0"); + e.addValue(e, ZCTX(_("PNL^Enabled spectating")), "1"); + e.addValue(e, ZCTX(_("PNL^Enabled even playing in warmup")), "2"); + e.configureXonoticTextSliderValues(e); + + DIALOG_HUDPANEL_COMMON_NOTOGGLE(); me.TR(me); me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Align icon:")));