seta crosshair_fireball_color_blue 0.2 "crosshair color blue component to display when wielding the fireball"
seta crosshair_fireball_color_alpha 1 "crosshair alpha value to display when wielding the fireball"
seta crosshair_fireball_size 1 "crosshair size when wielding the fireball"
- seta crosshair_ring_size 3 "bullet counter ring size for Rifle, velocity ring for Nex"
+ seta crosshair_ring_size 2 "bullet counter ring size for Rifle, velocity ring for Nex"
seta crosshair_campingrifle_bulletcounter_alpha 0.15
seta crosshair_nexvelocity_alpha 0.15
seta cl_reticle_stretch 0 "whether to stretch reticles so they fit the screen (brakes image proportions)"
set g_grappling_hook 0 "let players spawn with the grappling hook which allows them to pull themselves up"
set g_dodging 0 "set to 1 to enable dodging in games"
+ set g_rocket_flying 0 "set to 1 to enable rocket flying in all balance configs"
seta cl_dodging_timeout 0.2 "determines how long apart (in seconds) two taps on the same direction key are considered a dodge. use 0 to disable"
set g_arena_respawn_waves 0
set g_ca_respawn_delay 0
set g_ca_respawn_waves 0
+ set g_ca_damage2score_multiplier 0.01
+ set g_ca_round_timelimit 180
set g_nexball_respawn_delay 0
set g_nexball_respawn_waves 0
set g_as_respawn_delay 0
set sv_vote_timeout 30 "a vote will timeout after this many seconds"
set sv_vote_wait 120 "a player can not call a vote again for this many seconds when his vote was not accepted"
set sv_vote_stop 15 "a player can not call a vote again for this many seconds when he stopped this vote (e.g. to correct it)"
- set sv_vote_majority_factor 0.5 "which quotient of the PLAYERS constitute a majority? (try: 0.667, 0.75 when using the above)"
- set sv_vote_simple_majority_factor 0.667 "which quotient of the VOTERS constitute a majority too? (0 = off, otherwise it must be higher than or equal to sv_vote_majority_factor)"
+ set sv_vote_majority_factor 0.5 "which quotient of the PLAYERS constitute a majority? (try: 0.666, 0.75 when using the above)"
+ set sv_vote_simple_majority_factor 0.666 "which quotient of the VOTERS constitute a majority too? (0 = off, otherwise it must be higher than or equal to sv_vote_majority_factor)"
// when disabled, don't allow game type changes "note: set these two equal to JUST support simple majorities"
set sv_vote_override_mostrecent 0
alias vhelp "cmd vote help"
seta hud_panel_notify_time 10 "time that a new entry stays until it fades out"
seta hud_panel_notify_fadetime 3 "fade out time"
+seta hud_panel_modicons_dom_layout 0 "3 possible layouts: 0) only icons; 1) icons and percentage of average pps (points per second); 2) icons and average pps"
+
seta hud_panel_timer_increment 0 "show elapsed time instead of remaining time"
seta hud_panel_radar_scale 4096 "distance you can see on the team radar"
seta scoreboard_border_thickness 1 "scoreboard border thickness"
seta scoreboard_accuracy_border_thickness 1 "accuracy stats border thickness"
seta scoreboard_accuracy_doublerows 0 "use two rows instead of one"
- seta scoreboard_accuracy 1 "0 = no weapon accuracy stats panel on scoreboard"
- seta scoreboard_color_bg_r 0 "red color component of the HUD background"
- seta scoreboard_color_bg_g 0.4 "green color component of the HUD background"
- seta scoreboard_color_bg_b 0.6 "blue color component of the HUD background"
- seta scoreboard_color_bg_team 0.5 "team color multiplier of the HUD background"
+ seta scoreboard_accuracy 1 "show weapon accuracy stats panel on scoreboard"
+ seta scoreboard_color_bg_r 0 "red color component of the scoreboard background"
+ seta scoreboard_color_bg_g 0.4 "green color component of the scoreboard background"
+ seta scoreboard_color_bg_b 0.6 "blue color component of the scoreboard background"
+ seta scoreboard_color_bg_team 0.5 "team color multiplier of the scoreboard background"
seta scoreboard_alpha_bg 0.6 "scoreboard background alpha"
seta scoreboard_alpha_fg 1 "scoreboard foreground alpha"
seta scoreboard_alpha_name 0.9 "alpha of player text in scoreboard list other than self"
seta scoreboard_highlight_alpha_self 0.25 "self highlight alpha value"
seta scoreboard_offset_left 0.04 "how many pixels the scoreboard is offset from the left screen edge"
seta scoreboard_offset_right 0.148 "how many pixels the scoreboard is offset from the right screen edge"
+ seta scoreboard_bg_scale 0.25 "scale for the tiled scoreboard background"
// for menu server list (eventually make them have engine support?)
seta menu_slist_showfull 1 "show servers even if they are full and have no slots to join"
set menu_use_default_hostname 1
alias sethostname "set menu_use_default_hostname 0; hostname $*"
- // force fog for people who turn it off in game (set this to like 5 if you suspect people are "cheating" that way)
- set sv_foginterval 0
+ set sv_foginterval 1 "force enable fog in regular intervals"
// Audio track names (for old-style "cd loop NUMBER" usage)
set _cdtrack_first "1"
// hud: font size
seta hud_fontsize 11
- seta hud_fontsize_spec 16
seta scr_centersize 12
seta hud_width 560
// alias hud_font "loadfont user1 ${1},gfx/fallback ${2-}; loadfont user2 ${1}-big ${2-}; scoreboard_columns_set"
set g_ban_sync_timeout 45 "time out in seconds for the ban sync requests"
set g_ban_sync_trusted_servers_verify 0 "when set to 1, additional bans sent by the servers are ignored, and only bans for the requested IP are used"
- set g_showweaponspawns 0 "1: display sprites for weapon spawns found on the map when a weapon key is pressed and the weapon is not available"
+ set g_showweaponspawns 1 "display sprites for weapon spawns found on the map when a weapon key is pressed and the weapon is not available"
alias records "cmd records"
alias rankings "cmd rankings"
// equalize looks better than fullbright
r_equalize_entities_fullbright 1
+
+ // UTF-8
+ utf8_enable 1
+
+ // safe font defaults
+ r_font_hinting 1
+ r_font_disable_freetype 0
+ r_font_size_snapping 2
sz = 0.8 + (a / 5);
- if(centerprint_num * cvar("scr_centersize") > 24 && HUD_WouldDrawScoreboard()) // 24 = height of Scoreboard text
- {
+ if(centerprint_num * cvar("scr_centersize") > 24 && scoreboard_active) // 24 = height of Scoreboard text
centerprint_start_y = scoreboard_bottom + centerprint_fontsize_y;
- }
+
pos = centerprint_start;
for (i=0; i<centerprint_num; i = i + 1)
{
float prevMouseClickedTime; // time during previous mouse click, to check for doubleclicks
vector prevMouseClickedPos; // pos during previous mouse click, to check for doubleclicks
- float menu_enabled;
- float menu_enabled_time;
float pressed_key_time;
void HUD_Panel_Arrow_Action(float nPrimary)
{
{
if (bInputType == 1)
return true;
- disable_menu_alphacheck = 1;
menu_enabled = 1;
menu_enabled_time = time;
localcmd("menu_showhudexit\n");
void HUD_Panel_Mouse()
{
// TODO: needs better check... is there any float that contains the current state of the menu? _menu_alpha isn't apparently updated the frame the menu gets enabled
- if (menu_enabled == 0) // menu dialog closed, enable normal alpha stuff again
- disable_menu_alphacheck = 0;
if (autocvar__menu_alpha == 0 && time - menu_enabled_time > 0.5)
menu_enabled = 0;
/*
- print("Disable menu_alphacheck: ", ftos(disable_menu_alphacheck), "\n");
+ print("menu_enabled: ", ftos(menu_enabled), "\n");
print("Highlighted: ", ftos(highlightedPanel), "\n");
print("Menu alpha: ", cvar_string("_menu_alpha"), "\n");
*/
- if(mouseClicked == 0 && disable_menu_alphacheck != 2 && highlightedPanel >= 0) { // don't reset these variables in disable_menu_alphacheck mode 2!
+ // instantly hide the editor cursor if we open the HUDExit dialog
+ // as hud_fade_alpha doesn't decrease to 0 in this case
+ // TODO: find a way to fade the cursor out even in this case
+ if(menu_enabled == 1 || (menu_enabled == 2 && !hud_fade_alpha))
+ return;
+
+ if(mouseClicked == 0 && menu_enabled != 2 && highlightedPanel >= 0) { // don't reset these variables in menu_enabled mode 2!
highlightedPanel = -1;
highlightedAction = 0;
}
if(time - prevMouseClickedTime < 0.4 && prevMouseClicked == 0 && prevMouseClickedPos == mousepos && highlightedPanel >= 0)
{
mouseClicked = 0; // to prevent spam, I guess.
- disable_menu_alphacheck = 2;
- menu_enabled = 1;
+ menu_enabled = 2;
menu_enabled_time = time;
HUD_Panel_GetName(highlightedPanel)
localcmd("menu_showhudoptions ", panel_name, "\n");
vector wpnpos;
vector wpnsize;
+ float show_accuracy;
+ if(autocvar_hud_panel_weapons_accuracy && acc_levels)
+ show_accuracy = true;
+
for(i = 0; i < weapon_cnt; ++i)
{
wpnpos = panel_pos + eX * column * panel_size_x*(1/columns) + eY * row * panel_size_y*(1/rows);
drawpic_aspect_skin(wpnpos, "weapon_current_bg", wpnsize, '1 1 1', fade * panel_fg_alpha, DRAWFLAG_NORMAL);
// draw the weapon accuracy
- if(acc_levels)
+ if(show_accuracy)
{
float weapon_hit, weapon_damage;
weapon_damage = weapon_fired[self.weapon-WEP_FIRST];
float mod_active; // is there any active mod icon?
+ // Clan Arena HUD modicons
+ void HUD_Mod_CA(vector pos, vector mySize)
+ {
+ mod_active = 1; // CA should never hide the mod icons panel
+ float redalive, bluealive;
+ redalive = getstati(STAT_REDALIVE);
+ bluealive = getstati(STAT_BLUEALIVE);
+
+ drawfont = hud_bigfont;
+ vector redpos, bluepos;
+ if(mySize_x > mySize_y)
+ {
+ redpos = pos;
+ bluepos = pos + eY * 0.5 * mySize_y;
+ drawpic_aspect_skin(redpos, "player_red.tga", 0.5 * mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(redpos + eX * 0.5 * mySize_x, ftos(redalive), 0.5 * mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawpic_aspect_skin(bluepos, "player_blue.tga", 0.5 * mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(bluepos + eX * 0.5 * mySize_x, ftos(bluealive), 0.5 * mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ }
+ else
+ {
+ redpos = pos;
+ bluepos = pos + eY * 0.5 * mySize_y;
+ drawpic_aspect_skin(redpos, "player_red.tga", eX * mySize_x + eY * 0.3 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(redpos + eY * 0.3 * mySize_y, ftos(redalive), eX * mySize_x + eY * 0.2 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawpic_aspect_skin(bluepos, "player_blue.tga", eX * mySize_x + eY * 0.3 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(bluepos + eY * 0.3 * mySize_y, ftos(bluealive), eX * mySize_x + eY * 0.2 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ }
+ drawfont = hud_font;
+ }
+
// CTF HUD modicon section
float redflag_prevframe, blueflag_prevframe; // status during previous frame
float redflag_prevstatus, blueflag_prevstatus; // last remembered status
drawfont = hud_font;
}
+void DrawDomItem(vector myPos, vector mySize, float aspect_ratio, float i)
+{
+ float stat, pps_ratio;
+ string pic;
+ vector color;
+ switch(i)
+ {
+ case 0:
+ stat = getstatf(STAT_DOM_PPS_RED);
+ pic = "dom_icon_red";
+ color = '1 0 0';
+ break;
+ case 1:
+ stat = getstatf(STAT_DOM_PPS_BLUE);
+ pic = "dom_icon_blue";
+ color = '0 0 1';
+ break;
+ case 2:
+ stat = getstatf(STAT_DOM_PPS_YELLOW);
+ pic = "dom_icon_yellow";
+ color = '1 1 0';
+ break;
+ case 3:
+ stat = getstatf(STAT_DOM_PPS_PINK);
+ pic = "dom_icon_pink";
+ color = '1 0 1';
+ }
+ pps_ratio = stat / getstatf(STAT_DOM_TOTAL_PPS);
+
+ if(mySize_x/mySize_y > aspect_ratio)
+ {
+ i = aspect_ratio * mySize_y;
+ myPos_x = myPos_x + (mySize_x - i) / 2;
+ mySize_x = i;
+ }
+ else
+ {
+ i = 1/aspect_ratio * mySize_x;
+ myPos_y = myPos_y + (mySize_y - i) / 2;
+ mySize_y = i;
+ }
+
+ if (cvar("hud_panel_modicons_dom_layout")) // show text too
+ {
+ //draw the text
+ drawfont = hud_bigfont;
+ color *= 0.5 + pps_ratio * (1 - 0.5); // half saturated color at min, full saturated at max
+ if (cvar("hud_panel_modicons_dom_layout") == 2) // average pps
+ drawstring_aspect(myPos + eX * mySize_y, ftos_decimals(stat, 2), eX * (2/3) * mySize_x + eY * mySize_y, color, panel_fg_alpha, DRAWFLAG_NORMAL);
+ else // percentage of average pps
+ drawstring_aspect(myPos + eX * mySize_y, strcat( ftos(floor(pps_ratio*100 + 0.5)), "%" ), eX * (2/3) * mySize_x + eY * mySize_y, color, panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawfont = hud_font;
+ }
+
+ //draw the icon
+ drawpic_aspect_skin(myPos, pic, '1 1 0' * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ if (stat > 0)
+ {
+ drawsetcliparea(myPos_x, myPos_y + mySize_y * (1 - pps_ratio), mySize_y, mySize_y * pps_ratio);
+ drawpic_aspect_skin(myPos, strcat(pic, "-highlighted"), '1 1 0' * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawresetcliparea();
+ }
+}
+
+void HUD_Mod_Dom(vector myPos, vector mySize)
+{
+ mod_active = 1; // required in each mod function that always shows something
+ entity tm;
+ float teams_count;
+ for(tm = teams.sort_next; tm; tm = tm.sort_next)
+ if(tm.team != COLOR_SPECTATOR)
+ ++teams_count;
+
+ float rows, columns, aspect_ratio;
+ rows = mySize_y/mySize_x;
+ aspect_ratio = (cvar("hud_panel_modicons_dom_layout")) ? 3 : 1;
+ rows = bound(1, floor((sqrt((4 * aspect_ratio * teams_count + rows) * rows) + rows + 0.5) / 2), teams_count);
+ columns = ceil(teams_count/rows);
+
+ drawfont = hud_bigfont;
+ int i;
+ float row, column;
+ for(i=0; i<teams_count; ++i)
+ {
+ vector pos, size;
+ pos = myPos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows);
+ size = eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows);
+
+ DrawDomItem(pos, size, aspect_ratio, i);
+
+ ++row;
+ if(row >= rows)
+ {
+ row = 0;
+ ++column;
+ }
+ }
+ drawfont = hud_font;
+}
+
float mod_prev; // previous state of mod_active to check for a change
float mod_alpha;
float mod_change; // "time" when mod_active changed
if(!autocvar_hud_panel_modicons && !autocvar__hud_configure)
return;
- if (gametype != GAME_KEYHUNT && gametype != GAME_CTF && gametype != GAME_NEXBALL && gametype != GAME_CTS && gametype != GAME_RACE && gametype != GAME_DOMINATION && !autocvar__hud_configure)
- if (gametype != GAME_KEYHUNT && gametype != GAME_CTF && gametype != GAME_NEXBALL && gametype != GAME_CTS && gametype != GAME_RACE && gametype != GAME_CA && !autocvar__hud_configure)
++ if (gametype != GAME_KEYHUNT && gametype != GAME_CTF && gametype != GAME_NEXBALL && gametype != GAME_CTS && gametype != GAME_RACE && gametype != GAME_CA && gametype != GAME_DOMINATION && !autocvar__hud_configure)
return;
active_panel = HUD_PANEL_MODICONS;
HUD_Mod_NexBall(pos, mySize);
else if(gametype == GAME_CTS || gametype == GAME_RACE)
HUD_Mod_Race(pos, mySize);
+ else if(gametype == GAME_DOMINATION)
+ HUD_Mod_Dom(pos, mySize);
+ else if(gametype == GAME_CA)
+ HUD_Mod_CA(pos, mySize);
}
// Draw pressed keys (#11)
pos = (vid_conheight - numsize_y) * cvar("cl_showspeed_position");
drawfont = hud_bigfont;
- drawstringcenter(eX + pos * eY, speed, numsize, '1 1 1', autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstringcenter(eX + pos * eY, speed, numsize, '1 1 1', autocvar_hud_panel_fg_alpha * hud_fade_alpha, DRAWFLAG_NORMAL);
if (cvar("cl_showspeed_z") == 1) {
zspeed = strcat(ftos(fabs(floor( pmove_vel_z * conversion_factor + 0.5 ))), unit);
- drawstringcenter(eX + pos * eY + numsize_y * eY, zspeed, numsize * 0.5, '1 1 1', autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstringcenter(eX + pos * eY + numsize_y * eY, zspeed, numsize * 0.5, '1 1 1', autocvar_hud_panel_fg_alpha * hud_fade_alpha, DRAWFLAG_NORMAL);
}
drawfont = hud_font;
f = bound(0, f * 10, 1);
acc_avg = acc_avg * (1 - f) + acceleration * f;
acceleration = acc_avg / getstatf(STAT_MOVEVARS_MAXSPEED);
+ if (acceleration == 0)
+ return;
pos = top - sz/2 * eY + (cvar("cl_showacceleration_position") * vid_conheight) * eY;
if (cvar("cl_showacceleration_color_custom"))
rgb = stov(cvar_string("cl_showacceleration_color"));
else {
- rgb = '1 1 1';
- if (acceleration < 0) {
+ if (acceleration < 0)
rgb = '1 .5 .5' - '0 .5 .5' * bound(0, -acceleration * 0.2, 1);
- } else if (acceleration > 0) {
+ else
rgb = '.5 1 .5' - '.5 0 .5' * bound(0, +acceleration * 0.2, 1);
- }
}
if (acceleration > 0)
- HUD_Panel_DrawProgressBar(pos, 0, acceleration * scale * '40 0 0' + sz * eY, rgb, alpha * autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL);
- else if (acceleration < 0)
- HUD_Panel_DrawProgressBar(pos + acceleration * scale * '40 0 0', 0, -acceleration * scale * '40 0 0' + sz * eY, rgb, alpha * autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(pos, 0, acceleration * scale * '40 0 0' + sz * eY, rgb, alpha * autocvar_hud_panel_fg_alpha * hud_fade_alpha, DRAWFLAG_NORMAL);
+ else
+ HUD_Panel_DrawProgressBar(pos + acceleration * scale * '40 0 0', 0, -acceleration * scale * '40 0 0' + sz * eY, rgb, alpha * autocvar_hud_panel_fg_alpha * hud_fade_alpha, DRAWFLAG_NORMAL);
}
void HUD_Reset (void)
hud_skin_path = strcat("gfx/hud/", autocvar_hud_skin);
// global hud alpha fade
- if(disable_menu_alphacheck == 1)
+ if(menu_enabled == 1)
hud_fade_alpha = 1;
else
hud_fade_alpha = (1 - autocvar__menu_alpha);
else if(autocvar__menu_alpha == 0 && scoreboard_fade_alpha == 0)
hud_fade_alpha = 1;
- hud_border_thickness = bound(0, cvar("hud_border_thickness"), 5);
- hud_accuracy_border_thickness = bound(0, cvar_or("hud_accuracy_border_thickness", 1), 5);
-
hud_fontsize = HUD_GetFontsize("hud_fontsize");
- hud_fontsize_spec = HUD_GetFontsize("hud_fontsize_spec");
+
+ if(!autocvar__hud_configure && !hud_fade_alpha)
+ return;
// Drawing stuff
}
}
- float f;
- vector color;
- if((teamplay) && autocvar_hud_dock_color_team) {
- f = stof(getplayerkey(player_localentnum - 1, "colors"));
- color = colormapPaletteColor(mod(f, 16), 1) * autocvar_hud_dock_color_team;
- }
- else if(autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && autocvar_hud_dock_color_team) {
- color = '1 0 0' * autocvar_hud_dock_color_team;
- }
- else if(autocvar_hud_dock_color == "shirt") {
- f = stof(getplayerkey(player_localentnum - 1, "colors"));
- color = colormapPaletteColor(floor(f / 16), 0);
- }
- else if(autocvar_hud_dock_color == "pants") {
- f = stof(getplayerkey(player_localentnum - 1, "colors"));
- color = colormapPaletteColor(mod(f, 16), 1);
- }
- else
- color = stov(autocvar_hud_dock_color);
-
// draw the dock
if(autocvar_hud_dock != "" && autocvar_hud_dock != "0")
{
+ float f;
+ vector color;
+ if((teamplay) && autocvar_hud_dock_color_team) {
+ f = stof(getplayerkey(player_localentnum - 1, "colors"));
+ color = colormapPaletteColor(mod(f, 16), 1) * autocvar_hud_dock_color_team;
+ }
+ else if(autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && autocvar_hud_dock_color_team) {
+ color = '1 0 0' * autocvar_hud_dock_color_team;
+ }
+ else if(autocvar_hud_dock_color == "shirt") {
+ f = stof(getplayerkey(player_localentnum - 1, "colors"));
+ color = colormapPaletteColor(floor(f / 16), 0);
+ }
+ else if(autocvar_hud_dock_color == "pants") {
+ f = stof(getplayerkey(player_localentnum - 1, "colors"));
+ color = colormapPaletteColor(mod(f, 16), 1);
+ }
+ else
+ color = stov(autocvar_hud_dock_color);
+
string pic;
pic = strcat(hud_skin_path, "/", autocvar_hud_dock);
if(precache_pic(pic) == "") {
hud_configure_prev = autocvar__hud_configure;
if (!autocvar__hud_configure) // hud config mode disabled, enable normal alpha stuff again
- disable_menu_alphacheck = 0;
+ if (menu_enabled)
+ menu_enabled = 0;
}