seta hud_notify_bg_border "" "if set to something else than \"\" = override default size of border around the background"
seta hud_notify_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
seta hud_notify_print 0 "also con_notify print the messages that are shown on the notify panel"
+seta hud_notify_time 5 "time that a new entry stays until it fades out"
+seta hud_notify_fadetime 2 "fade out time"
seta hud_timer 1 "enable/disable this panel"
seta hud_timer_pos "-0.213725 0" "position of this base of the panel"
seta hud_pressedkeys_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
// scoreboard
+seta scoreboard_columns default
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 hud_fontsize_spec 16
seta scr_centersize 11
seta hud_width 560
-// alias hud_font "loadfont user1 ${1},gfx/fallback ${2-}; loadfont user2 ${1}-big ${2-}; hud_columns_set"
+// alias hud_font "loadfont user1 ${1},gfx/fallback ${2-}; loadfont user2 ${1}-big ${2-}; scoreboard_columns_set"
alias sbar_font "set _requested_sbar_font \"${*}\""
-seta hud_columns default
sbar_font gfx/vera-sans 8 12 16 24 32
seta hud_showbinds 1 "display actions / bound keys in the strings shown during the game. 0 displays only actions, 1 displays only bound keys, 2 displays both"
seta hud_showbinds_limit 2 "maximum number of bound keys to show for an action. 0 for unlimited"
alias ons_map "cl_cmd radar" // legacy alias
alias radar "cl_cmd radar"
-alias hud_columns_set "cl_cmd hud_columns_set $*"
-alias hud_columns_help "cl_cmd hud_columns_help $*"
+alias scoreboard_columns_set "cl_cmd scoreboard_columns_set $*"
+alias scoreboard_columns_help "cl_cmd scoreboard_columns_help $*"
alias _gl_flashblend_update_00 "gl_flashblend 1"
alias _gl_flashblend_update_10 "gl_flashblend 0"
}
#endif
registercvar("hud_usecsqc", "1");
- registercvar("hud_columns", "default", CVAR_SAVE);
+ registercvar("scoreboard_columns", "default", CVAR_SAVE);
gametype = 0;
void PostInit(void)
{
print(strcat("PostInit\n maxclients = ", ftos(maxclients), "\n"));
- localcmd(strcat("\nhud_columns_set ", cvar_string("hud_columns"), ";\n"));
+ localcmd(strcat("\nscoreboard_columns_set ", cvar_string("scoreboard_columns"), ";\n"));
entity playerchecker;
playerchecker = spawn();
{
print("Usage: cl_cmd COMMAND..., where possible commands are:\n");
print(" settemp cvar value\n");
- print(" hud_columns_set ...\n");
- print(" hud_columns_help\n");
+ print(" scoreboard_columns_set ...\n");
+ print(" scoreboard_columns_help\n");
GameCommand_Generic("help");
return;
}
else if(cmd == "settemp") {
cvar_clientsettemp(argv(1), argv(2));
}
- else if(cmd == "hud_columns_set") {
+ else if(cmd == "scoreboard_columns_set") {
Cmd_HUD_SetFields(argc);
}
- else if(cmd == "hud_columns_help") {
+ else if(cmd == "scoreboard_columns_help") {
Cmd_HUD_Help(argc);
}
#ifdef BLURTEST
float a;
float when;
- when = 5;
+ when = cvar("hud_notify_time");
float fadetime;
- fadetime = 2;
+ fadetime = cvar("hud_notify_fadetime");
string s;
float i;
for(i = 0; i < entries; ++i)
{
- a = bound(0, when + (fadetime - (time - killnotify_times[i]))/fadetime, 1);
-
+ if(fadetime)
+ {
+ if(killnotify_times[i] + when > time)
+ a = 1;
+ else
+ a = bound(0, (killnotify_times[i] + when + fadetime - time) / fadetime, 1);
+ }
+ else
+ {
+ if(killnotify_times[i] + when > time)
+ a = 1;
+ else
+ a = 0;
+ }
+
// X [did action to] Y
if(WEP_VALID(killnotify_deathtype[i]))
{
void Cmd_HUD_Help(float argc)
{
- print("You can modify the scoreboard using the ^2hud_columns_set command.\n");
+ print("You can modify the scoreboard using the ^2scoreboard_columns_set command.\n");
print("^3|---------------------------------------------------------------|\n");
print("Usage:\n");
- print("^2hud_columns_set default\n");
- print("^2hud_columns_set ^7filed1 field2 ...\n");
+ print("^2scoreboard_columns_set default\n");
+ print("^2scoreboard_columns_set ^7filed1 field2 ...\n");
print("The following field names are recognized (case insensitive):\n");
print("You can use a ^3|^7 to start the right-aligned fields.\n\n");
print("The special game type names 'teams' and 'noteams' can be used to\n");
print("include/exclude ALL teams/noteams game modes.\n\n");
- print("Example: hud_columns_set name ping pl | +ctf/field3 -dm/field4\n");
+ print("Example: scoreboard_columns_set name ping pl | +ctf/field3 -dm/field4\n");
print("will display name, ping and pl aligned to the left, and the fields\n");
print("right of the vertical bar aligned to the right.\n");
print("'field3' will only be shown in CTF, and 'field4' will be shown in all\n");
// TODO: re enable with gametype dependant cvars?
if(argc < 2) // no arguments provided
- argc = tokenizebyseparator(strcat("x ", cvar_string("hud_columns")), " ");
+ argc = tokenizebyseparator(strcat("x ", cvar_string("scoreboard_columns")), " ");
if(argc < 2)
argc = tokenizebyseparator(strcat("x ", HUD_DefaultColumnLayout()), " ");
is_spec = (GetPlayerColor(pl.sv_entnum) == COLOR_SPECTATOR);
if((rgb == '1 1 1') && (!is_spec)) {
- rgb_x = cvar("hud_color_bg_r") + 0.5;
- rgb_y = cvar("hud_color_bg_g") + 0.5;
- rgb_z = cvar("hud_color_bg_b") + 0.5; }
+ rgb_x = cvar("scoreboard_color_bg_r") + 0.5;
+ rgb_y = cvar("scoreboard_color_bg_g") + 0.5;
+ rgb_z = cvar("scoreboard_color_bg_b") + 0.5; }
// Layout:
tmp_x = sbwidth;
float fontsize = 40 * 1/3;
float weapon_cnt = 12;
float rows;
- if(cvar("hud_accuracy_doublerows"))
+ if(cvar("scoreboard_accuracy_doublerows"))
rows = 2;
else
rows = 1;
float is_spec;
is_spec = (GetPlayerColor(pl.sv_entnum) == COLOR_SPECTATOR);
vector hl_rgb;
- hl_rgb_x = cvar("hud_color_bg_r") + 0.5;
- hl_rgb_y = cvar("hud_color_bg_g") + 0.5;
- hl_rgb_z = cvar("hud_color_bg_b") + 0.5;
+ hl_rgb_x = cvar("scoreboard_color_bg_r") + 0.5;
+ hl_rgb_y = cvar("scoreboard_color_bg_g") + 0.5;
+ hl_rgb_z = cvar("scoreboard_color_bg_b") + 0.5;
pos_y += hud_fontsize_y;
drawstring(pos, strcat("Rankings"), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
}
else
{
- rgb_x = cvar("hud_color_bg_r");
- rgb_y = cvar("hud_color_bg_g");
- rgb_z = cvar("hud_color_bg_b");
+ rgb_x = cvar("scoreboard_color_bg_r");
+ rgb_y = cvar("scoreboard_color_bg_g");
+ rgb_z = cvar("scoreboard_color_bg_b");
for(tm = teams.sort_next; tm; tm = tm.sort_next)
{
}
pos = HUD_DrawScoreboardRankings(pos, pl, rgb, bg_size);
}
- else if(cvar("hud_accuracy") && spectatee_status != -1) {
+ else if(cvar("scoreboard_accuracy") && spectatee_status != -1) {
if(teamplay)
pos = HUD_DrawScoreboardAccuracyStats(pos, GetTeamRGB(myteam), bg_size);
else