seta crosshair_hlac_color_blue 0.2 "crosshair color blue component to display when wielding the H.L.A.C."
seta crosshair_hlac_color_alpha 1 "crosshair alpha value to display when wielding the H.L.A.C."
seta crosshair_hlac_size 0.6 "crosshair size when wielding the H.L.A.C."
+ seta crosshair_seeker "" "crosshair to display when wielding the TAG Seeker"
+ seta crosshair_seeker_color_red 1 "crosshair color red component to display when wielding the TAG seeker"
+ seta crosshair_seeker_color_green 0.35 "crosshair color green component to display when wielding the TAG seeker"
+ seta crosshair_seeker_color_blue 0.35 "crosshair color blue component to display when wielding the TAG seeker"
+ seta crosshair_seeker_color_alpha 0.9 "crosshair alpha value to display when wielding the TAG seeker"
+ seta crosshair_seeker_size 0.8 "crosshair size when wielding the TAG seeker"
seta crosshair_campingrifle "" "crosshair to display when wielding the campingrifle"
seta crosshair_campingrifle_color_red 0.85 "crosshair color red component to display when wielding the campingrifle"
seta crosshair_campingrifle_color_green 0.5 "crosshair color green component to display when wielding the campingrifle"
set bot_ai_aimskill_offset 0.3 "Amount of error induced to the bots aim"
set bot_ai_aimskill_think 1 "Aiming velocity. Use values below 1 for slower aiming"
set bot_ai_custom_weapon_priority_distances "300 850" "Define close and far distances in any order. Based on the distance to the enemy bots will choose different weapons"
- set bot_ai_custom_weapon_priority_far "minstanex nex campingrifle rocketlauncher grenadelauncher electro hagar hlac crylink laser uzi fireball shotgun tuba" "Desired weapons for far distances ordered by priority"
- set bot_ai_custom_weapon_priority_mid "minstanex rocketlauncher nex fireball grenadelauncher electro uzi campingrifle crylink hlac hagar shotgun laser tuba" "Desired weapons for middle distances ordered by priority"
- set bot_ai_custom_weapon_priority_close "minstanex nex uzi hlac tuba hagar crylink grenadelauncher shotgun electro campingrifle rocketlauncher laser fireball" "Desired weapons for close distances ordered by priority"
+ set bot_ai_custom_weapon_priority_far "minstanex nex campingrifle rocketlauncher grenadelauncher electro hagar hlac crylink laser uzi fireball seeker shotgun tuba" "Desired weapons for far distances ordered by priority"
+ set bot_ai_custom_weapon_priority_mid "minstanex rocketlauncher nex fireball seeker grenadelauncher electro uzi campingrifle crylink hlac hagar shotgun laser tuba" "Desired weapons for middle distances ordered by priority"
+ set bot_ai_custom_weapon_priority_close "minstanex nex uzi hlac tuba seeker hagar crylink grenadelauncher shotgun electro campingrifle rocketlauncher laser fireball" "Desired weapons for close distances ordered by priority"
set bot_ai_weapon_combo 1 "Enable bots to do weapon combos"
set bot_ai_weapon_combo_threshold 0.3 "Try to make a combo N seconds after the last attack"
set bot_ai_friends_aware_pickup_radius "500" "Bots will not pickup items if a team mate is this distance near the item"
alias -zoom -button4
alias +crouch +button5
alias -crouch -button5
-alias weapnext "_weapnext_${_supports_weaponpriority}${sbar_hudselector}${cl_weaponpriority_useforcycling}"
+alias weapnext "_weapnext_${_supports_weaponpriority}${hud_hudselector}${cl_weaponpriority_useforcycling}"
alias _weapnext_000 "impulse 10"
alias _weapnext_001 "impulse 10"
alias _weapnext_010 "impulse 10"
alias _weapnext_120 "impulse 18"
alias _weapnext_121 "impulse 15"
alias weaplast "impulse 11"
-alias weapprev "_weapprev_${_supports_weaponpriority}${sbar_hudselector}${cl_weaponpriority_useforcycling}"
+alias weapprev "_weapprev_${_supports_weaponpriority}${hud_hudselector}${cl_weaponpriority_useforcycling}"
alias _weapprev_000 "impulse 12"
alias _weapprev_001 "impulse 12"
alias _weapprev_010 "impulse 12"
con_notifysize 10
con_notifyalign 0
-sbar_info_pos 50
-seta sbar_alpha_bg 0.8 "alpha value of the HUD background"
-seta sbar_alpha_fg 1 "alpha value of the HUD foreground items"
-seta sbar_border_thickness 1 "scoreboard border thickness"
-seta sbar_accuracy_border_thickness 1 "accuracy stats border thickness"
-seta sbar_accuracy_doublerows 0 "use two rows instead of one"
-seta sbar_accuracy_yellow 40 "percentage at which the accuracy color is yellow"
-seta sbar_accuracy 1 "0 = no weapon accuracy stats panel on scoreboard"
-seta sbar_accuracy_hud 1 "0 = no weapon accuracy bar on the weapon icons"
-seta sbar_color_bg_r 0 "red color component of the HUD background"
-seta sbar_color_bg_g 0.25 "green color component of the HUD background"
-seta sbar_color_bg_b 0.17 "blue color component of the HUD background"
-seta sbar_color_bg_team 0.5 "team color multiplier of the HUD background"
-seta sbar_scoreboard_alpha_bg 0.6 "scoreboard background alpha"
-seta sbar_scoreboard_alpha_fg 1 "scoreboard foreground alpha"
-seta sbar_scoreboard_alpha_name 0.9 "alpha of player text in scoreboard list other than self"
-seta sbar_scoreboard_alpha_name_self 1 "alpha of player text in scoreboard list of self"
-seta sbar_scoreboard_fadeinspeed 10 "speed at which scoreboard fades in, higher is faster (0 = instant)"
-seta sbar_scoreboard_fadeoutspeed 5 "speed at which scoreboard fades out, higher is faster (0 = instant)"
-seta sbar_scoreboard_highlight 1 "enable highlighting for rows and columns in the scoreboard"
-seta sbar_scoreboard_highlight_alpha 0.10 "highlight alpha value (depends on sbar_scoreboard_highlight 1)"
-seta sbar_scoreboard_highlight_alpha_self 0.25 "self highlight alpha value"
-seta sbar_hudselector 1 "0 = health/armor positions flipped, 1 = default hud layout, 2 = combined health and armor display"
-seta sbar_showcurrentammo 0 "0 = show all ammo types, 1 = show only the ammo type of the current weapon"
-seta sbar_showweaponicons 1 "1 = show icons of weapons that you have"
-seta sbar_timer_increment 0 "1 = show elapsed time on the timer"
-seta sbar_timer_scale 1 "scale multiplier of the timer"
-seta sbar_vote_alreadyvoted_alpha 0.75 "alpha of the vote dialog after you have voted"
+// hud variables
+set _hud_configure 0
+seta hud_color "0 0.7 0.8" "color of the hud"
+seta hud_accuracy_yellow 40 "percentage at which the accuracy color is yellow"
+seta hud_alpha_bg 0.8 "alpha of the background"
+seta hud_alpha_fg 1 "alpha of the foreground"
+seta hud_progressbar_alpha "0.5" "alpha of progressbars"
+
+seta sbar_info_pos 50
+
+seta hud_hudselector 1 "0 = health/armor positions flipped, 1 = default hud layout, 2 = combined health and armor display"
+seta hud_showcurrentammo 0 "0 = show all ammo types, 1 = show only the ammo type of the current weapon"
+
+seta hud_weaponicons 1 "enable/disable this panel"
+seta hud_weaponicons_pos "207.5 -74.5" "position of this panel"
+seta hud_weaponicons_size "230 30" "size of this panel"
+seta hud_weaponicons_bg 1 "enable/disable the background of this panel"
+seta hud_weaponicons_border 30 "size of border from the background edges""
+seta hud_weaponicons_number 1 "show number of weapon"
+seta hud_weaponicons_accuracybar_height 3 "height of accuracy bar"
+seta hud_weaponicons_color "" "optional R G B vector of the weaponicons background color, otherwise use hud default"
+
+seta hud_inventory 1 "enable/disable this panel"
+seta hud_inventory_pos "0 -60" "position of this panel"
+seta hud_inventory_size "200 60" "size of this panel"
+seta hud_inventory_bg 1 "enable/disable the background of this panel"
+seta hud_inventory_border 30 "size of border from the background edges"
+seta hud_inventory_color "" "optional R G B vector of the panel background color, otherwise use hud default"
+
+seta hud_powerups 0 "enable/disable this panel"
+seta hud_powerups_pos "0 -90" "position of this panel"
+seta hud_powerups_size "240 90" "size of this panel"
+seta hud_powerups_bg 1 "enable/disable the background of this panel"
+seta hud_powerups_border 30 "size of border from the background edges"
+seta hud_powerups_color "" "optional R G B vector of the panel background color, otherwise use hud default"
+
+seta hud_healtharmor 1 "enable/disable this panel"
+seta hud_healtharmor_pos "207.5 -37" "position of this panel"
+seta hud_healtharmor_size "230 37" "size of this panel"
+seta hud_healtharmor_bg 1 "enable/disable the background of this panel"
+seta hud_healtharmor_border 30 "size of border from the background edges"
+seta hud_healtharmor_color "" "optional R G B vector of the panel background color, otherwise use hud default"
+seta hud_progressbar_health_color "0.6 0 0" "R G B vector of the progress bar background color"
+seta hud_progressbar_armor_color "0 0.6 0" "R G B vector of the progress bar background color"
+
+seta hud_notify 0 "enable/disable this panel"
+seta hud_notify_pos "-300 -37.5" "position of this base of the panel"
+seta hud_notify_size "200 37.5" "size of this panel with all notifications on"
+seta hud_notify_bg 1 "enable/disable the background of this panel"
+seta hud_notify_border 30 "size of border from the background edges"
+seta hud_notify_color "" "optional R G B vector of the panel background color, otherwise use hud default"
+
+seta hud_timer 1 "enable/disable this panel"
+seta hud_timer_pos "-180 0" "position of this base of the panel"
+seta hud_timer_size "180 90" "size of this panel"
+seta hud_timer_bg 1 "enable/disable the background of this panel"
+seta hud_timer_border 30 "size of border from the background edges"
+seta hud_timer_color "" "optional R G B vector of the panel background color, otherwise use hud default"
+seta hud_timer_increment "show elapsed time instead of remaining time"
+
+seta hud_radar 1 "enable/disable this panel"
+seta hud_radar_pos "0 0" "position of this base of the panel"
+seta hud_radar_size "230 170" "size of this panel"
+seta hud_radar_bg 1 "enable/disable the background of this panel"
+seta hud_radar_border 30 "size of border from the background edges"
+seta hud_radar_color "" "optional R G B vector of the panel background color, otherwise use hud default"
+
+seta hud_score 0 "enable/disable this panel"
+seta hud_score_pos "-300 -37.5" "position of this base of the panel"
+seta hud_score_size "200 37.5" "size of this panel"
+seta hud_score_bg 1 "enable/disable the background of this panel"
+seta hud_score_border 30 "size of border from the background edges"
+seta hud_score_color "" "optional R G B vector of the panel background color, otherwise use hud default"
+
+seta hud_racetimer 0 "enable/disable this panel"
+seta hud_racetimer_pos "-300 -37.5" "position of this base of the panel"
+seta hud_racetimer_size "200 37.5" "size of this panel"
+seta hud_racetimer_bg 0 "enable/disable the background of this panel"
+seta hud_racetimer_border 30 "size of border from the background edges"
+seta hud_racetimer_color "" "optional R G B vector of the panel background color, otherwise use hud default"
+
+seta hud_vote 0 "enable/disable this panel"
+seta hud_vote_pos "-300 -37.5" "position of this base of the panel"
+seta hud_vote_size "200 37.5" "size of this panel"
+seta hud_vote_bg 0 "enable/disable the background of this panel"
+seta hud_vote_border 30 "size of border from the background edges"
+seta hud_vote_color "" "optional R G B vector of the panel background color, otherwise use hud default"
+seta hud_vote_alreadyvoted_alpha 0.75 "alpha of the vote dialog after you have voted"
+
+seta hud_pressedkeys 0 "enable/disable this panel"
+seta hud_pressedkeys_pos "-300 -37.5" "position of this base of the panel"
+seta hud_pressedkeys_size "200 37.5" "size of this panel"
+seta hud_pressedkeys_bg 0 "enable/disable the background of this panel"
+seta hud_pressedkeys_border 30 "size of border from the background edges"
+seta hud_pressedkeys_color "" "optional R G B vector of the panel background color, otherwise use hud default"
+
+// scoreboard
+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.25 "green color component of the HUD background"
+seta scoreboard_color_bg_b 0.17 "blue color component of the HUD background"
+seta scoreboard_color_bg_team 0.5 "team color multiplier of the HUD 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_alpha_name_self 1 "alpha of player text in scoreboard list of self"
+seta scoreboard_fadeinspeed 10 "speed at which scoreboard fades in, higher is faster (0 = instant)"
+seta scoreboard_fadeoutspeed 5 "speed at which scoreboard fades out, higher is faster (0 = instant)"
+seta scoreboard_highlight 1 "enable highlighting for rows and columns in the scoreboard"
+seta scoreboard_highlight_alpha 0.10 "highlight alpha value (depends on hud_scoreboard_highlight 1)"
+seta scoreboard_highlight_alpha_self 0.25 "self highlight alpha value"
// 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 sv_foginterval 0
// Audio track names (for old-style "cd loop NUMBER" usage)
- set g_cdtracks_remaplist "digital-pursuit breakdown-easy brainsukker chaos-fog infight neuronal-diving subcities thru-the-mirror calling-bogus beast-of-insanity thunder brokenlight brokenlight stairs sixtyfour_ desert3 ninesix sixtyfour_revisited northern-lights" "list used by mapinfo system to automatically assign cdtracks - must match the cd remap command"
- set g_cdtracks_dontusebydefault "digital-pursuit thunder brokenlight" "list used by mapinfo system to automatically assign cdtracks - must be a subset of g_cdtracks_remaplist"
+ set _cdtrack_first "1"
+ alias _cdtrack_0 "g_cdtracks_remaplist \"$g_cdtracks_remaplist $1\""
+ alias _cdtrack_1 "g_cdtracks_remaplist \"$1\"; set _cdtrack_first 0"
+ alias _cdtrack "_cdtrack_$_cdtrack_first $2"
+ set g_cdtracks_remaplist ""
+ exec cdtracks.cfg
+ unset _cdtrack_first
+ unalias _cdtrack_0
+ unalias _cdtrack_1
+ unalias _cdtrack
+
cd remap $g_cdtracks_remaplist
set sv_intermission_cdtrack ""
- set menu_cdtrack brokenlight
+
+ set g_cdtracks_dontusebydefault ""
+ set menu_cdtrack "ninesix"
// maxidle (in seconds): kick players idle for more than that amount of time
set sv_maxidle 0
// CTF capture limit placeholder cvar
set capturelimit 0
-// sbar: font size
-seta sbar_fontsize 11
-seta sbar_fontsize_spec 16
+// hud: font size
+seta hud_fontsize 11
+seta hud_fontsize_spec 16
seta scr_centersize 11
-seta sbar_width 560
-// alias sbar_font "loadfont user1 ${1},gfx/fallback ${2-}; loadfont user2 ${1}-big ${2-}; sbar_columns_set"
+seta hud_width 560
+// alias hud_font "loadfont user1 ${1},gfx/fallback ${2-}; loadfont user2 ${1}-big ${2-}; hud_columns_set"
alias sbar_font "set _requested_sbar_font \"${*}\""
-seta sbar_columns default
+seta hud_columns default
sbar_font gfx/vera-sans 8 12 16 24 32
-seta sbar_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 sbar_showbinds_limit 2 "maximum number of bound keys to show for an action. 0 for unlimited"
+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"
// these entities are not referenced by anything directly, they just represent
// teams and are found by find() when needed
alias allready "sv_cmd allready"
// note: these cvars use weapon NUMBERS. Use the menu to edit this cvar, or look the numbers up in qcsrc/common/constants.qh.
- seta cl_weaponpriority "minstanex rocketlauncher nex grenadelauncher fireball hlac hagar crylink campingrifle uzi electro tuba shotgun laser hook porto" "weapon priority list"
+ seta cl_weaponpriority "minstanex rocketlauncher nex grenadelauncher fireball hlac hagar seeker crylink campingrifle uzi electro tuba shotgun laser hook porto" "weapon priority list"
seta cl_weaponpriority_useforcycling 0 "when set, weapon cycling by the mouse wheel makes use of the weapon priority list"
- seta cl_weaponpriority0 "rocketlauncher grenadelauncher hagar fireball" "use impulse 200 for prev gun from this list, 210 for best gun, 220 for next gun. Default value: explosives"
- seta cl_weaponpriority1 "minstanex nex crylink hlac electro laser" "use impulse 201 for prev gun from this list, 211 for best gun, 221 for next gun. Default value: energy"
- seta cl_weaponpriority2 "minstanex nex campingrifle" "use impulse 202 for prev gun from this list, 212 for best gun, 222 for next gun. Default value: hitscan exact"
- seta cl_weaponpriority3 "minstanex nex campingrifle uzi shotgun" "use impulse 203 for prev gun from this list, 213 for best gun, 223 for next gun. Default value: hitscan all"
- seta cl_weaponpriority4 "grenadelauncher hlac hagar crylink shotgun" "use impulse 204 for prev gun from this list, 214 for best gun, 224 for next gun. Default value: spam weapons"
- seta cl_weaponpriority5 "laser hook porto" "use impulse 205 for prev gun from this list, 215 for best gun, 225 for next gun. Default value: weapons for moving"
+ seta cl_weaponpriority0 "rocketlauncher grenadelauncher hagar seeker fireball" "use impulse 200 for prev gun from this list, 210 for best gun, 220 for next gun. Default value: explosives"
+ seta cl_weaponpriority1 "minstanex nex crylink hlac electro laser" "use impulse 201 for prev gun from this list, 211 for best gun, 221 for next gun. Default value: energy"
+ seta cl_weaponpriority2 "minstanex nex campingrifle" "use impulse 202 for prev gun from this list, 212 for best gun, 222 for next gun. Default value: hitscan exact"
+ seta cl_weaponpriority3 "minstanex nex campingrifle uzi shotgun" "use impulse 203 for prev gun from this list, 213 for best gun, 223 for next gun. Default value: hitscan all"
+ seta cl_weaponpriority4 "grenadelauncher hlac hagar crylink seeker shotgun" "use impulse 204 for prev gun from this list, 214 for best gun, 224 for next gun. Default value: spam weapons"
+ seta cl_weaponpriority5 "laser hook porto" "use impulse 205 for prev gun from this list, 215 for best gun, 225 for next gun. Default value: weapons for moving"
seta cl_weaponpriority6 "" "use impulse 206 for prev gun from this list, 216 for best gun, 226 for next gun"
seta cl_weaponpriority7 "" "use impulse 207 for prev gun from this list, 217 for best gun, 227 for next gun"
seta cl_weaponpriority8 "" "use impulse 208 for prev gun from this list, 218 for best gun, 228 for next gun"
alias ons_map "cl_cmd radar" // legacy alias
alias radar "cl_cmd radar"
-alias sbar_columns_set "cl_cmd sbar_columns_set $*"
-alias sbar_columns_help "cl_cmd sbar_columns_help $*"
+alias hud_columns_set "cl_cmd hud_columns_set $*"
+alias hud_columns_help "cl_cmd hud_columns_help $*"
alias _gl_flashblend_update_00 "gl_flashblend 1"
alias _gl_flashblend_update_10 "gl_flashblend 0"
#ifndef CAMERATEST
}
#endif
- registercvar("sbar_usecsqc", "1");
- registercvar("sbar_columns", "default", CVAR_SAVE);
+ registercvar("hud_usecsqc", "1");
+ registercvar("hud_columns", "default", CVAR_SAVE);
gametype = 0;
- // sbar_fields uses strunzone on the titles!
- for(i = 0; i < MAX_SBAR_FIELDS; ++i)
- sbar_title[i] = strzone("(null)");
+ // hud_fields uses strunzone on the titles!
+ for(i = 0; i < MAX_HUD_FIELDS; ++i)
+ hud_title[i] = strzone("(null)");
postinit = false;
e.ping_packetloss = 0;
e.ping_movementloss = 0;
//e.gotscores = 0; // we might already have the scores...
- SetTeam(e, GetPlayerColor(i)); // will not hurt; later updates come with Sbar_UpdatePlayerTeams
+ SetTeam(e, GetPlayerColor(i)); // will not hurt; later updates come with HUD_UpdatePlayerTeams
RegisterPlayer(e);
- Sbar_UpdatePlayerPos(e);
+ HUD_UpdatePlayerPos(e);
}
}
}
void PostInit(void)
{
print(strcat("PostInit\n maxclients = ", ftos(maxclients), "\n"));
- localcmd(strcat("\nsbar_columns_set ", cvar_string("sbar_columns"), ";\n"));
+ localcmd(strcat("\nhud_columns_set ", cvar_string("hud_columns"), ";\n"));
entity playerchecker;
playerchecker = spawn();
// CSQC_ConsoleCommand : Used to parse commands in the console that have been registered with the "registercmd" function
// Return value should be 1 if CSQC handled the command, otherwise return 0 to have the engine handle it.
float button_zoom;
-void Cmd_Sbar_SetFields(float);
-void Cmd_Sbar_Help(float);
+void Cmd_HUD_SetFields(float);
+void Cmd_HUD_Help(float);
float CSQC_ConsoleCommand(string strMessage)
{
float argc;
print("Usage: cl_cmd COMMAND..., where possible commands are:\n");
print(" settemp cvar value\n");
print(" radar\n");
- print(" sbar_columns_set ...\n");
- print(" sbar_columns_help\n");
+ print(" hud_columns_set ...\n");
+ print(" hud_columns_help\n");
GameCommand_Generic("help");
return;
}
else if(cmd == "radar") {
ons_showmap = !ons_showmap;
}
- else if(cmd == "sbar_columns_set") {
- Cmd_Sbar_SetFields(argc);
+ else if(cmd == "hud_columns_set") {
+ Cmd_HUD_SetFields(argc);
}
- else if(cmd == "sbar_columns_help") {
- Cmd_Sbar_Help(argc);
+ else if(cmd == "hud_columns_help") {
+ Cmd_HUD_Help(argc);
}
#ifdef BLURTEST
else if(cmd == "blurtest") {
// bInputType = 0 is key pressed, 1 is key released, 2 is mouse input.
// In the case of keyboard input, nPrimary is the ascii code, and nSecondary is 0.
// In the case of mouse input, nPrimary is xdelta, nSecondary is ydelta.
+float hudconf_active;
float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary)
{
local float bSkipKey;
bSkipKey = false;
+ if(hudconf_active)
+ if (HUD_Panel_InputEvent(bInputType, nPrimary, nSecondary))
+ return true;
+
if (MapVote_InputEvent(bInputType, nPrimary, nSecondary))
return true;
float isNew;
entity o;
- // damnit -.- don't want to go change every single .sv_entnum in sbar.qc AGAIN
+ // damnit -.- don't want to go change every single .sv_entnum in hud.qc AGAIN
// (no I've never heard of M-x replace-string, sed, or anything like that)
isNew = !self.owner; // workaround for DP bug
n = ReadByte()-1;
}
if(o.sort_prev)
- Sbar_UpdatePlayerPos(o); // if not registered, we cannot do this yet!
+ HUD_UpdatePlayerPos(o); // if not registered, we cannot do this yet!
self.entremove = Ent_RemovePlayerScore;
}
o.(teamscores[i]) = ReadChar();
}
- Sbar_UpdateTeamPos(o);
+ HUD_UpdateTeamPos(o);
}
void Net_Reset()
teamscores_label[i] = strzone(ReadString());
teamscores_flags[i] = ReadByte();
}
- Sbar_InitScores();
+ HUD_InitScores();
Gamemode_Init();
}
g_weaponswitchdelay = ReadByte() / 255.0;
+ g_balance_grenadelauncher_secondary_bouncefactor = ReadCoord();
+ g_balance_grenadelauncher_secondary_bouncestop = ReadCoord();
+
if(!postinit)
PostInit();
}
string keys;
float n, j, k, l;
- if (!sbar_showbinds)
+ if (!hud_showbinds)
return text;
keys = db_get(binddb, command);
keys = strcat(keys, ", ", keynumtostring(k));
++l;
- if (sbar_showbinds_limit > 0 && sbar_showbinds_limit >= l) break;
+ if (hud_showbinds_limit > 0 && hud_showbinds_limit >= l) break;
}
}
}
if ("" == keys) {
- if (sbar_showbinds > 1)
+ if (hud_showbinds > 1)
return strcat(text, " (not bound)");
else
return text;
}
- else if (sbar_showbinds > 1)
+ else if (hud_showbinds > 1)
return strcat(text, " (", keys, ")");
else
return keys;
mi = '-16 -16 -16';
ma = '16 16 16';
break;
+ case WEP_SEEKER: // projectile has a size!
+ mi = '-2 -2 -2';
+ ma = '2 2 2';
+ break;
case WEP_ELECTRO: // projectile has a size!
mi = '0 0 -3';
ma = '0 0 -3';
void CSQC_ctf_hud(void);
void PostInit(void);
void CSQC_Demo_Camera();
-float Sbar_WouldDrawScoreboard ();
+float HUD_WouldDrawScoreboard ();
float view_set;
float camera_mode;
string NextFrameCommand;
vo = '0 0 1' * getstati(STAT_VIEWHEIGHT);
warpzone_fixview_origin = pmove_org + vo;
- warpzone_fixview_angles = input_angles;
+ warpzone_fixview_cl_viewangles = input_angles;
+ warpzone_fixview_angles = view_angles;
WarpZone_FixView();
pmove_org = warpzone_fixview_origin - vo;
- input_angles = warpzone_fixview_angles;
+ input_angles = warpzone_fixview_cl_viewangles;
+ view_angles = warpzone_fixview_angles;
if(cvar("cl_lockview"))
{
- pmove_org = warpzone_fixview_origin = freeze_pmove_org;
- input_angles = freeze_input_angles;
+ pmove_org = freeze_pmove_org;
+ input_angles = view_angles = freeze_input_angles;
R_SetView(VF_ORIGIN, pmove_org + vo);
- R_SetView(VF_ANGLES, input_angles);
+ R_SetView(VF_ANGLES, view_angles);
//R_SetView(VF_CL_VIEWANGLES, input_angles);
}
freeze_pmove_org = pmove_org;
view_set = 1;
}
+ hudconf_active = cvar("_hud_configure");
+ if(hudconf_active)
+ R_SetView(VF_ANGLES, self.angles); // TODO: this should freeze the view as it is, not change it to '0 0 0' or whatever it currently does...
+
vid_width = w;
vid_height = h;
}
}
- sbar_alpha_fg = cvar("sbar_alpha_fg" ) * (1 - cvar("_menu_alpha"));
- sbar_currentammo = cvar("sbar_showcurrentammo");
- sbar_hudselector = cvar("sbar_hudselector");
- sbar_accuracy_hud = cvar_or("sbar_accuracy_hud", 1);
+ hud_alpha_fg = cvar_or("hud_alpha_fg", 1) * (1 - cvar("_menu_alpha"));
+ hud_currentammo = cvar("hud_showcurrentammo");
+ hud_hudselector = cvar("hud_hudselector");
+ hud_accuracy_hud = cvar_or("hud_accuracy_hud", 1);
ColorTranslateMode = cvar("cl_stripcolorcodes");
activeweapon = getstati(STAT_SWITCHWEAPON);
f = cvar("teamplay");
if(f != teamplay)
{
teamplay = f;
- Sbar_InitScores();
+ HUD_InitScores();
}
if(last_weapon != activeweapon) {
// Draw the Crosshair
float scoreboard_active;
- scoreboard_active = Sbar_WouldDrawScoreboard();
+ scoreboard_active = HUD_WouldDrawScoreboard();
R_SetView(VF_DRAWCROSSHAIR, 0); //Make sure engine crosshairs are always hidden
// Draw the Engine Status Bar (the default Quake HUD)
- R_SetView(VF_DRAWENGINESBAR, 0);
+ R_SetView(VF_DRAWENGINEHUD, 0);
// fetch this one only once per frame
- sbar_showbinds = cvar("sbar_showbinds");
- sbar_showbinds_limit = cvar("sbar_showbinds_limit");
+ hud_showbinds = cvar("hud_showbinds");
+ hud_showbinds_limit = cvar("hud_showbinds_limit");
// Update the mouse position
/*
self.draw2d();
self = e;
- // draw radar
- if(
- ons_showmap
- ||
- (
- !scoreboard_active
- &&
- cvar_string("cl_teamradar") != "0"
- &&
- (
- cvar("cl_teamradar") == 2
- ||
- teamplay
- )
- )
- )
- teamradar_view();
-
- // draw sbar
+ // draw hud
if(cvar("r_letterbox") == 0) {
- if (cvar("cl_showpressedkeys")) { // draw pressed keys when spectating and playing
- if(spectatee_status > 0 || cvar("cl_showpressedkeys") >= 2)
- Sbar_DrawPressedKeys();
- }
-
- if (cvar("cl_showspeed"))
- Sbar_ShowSpeed();
- if (cvar("cl_showacceleration"))
- Sbar_ShowAcceleration();
-
- Sbar_DrawCenterPrint(); // draw centerprint messages even if viewsize >= 120
+ HUD_DrawCenterPrint(); // draw centerprint messages even if viewsize >= 120
}
float hud;
CSQC_common_hud();
// crosshair goes VERY LAST
- if(!scoreboard_active && !ons_showmap && !camera_active) {
+ if(!scoreboard_active && !ons_showmap && !camera_active && !hudconf_active) {
// TrueAim check
float shottype;
float bullets, ring_scale;
cvar_set("vid_conheight", h0);
}
+ if(hudconf_active)
+ HUD_Panel_Mouse();
// be safe against triggerbots until everyone has the fixed engine
// this call is meant to overwrite the trace globals by something
// unsuspicious
traceline('0 0 0', '0 0 0', MOVE_WORLDONLY, world);
}
-void Sbar_Draw();
#define spider_h "gfx/vehicles/hud_bg.tga"
#define spider_b "gfx/vehicles/sbot.tga"
#define spider_r "gfx/vehicles/sbot_rpods.tga"
#define spider_g "gfx/vehicles/sbot_mguns.tga"
#define spider_s "gfx/vehicles/shiled.tga"
-
#define spider_a1 "gfx/hud/sb_rocket.tga"
#define spider_a2 "gfx/sb_bullets.tga"
if (sb_showscores)
{
- Sbar_DrawScoreboard();
- Sbar_DrawCenterPrint();
+ HUD_DrawScoreboard();
+ HUD_DrawCenterPrint();
}
}
if (sb_showscores)
{
- Sbar_DrawScoreboard();
- Sbar_DrawCenterPrint();
+ HUD_DrawScoreboard();
+ HUD_DrawCenterPrint();
}
}
if (sb_showscores)
{
- Sbar_DrawScoreboard();
- Sbar_DrawCenterPrint();
+ HUD_DrawScoreboard();
+ HUD_DrawCenterPrint();
}
}
void CSQC_common_hud(void)
{
- // Sbar_SortFrags(); done in Sbar_Draw
+ // HUD_SortFrags(); done in HUD_Draw
float hud;
hud = getstati(STAT_HUD);
switch(hud)
{
case HUD_NORMAL:
- Sbar_Draw();
+ // hud first
+ HUD_Main();
+
+ // is this needed?
+ //HUD_UpdatePlayerTeams();
+
+ if (intermission == 2) // map voting screen
+ {
+ if(sb_showaccuracy && spectatee_status != -1) {
+ HUD_DrawAccuracyStats();
+ }
+ else if(sb_showscores) {
+ HUD_DrawScoreboard();
+ }
+ else
+ HUD_FinaleOverlay();
+
+ HUD_Reset();
+ }
+ else if (sb_showscores || sb_showaccuracy || sb_showscores_force || getstati(STAT_HEALTH) <= 0 || intermission == 1)
+ {
+ if(sb_showaccuracy && spectatee_status != -1)
+ HUD_DrawAccuracyStats();
+ else
+ HUD_DrawScoreboard();
+
+ HUD_Reset();
+ }
break;
case HUD_SPIDERBOT: