From: Rudolf Polzer Date: Mon, 10 May 2010 11:15:27 +0000 (+0200) Subject: Merge branch 'master' into fruitiex/newpanelhud X-Git-Tag: xonotic-v0.1.0preview~541^2~199 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=61efc693bb60ef3fd9d34f48b377e9b2a9425b85;hp=-c Merge branch 'master' into fruitiex/newpanelhud --- 61efc693bb60ef3fd9d34f48b377e9b2a9425b85 diff --combined defaultXonotic.cfg index 971359eac8,683fa26141..61c10e8ad3 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@@ -193,6 -193,12 +193,12 @@@ seta crosshair_hlac_color_green 0.65 "c 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" @@@ -415,9 -421,9 +421,9 @@@ set bot_ai_keyboard_treshold 0.5 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" @@@ -901,7 -907,7 +907,7 @@@ alias +zoom +button 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" @@@ -915,7 -921,7 +921,7 @@@ alias _weapnext_111 "impulse 15 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" @@@ -1320,120 -1326,34 +1326,120 @@@ con_chatwidth 0. 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" @@@ -1520,11 -1440,22 +1526,22 @@@ alias sethostname "set menu_use_default 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 @@@ -1534,17 -1465,17 +1551,17 @@@ set sv_maxidle_spectatorsareidle // 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 @@@ -1557,14 -1488,14 +1574,14 @@@ set g_jump_grunt 0 "Do you make a grunt 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" @@@ -1592,8 -1523,8 +1609,8 @@@ seta g_start_delay 0 "delay before the 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" diff --combined qcsrc/client/Main.qc index 4462074503,d16e91820e..c47d1388f1 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@@ -105,14 -105,14 +105,14 @@@ void CSQC_Init(void #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; @@@ -321,9 -321,9 +321,9 @@@ void Playerchecker_Think( 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); } } } @@@ -335,7 -335,7 +335,7 @@@ void TrueAim_Init() 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(); @@@ -351,8 -351,8 +351,8 @@@ // 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; @@@ -506,8 -506,8 +506,8 @@@ void GameCommand(string msg 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; } @@@ -526,11 -526,11 +526,11 @@@ 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") { @@@ -615,16 -615,11 +615,16 @@@ // 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; @@@ -675,7 -670,7 +675,7 @@@ void Ent_ReadPlayerScore( 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; @@@ -721,7 -716,7 +721,7 @@@ } 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; } @@@ -752,7 -747,7 +752,7 @@@ void Ent_ReadTeamScore( o.(teamscores[i]) = ReadChar(); } - Sbar_UpdateTeamPos(o); + HUD_UpdateTeamPos(o); } void Net_Reset() @@@ -1000,7 -995,7 +1000,7 @@@ void Ent_ScoresInfo( teamscores_label[i] = strzone(ReadString()); teamscores_flags[i] = ReadByte(); } - Sbar_InitScores(); + HUD_InitScores(); Gamemode_Init(); } @@@ -1022,6 -1017,9 +1022,9 @@@ void Ent_Init( g_weaponswitchdelay = ReadByte() / 255.0; + g_balance_grenadelauncher_secondary_bouncefactor = ReadCoord(); + g_balance_grenadelauncher_secondary_bouncestop = ReadCoord(); + if(!postinit) PostInit(); } @@@ -1303,7 -1301,7 +1306,7 @@@ string getcommandkey(string text, strin string keys; float n, j, k, l; - if (!sbar_showbinds) + if (!hud_showbinds) return text; keys = db_get(binddb, command); @@@ -1321,7 -1319,7 +1324,7 @@@ 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; } } @@@ -1329,12 -1327,12 +1332,12 @@@ } 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; diff --combined qcsrc/client/View.qc index 0184c96765,0557db1160..cb76f7af56 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@@ -291,6 -291,10 +291,10 @@@ float TrueAimCheck( 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'; @@@ -336,7 -340,7 +340,7 @@@ void CSQC_kh_hud(void) 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; @@@ -363,17 -367,19 +367,19 @@@ void CSQC_UpdateView(float w, float h 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; @@@ -391,10 -397,6 +397,10 @@@ 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; @@@ -461,17 -463,17 +467,17 @@@ } } - 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) { @@@ -521,15 -523,15 +527,15 @@@ // 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 /* @@@ -575,9 -577,37 +581,9 @@@ 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; @@@ -597,7 -627,7 +603,7 @@@ 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; @@@ -833,19 -863,19 +839,19 @@@ 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" @@@ -950,8 -980,8 +956,8 @@@ void CSQC_SPIDER_HUD( if (sb_showscores) { - Sbar_DrawScoreboard(); - Sbar_DrawCenterPrint(); + HUD_DrawScoreboard(); + HUD_DrawCenterPrint(); } } @@@ -1020,8 -1050,8 +1026,8 @@@ void CSQC_RAPTOR_HUD( if (sb_showscores) { - Sbar_DrawScoreboard(); - Sbar_DrawCenterPrint(); + HUD_DrawScoreboard(); + HUD_DrawCenterPrint(); } } @@@ -1130,8 -1160,8 +1136,8 @@@ const float STAT_VEHICLESTAT_RELOAD2 = if (sb_showscores) { - Sbar_DrawScoreboard(); - Sbar_DrawCenterPrint(); + HUD_DrawScoreboard(); + HUD_DrawCenterPrint(); } } @@@ -1139,7 -1169,7 +1145,7 @@@ void CSQC_common_hud(void) { - // Sbar_SortFrags(); done in Sbar_Draw + // HUD_SortFrags(); done in HUD_Draw float hud; hud = getstati(STAT_HUD); @@@ -1147,34 -1177,7 +1153,34 @@@ 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: diff --combined qcsrc/client/main.qh index edb0ce1946,d2847af00b..c6a72dcb49 --- a/qcsrc/client/main.qh +++ b/qcsrc/client/main.qh @@@ -63,7 -63,7 +63,7 @@@ const float COLOR_SPECTATOR = 1337 // -------------------------------------------------------------------------- // Scoreboard stuff -#define MAX_SBAR_FIELDS 16 +#define MAX_HUD_FIELDS 16 #define SP_END -1 @@@ -76,13 -76,13 +76,13 @@@ #define SP_SEPARATOR -100 -float sbar_field[MAX_SBAR_FIELDS + 1]; -float sbar_size[MAX_SBAR_FIELDS + 1]; -string sbar_title[MAX_SBAR_FIELDS + 1]; -float sbar_num_fields; +float hud_field[MAX_HUD_FIELDS + 1]; +float hud_size[MAX_HUD_FIELDS + 1]; +string hud_title[MAX_HUD_FIELDS + 1]; +float hud_num_fields; -float sbar_font; -float sbar_bigfont; +float hud_font; +float hud_bigfont; string scores_label[MAX_SCORE]; float scores_flags[MAX_SCORE]; @@@ -95,8 -95,9 +95,8 @@@ float teamscores_flags[MAX_SCORE] #define IS_DECREASING(x) ( !((x)&SFL_LOWER_IS_BETTER) ) -vector sbar_fontsize; -vector sbar_oldfontsize; -vector sbar_fontsize_spec; +vector hud_fontsize; +vector hud_fontsize_spec; float RANKINGS_RECEIVED_CNT; string grecordholder[RANKINGS_CNT]; @@@ -126,8 -127,8 +126,8 @@@ float ignore_minus_zoom float warmup_stage; string getcommandkey(string text, string command); -float sbar_showbinds; -float sbar_showbinds_limit; +float hud_showbinds; +float hud_showbinds_limit; string vote_called_vote; float ready_waiting; @@@ -162,3 -163,6 +162,6 @@@ float calledhooks #define HOOK_END 2 .float ping, ping_packetloss, ping_movementloss; + + float g_balance_grenadelauncher_secondary_bouncefactor; + float g_balance_grenadelauncher_secondary_bouncestop; diff --combined qcsrc/common/constants.qh index 3351913998,cdf92f0709..40b3c0ad34 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@@ -288,9 -288,6 +288,9 @@@ const float HUD_NORMAL = 0 const float HUD_SPIDERBOT = 10; const float HUD_WAKIZASHI = 11; const float HUD_RAPTOR = 12; +const vector eX = '1 0 0'; +const vector eY = '0 1 0'; +const vector eZ = '0 0 1'; const float STAT_VEHICLESTAT_HEALTH = 60; const float STAT_VEHICLESTAT_SHIELD = 61; @@@ -413,6 -410,7 +413,7 @@@ float ATTN_MAX = 3.984375 // this sets sounds and other properties of the projectiles in csqc float PROJECTILE_ELECTRO = 1; float PROJECTILE_ROCKET = 2; + float PROJECTILE_TAG = 3; float PROJECTILE_BULLET = 4; float PROJECTILE_CRYLINK = 5; float PROJECTILE_ELECTRO_BEAM = 6; @@@ -420,6 -418,8 +421,8 @@@ float PROJECTILE_GRENADE = 7 float PROJECTILE_GRENADE_BOUNCING = 8; float PROJECTILE_LASER = 9; float PROJECTILE_HLAC = 10; + float PROJECTILE_SEEKER = 11; + float PROJECTILE_FLAC = 12; float PROJECTILE_PORTO_RED = 13; float PROJECTILE_PORTO_BLUE = 14; float PROJECTILE_HOOKBOMB = 15; @@@ -506,6 -506,3 +509,6 @@@ float WATERLEVEL_SWIMMING = 2 float WATERLEVEL_SUBMERGED = 3; float MAX_SHOT_DISTANCE = 32768; + +// panel hud constants +float panel_cnt = 11; // NOTE: IDs start from 0!