// e.g. Xonotic 1.5.1 RC1 will be 15101
set g_xonoticversion git "Xonotic version (formatted for humans)"
- gameversion 100 // 0.1.0
+ gameversion 500 // 0.5.0
gameversion_min 0 // git builds see all versions
gameversion_max 65535 // git builds see all versions
seta crosshair_rifle "" "crosshair to display when wielding the rifle"
seta crosshair_rifle_color "0.85 0.5 0.25" "crosshair color to display when wielding the rifle"
seta crosshair_rifle_alpha 1 "crosshair alpha value to display when wielding the rifle"
- seta crosshair_rifle_size 0.65 "crosshair size when wielding the rifle"
+ seta crosshair_rifle_size 0.5 "crosshair size when wielding the rifle"
seta crosshair_tuba "" "crosshair to display when wielding the tuba"
seta crosshair_tuba_color "0.85 0.5 0.25" "crosshair color to display when wielding the tuba"
seta crosshair_tuba_alpha 1 "crosshair alpha value to display when wielding the tuba"
r_motionblur 0 // motion blur value, default is 0
r_damageblur 0 // motion blur when damaged, default is 0 (removed in Xonotic)
- r_bloom_blur 8
- r_bloom_brighten 3
+ r_bloom_blur 16
+ r_bloom_brighten 2.5
r_bloom_colorexponent 1
r_bloom_colorscale 1
- r_bloom_colorsubtract 0.25
+ r_bloom_colorsubtract 0.15
r_bloom_resolution 320
r_hdr_range 4
// general bot AI cvars
set bot_ai_thinkinterval 0.05
set bot_ai_strategyinterval 5 "How often a new objective is chosen"
- set bot_ai_enemydetectioninterval 3 "How often bots pick a new target"
+ set bot_ai_enemydetectioninterval 2 "How often bots pick a new target"
set bot_ai_enemydetectionradius 10000 "How far bots can see enemies"
set bot_ai_dodgeupdateinterval 0.2 "How often scan for items to dodge. Currently not in use."
set bot_ai_chooseweaponinterval 0.5 "How often the best weapon according to the situation will be chosen"
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 rifle electro rocketlauncher grenadelauncher hagar hlac crylink laser uzi fireball seeker shotgun tuba minelayer" "Desired weapons for far distances ordered by priority"
- set bot_ai_custom_weapon_priority_mid "minstanex rocketlauncher nex fireball seeker grenadelauncher electro uzi rifle crylink hlac hagar shotgun laser tuba minelayer" "Desired weapons for middle distances ordered by priority"
- set bot_ai_custom_weapon_priority_close "minstanex shotgun nex uzi hlac tuba seeker hagar crylink grenadelauncher electro rifle rocketlauncher laser fireball minelayer" "Desired weapons for close distances ordered by priority"
+ set bot_ai_custom_weapon_priority_mid "minstanex rocketlauncher nex fireball seeker grenadelauncher electro uzi crylink hlac hagar shotgun laser rifle tuba minelayer" "Desired weapons for middle distances ordered by priority"
+ set bot_ai_custom_weapon_priority_close "minstanex shotgun nex uzi hlac tuba seeker hagar crylink grenadelauncher electro rocketlauncher laser fireball rifle minelayer" "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.4 "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"
set bot_ai_ignoregoal_timeout 3 "Ignore goals making bots to get stuck in front of a wall for N seconds"
set bot_ai_bunnyhop_skilloffset 7 "Bots with skill equal or greater than this value will perform the \"bunnyhop\" technique"
- set bot_ai_bunnyhop_startdistance 100 "Run to goals located further than this distance"
- set bot_ai_bunnyhop_stopdistance 125 "Stop jumping after reaching this distance to the goal"
+ set bot_ai_bunnyhop_startdistance 200 "Run to goals located further than this distance"
+ set bot_ai_bunnyhop_stopdistance 200 "Stop jumping after reaching this distance to the goal"
set bot_ai_bunnyhop_firstjumpdelay 0.2 "Start running to the goal only if it was seen for more than N seconds"
set bot_god 0 "god mode for bots"
set bot_ai_navigation_jetpack 0 "Enable bots to navigate maps using the jetpack"
set g_balance_ctf_delay_collect 1.0
set g_balance_ctf_damageforcescale 1
- set g_ctf_shield_max_ratio 0 "shield at most 0% of a team from the enemy flag (try: 0.4 for 40%)"
- set g_ctf_shield_min_negscore 20 "shield the player from the flag if he's got -20 points or less"
+ set g_ctf_shield_max_ratio 0 "shield at most this percentage of a team from the enemy flag (try: 0.4 for 40%)"
+ set g_ctf_shield_min_negscore 20 "shield the player from the flag if he's got this negative amount of points or less"
set g_ctf_shield_force 100 "push force of the shield"
// fun for server admins
set g_campaign_forceteam 0 "Forces the player to a given team in campaign mode, 1 = red, 2 = blue, 3 = yellow, 4 = pink"
seta g_campaign_name "xonoticbeta"
set g_campaign_skill 0
- set g_campaignxonotic20_index 0
- set g_campaignxonotic25_index 1
alias singleplayer_start "g_campaign_index 0; set scmenu_campaign_goto 0"
alias singleplayer_continue "set scmenu_campaign_goto -1"
seta hud_panel_weapons_ammo_full_cells 80 "show 100% of the status bar at this ammo count"
seta hud_panel_weapons_ammo_full_rockets 80 "show 100% of the status bar at this ammo count"
seta hud_panel_weapons_ammo_full_fuel 100 "show 100% of the status bar at this ammo count"
+seta hud_panel_weapons_onlyowned 1 "show only owned weapons"
seta hud_panel_ammo_maxammo "40" "when you have this much ammo, the ammo status bar is full"
seta cl_port $cl_port
seta r_showsurfaces $r_showsurfaces
seta r_ambient $r_ambient
- seta skill $skill
+ seta skill 4
seta gl_finish $gl_finish
seta v_kicktime $v_kicktime
seta r_subdivisions_tolerance $r_subdivisions_tolerance
set sv_clones 0 "number of clones a player may make (reset by the \"kill\" command)"
- set cl_handicap 1 "the higher, the more damage you will receive (client setting)"
+ set cl_handicap 1 "the higher, the more damage you will receive (client setting) NOTE: reconnect or use sendcvar command to update the choice."
+
+ seta cl_clippedspectating 1 "movement collision for spectators so that you can't pass through walls and such. (client setting) NOTE: reconnect or use sendcvar command to update the choice."
// must be at the bottom of this file:
// alias for switching the teamselect menu
// exact gloss looks better, e.g. on g-23
r_shadow_glossexact 1
+ r_shadow_glossintensity 1
// use fake light if map has no lightmaps
r_fakelight 1
// draw the background/borders
#define HUD_Panel_DrawBg(alpha)\
if(panel_bg != "0")\
- draw_BorderPicture(panel_pos - '1 1 0' * panel_bg_border, panel_bg, panel_size + '1 1 0' * 2 * panel_bg_border, panel_bg_color, panel_bg_alpha * alpha, '1 1 0' * (panel_bg_border/BORDER_MULTIPLIER));\
-if(highlightedPanel == hud_configure_active_panel && autocvar__hud_configure)\
-{\
- HUD_Panel_HlBorder(panel_bg_border + 1.5 * hlBorderSize, '0 0.5 1', 0.25 * (1 - autocvar__menu_alpha) * alpha);\
-} ENDS_WITH_CURLY_BRACE
+ draw_BorderPicture(panel_pos - '1 1 0' * panel_bg_border, panel_bg, panel_size + '1 1 0' * 2 * panel_bg_border, panel_bg_color, panel_bg_alpha * alpha, '1 1 0' * (panel_bg_border/BORDER_MULTIPLIER))
//basically the same code of draw_ButtonPicture and draw_VertButtonPicture for the menu
void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, float vertical, float baralign, vector theColor, float theAlpha, float drawflag)
void HUD_Weapons(void)
{
- float f, screen_ar;
+ float i, f, screen_ar;
float center_x, center_y;
if(hud != HUD_NORMAL) return;
if(!autocvar__hud_configure)
HUD_Panel_UpdateCvars(weapons);
HUD_Panel_ApplyFadeAlpha();
+ // TODO make this configurable
+ if(weaponorder_bypriority != autocvar_cl_weaponpriority || !weaponorder[0])
+ {
+ float weapon_cnt;
+ if(weaponorder_bypriority)
+ strunzone(weaponorder_bypriority);
+ if(weaponorder_byimpulse)
+ strunzone(weaponorder_byimpulse);
+
+ weaponorder_bypriority = strzone(autocvar_cl_weaponpriority);
+ weaponorder_byimpulse = strzone(W_FixWeaponOrder_BuildImpulseList(W_FixWeaponOrder_ForceComplete(W_NumberWeaponOrder(weaponorder_bypriority))));
+ weaponorder_cmp_str = strcat(" ", weaponorder_byimpulse, " ");
+
+ weapon_cnt = 0;
+ for(i = WEP_FIRST; i <= WEP_LAST; ++i)
+ {
+ self = get_weaponinfo(i);
+ if(self.impulse >= 0)
+ {
+ weaponorder[weapon_cnt] = self;
+ ++weapon_cnt;
+ }
+ }
+ for(i = weapon_cnt; i < WEP_MAXCOUNT; ++i)
+ weaponorder[i] = NULL;
+ heapsort(weapon_cnt, weaponorder_swap, weaponorder_cmp, world);
+
+ weaponorder_cmp_str = string_null;
+ }
+
+ float when, fadetime;
+ when = autocvar_hud_panel_weapons_complainbubble_time;
+ fadetime = autocvar_hud_panel_weapons_complainbubble_fadetime;
+ float weapons_st = getstati(STAT_WEAPONS);
+ float weapon_count;
+ if (autocvar_hud_panel_weapons_onlyowned)
+ {
+ if(autocvar__hud_configure)
+ {
+ if (weapons_st == 0)
+ for(i = 0; i <= WEP_LAST-WEP_FIRST; i += floor((WEP_LAST-WEP_FIRST)/5))
+ weapons_st |= power2of(i);
+ if(menu_enabled != 2)
+ HUD_Panel_DrawBg(1); // also draw the bg of the entire panel
+ }
+
+ vector old_panel_size;
+ for(i = 0; i <= WEP_LAST-WEP_FIRST; ++i)
+ {
+ if(weapons_st & weaponorder[i].weapons)
+ ++weapon_count;
+ }
+ if(!autocvar__hud_configure && (autocvar_hud_panel_weapons_complainbubble && time - complain_weapon_time < when + fadetime))// && complain_weapon >= 0
+ ++weapon_count;
+ if (weapon_count == 0)
+ return;
+ // reduce size of the panel
+ if (panel_size_y > panel_size_x)
+ {
+ old_panel_size_y = panel_size_y;
+ panel_size_y *= weapon_count / WEP_COUNT;
+ panel_pos_y += (old_panel_size_y - panel_size_y) / 2;
+ }
+ else
+ {
+ old_panel_size_x = panel_size_x;
+ panel_size_x *= weapon_count / WEP_COUNT;
+ panel_pos_x += (old_panel_size_x - panel_size_x) / 2;
+ }
+ }
+ else
+ weapon_count = WEP_COUNT;
+
if (timeout && time >= weapontime + timeout && !autocvar__hud_configure)
{
f = (time - (weapontime + timeout)) / timeout_effect_length;
}
}
- float i, weapid, wpnalpha, weapon_cnt;
-
- // TODO make this configurable
- if(weaponorder_bypriority != autocvar_cl_weaponpriority || !weaponorder[0])
- {
- if(weaponorder_bypriority)
- strunzone(weaponorder_bypriority);
- if(weaponorder_byimpulse)
- strunzone(weaponorder_byimpulse);
-
- weaponorder_bypriority = strzone(autocvar_cl_weaponpriority);
- weaponorder_byimpulse = strzone(W_FixWeaponOrder_BuildImpulseList(W_FixWeaponOrder_ForceComplete(W_NumberWeaponOrder(weaponorder_bypriority))));
- weaponorder_cmp_str = strcat(" ", weaponorder_byimpulse, " ");
-
- weapon_cnt = 0;
- for(i = WEP_FIRST; i <= WEP_LAST; ++i)
- {
- self = get_weaponinfo(i);
- if(self.impulse >= 0)
- {
- weaponorder[weapon_cnt] = self;
- ++weapon_cnt;
- }
- }
- for(i = weapon_cnt; i < WEP_MAXCOUNT; ++i)
- weaponorder[i] = NULL;
- heapsort(weapon_cnt, weaponorder_swap, weaponorder_cmp, world);
-
- weaponorder_cmp_str = string_null;
- }
-
HUD_Panel_DrawBg(1);
if(panel_bg_padding)
{
panel_size -= '2 2 0' * panel_bg_padding;
}
+ float weapid, wpnalpha;
+
if(autocvar_hud_panel_weapons_fade)
{
wpnalpha = 3.2 - 2 * (time - weapontime);
float rows, columns;
float aspect = autocvar_hud_panel_weapons_aspect;
rows = panel_size_y/panel_size_x;
- rows = bound(1, floor((sqrt(4 * aspect * rows * WEP_COUNT + rows * rows) + rows + 0.5) / 2), WEP_COUNT);
+ rows = bound(1, floor((sqrt(4 * aspect * rows * weapon_count + rows * rows) + rows + 0.5) / 2), weapon_count);
- columns = ceil(WEP_COUNT/rows);
+ columns = ceil(weapon_count/rows);
float row, column;
float a, type, fullammo;
- float when;
- when = autocvar_hud_panel_weapons_complainbubble_time;
- float fadetime;
- fadetime = autocvar_hud_panel_weapons_complainbubble_fadetime;
vector color;
vector wpnpos;
vector wpnsize;
-
+
vector ammo_color;
float ammo_alpha;
wpnsize = eX * panel_size_x*(1/columns) + eY * panel_size_y*(1/rows);
acc_col[i] = stov(cvar_string(strcat("accuracy_color", ftos(i))));
}
- float weapons_st = getstati(STAT_WEAPONS);
-
for(i = 0; i <= WEP_LAST-WEP_FIRST; ++i)
{
self = weaponorder[i];
if (!self || self.impulse < 0)
continue;
+ if (autocvar_hud_panel_weapons_onlyowned)
+ if (!((weapons_st & self.weapons) || (self.weapon == complain_weapon && time - complain_weapon_time < when + fadetime && autocvar_hud_panel_weapons_complainbubble)))
+ continue;
wpnpos = panel_pos + eX * column * wpnsize_x + eY * row * wpnsize_y;
weapid = self.impulse;
}
}
- void DrawAmmoItem(vector myPos, vector mySize, float itemcode, float currently_selected)
+ void DrawAmmoItem(vector myPos, vector mySize, float itemcode, float currently_selected, float infinite_ammo)
{
float a;
if(autocvar__hud_configure)
a = getstati(GetAmmoStat(itemcode)); // how much ammo do we have of type itemcode?
vector color;
- if(a < 10)
+ if(infinite_ammo)
+ color = '0 0.5 0.75';
+ else if(a < 10)
color = '0.7 0 0';
else
color = '1 1 1';
if(autocvar_hud_panel_ammo_text)
{
- if(a > 0)
+ if(a > 0 || infinite_ammo)
drawstring_aspect(numpos, ftos(a), eX * (2/3) * mySize_x + eY * mySize_y, color, panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
else // "ghost" ammo count
drawstring_aspect(numpos, ftos(a), eX * (2/3) * mySize_x + eY * mySize_y, '0 0 0', panel_fg_alpha * alpha * 0.5, DRAWFLAG_NORMAL);
}
- if(a > 0)
+ if(a > 0 || infinite_ammo)
drawpic_aspect_skin(picpos, GetAmmoPicture(itemcode), '1 1 0' * mySize_y, '1 1 1', panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
else // "ghost" ammo icon
drawpic_aspect_skin(picpos, GetAmmoPicture(itemcode), '1 1 0' * mySize_y, '0 0 0', panel_fg_alpha * alpha * 0.5, DRAWFLAG_NORMAL);
ammo_size_y = newSize;
}
- float i, stat_items, currently_selected;
+ float i, stat_items, currently_selected, infinite_ammo;
+ infinite_ammo = FALSE;
if (autocvar_hud_panel_ammo_onlycurrent)
{
if(autocvar__hud_configure)
{
- DrawAmmoItem(pos, ammo_size, 2, true); //show rockets
+ DrawAmmoItem(pos, ammo_size, 2, true, FALSE); //show rockets
return;
}
stat_items = getstati(STAT_ITEMS);
+ if (stat_items & IT_UNLIMITED_WEAPON_AMMO)
+ infinite_ammo = TRUE;
for (i = 0; i < AMMO_COUNT; ++i) {
currently_selected = stat_items & GetAmmoItemCode(i);
if (currently_selected)
{
- DrawAmmoItem(pos, ammo_size, i, true);
+ DrawAmmoItem(pos, ammo_size, i, true, infinite_ammo);
return;
}
}
}
stat_items = getstati(STAT_ITEMS);
+ if (stat_items & IT_UNLIMITED_WEAPON_AMMO)
+ infinite_ammo = TRUE;
for (i = 0; i < AMMO_COUNT; ++i) {
currently_selected = stat_items & GetAmmoItemCode(i);
- DrawAmmoItem(pos + eX * column * (ammo_size_x + offset_x) + eY * row * (ammo_size_y + offset_y), ammo_size, i, currently_selected);
+ DrawAmmoItem(pos + eX * column * (ammo_size_x + offset_x) + eY * row * (ammo_size_y + offset_y), ammo_size, i, currently_selected, infinite_ammo);
++row;
if(row >= rows)
{
}
}
- void HUD_Centerprint(string s1, string s2, float type, float msg)
+ void HUD_KillCenterprint(string s1, string s2, float type, float msg)
{
float gentle;
gentle = (autocvar_cl_gentle || autocvar_cl_gentle_messages);
pos_y -= fontsize_y;
else
pos_y -= fontsize_y * CENTERPRINT_SPACING/2;
- if (pos_y < panel_pos_y) // check if the next line can be shown
- {
- drawfontscale = '1 1 0';
- return;
- }
+ // NOTE: uncommented so as to not reject messages whenever they are "too large" -- This just continues drawing it anyway.
+ //if (pos_y < panel_pos_y) // check if the next line can be shown
+ //{
+ // drawfontscale = '1 1 0';
+ // return;
+ //}
}
}
current_msg_pos_y = pos_y; // save starting pos (first line) of the current message
}
else
pos_y += fontsize_y * CENTERPRINT_SPACING/2;
- if (!autocvar_hud_panel_centerprint_flip && pos_y > panel_pos_y + panel_size_y - fontsize_y) // check if the next line can be shown
- {
- drawfontscale = '1 1 0';
- return;
- }
+ // NOTE: uncommented so as to not reject messages whenever they are "too large" -- This just continues drawing it anyway.
+ //if (!autocvar_hud_panel_centerprint_flip && pos_y > panel_pos_y + panel_size_y - fontsize_y) // check if the next line can be shown
+ //{
+ // drawfontscale = '1 1 0';
+ // return;
+ //}
}
}
msg_size = pos_y - msg_size;
if(autocvar__con_chat_maximized)
HUD_Chat(); // HUD_DrawPanel(HUD_PANEL_CHAT);
- if(autocvar__hud_configure && tab_panel != -1)
+ if(autocvar__hud_configure)
{
- HUD_Panel_UpdatePosSizeForId(tab_panel)
- drawfill(panel_pos - '1 1 0' * panel_bg_border, panel_size + '2 2 0' * panel_bg_border, '1 1 1', .2, DRAWFLAG_NORMAL);
+ if(tab_panel != -1)
+ {
+ HUD_Panel_UpdatePosSizeForId(tab_panel)
+ drawfill(panel_pos - '1 1 0' * panel_bg_border, panel_size + '2 2 0' * panel_bg_border, '1 1 1', .2, DRAWFLAG_NORMAL);
+ }
+ if(highlightedPanel != -1)
+ {
+ HUD_Panel_UpdatePosSizeForId(highlightedPanel);
+ HUD_Panel_HlBorder(panel_bg_border + 1.5 * hlBorderSize, '0 0.5 1', 0.25 * (1 - autocvar__menu_alpha));
+ }
}
hud_configure_prev = autocvar__hud_configure;