seta hud_panel_ammo_bg_alpha "" "if set to something else than \"\" = override default panel background alpha"
seta hud_panel_ammo_bg_border "" "if set to something else than \"\" = override default size of border around the background"
seta hud_panel_ammo_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
+seta hud_panel_ammo_progressbar "" "use progressbar behind ammo icons"
+seta hud_panel_ammo_progressbar_xoffset "" "percentage of mySize_x to offset progressbar with"
+seta hud_panel_ammo_progressbar_name "" "name of progressbar to use behind ammo icons"
+seta hud_panel_ammo_text "" "show text/icons in the ammo panel"
seta hud_panel_powerups "" "enable/disable this panel"
seta hud_panel_powerups_pos "" "position of this panel"
seta hud_panel_powerups_bg_border "" "if set to something else than \"\" = override default size of border around the background"
seta hud_panel_powerups_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
seta hud_panel_powerups_progressbar "" "enable progressbar in panel"
+seta hud_panel_powerups_progressbar_strength "" "progressbar image for strength"
+seta hud_panel_powerups_progressbar_shield "" "progressbar image for shield"
+seta hud_panel_powerups_text "" "show text/icons in the powerups panel"
seta hud_panel_healtharmor "" "enable/disable this panel, 2 = combined health/armor display"
seta hud_panel_healtharmor_pos "" "position of this panel"
seta hud_panel_healtharmor_bg_border "" "if set to something else than \"\" = override default size of border around the background"
seta hud_panel_healtharmor_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
seta hud_panel_healtharmor_progressbar "" "enable progressbar in panel"
+seta hud_panel_healtharmor_progressbar_health "" "progressbar image for health"
+seta hud_panel_healtharmor_progressbar_armor "" "progressbar image for armor"
+seta hud_panel_healtharmor_text "" "show text/icons in the healtharmor panel"
seta hud_panel_notify "" "enable/disable this panel"
seta hud_panel_notify_pos "" "position of this base of the panel"
set g_balance_electro_secondary_health 5
set g_balance_electro_secondary_damageforcescale 4
set g_balance_electro_secondary_count 1
+set g_balance_electro_secondary_bouncefactor 0.5
+set g_balance_electro_secondary_bouncestop 0.075
set g_balance_electro_combo_damage 80
set g_balance_electro_combo_edgedamage 0
set g_balance_electro_combo_force 200
set g_balance_crylink_primary_animtime 0.3
set g_balance_crylink_primary_ammo 2
set g_balance_crylink_primary_bouncedamagefactor 0.5
-set g_balance_crylink_primary_joinspeed 0
+set g_balance_crylink_primary_joinspread 0
set g_balance_crylink_primary_jointime 0
set g_balance_crylink_primary_joinexplode 0
set g_balance_crylink_primary_joinexplode_damage 0
set g_balance_crylink_secondary_animtime 0.3
set g_balance_crylink_secondary_ammo 2
set g_balance_crylink_secondary_bouncedamagefactor 0.5
-set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_joinspread 0
set g_balance_crylink_secondary_jointime 0
set g_balance_crylink_secondary_joinexplode 0
set g_balance_crylink_secondary_joinexplode_damage 0
set g_balance_nex_secondary 0
set g_balance_nex_secondary_charge 0
set g_balance_nex_secondary_charge_rate 0.1
+set g_balance_nex_secondary_charge_pool 0
+set g_balance_nex_secondary_charge_pool_regen 0.15
+set g_balance_nex_secondary_charge_pool_pause_regen 1
+set g_balance_nex_secondary_charge_pool_pause_health_regen 1
set g_balance_nex_secondary_damage 100
set g_balance_nex_secondary_force 600
set g_balance_nex_secondary_refire 1.5
-////2.4.2 weapons (with some tweaks) VS balanceLeeStricklin
-
-// {{{ weapon replacement
-// NOTE: this only replaces weapons on the map
-// use g_start_weapon_* to also replace the on-startup weapons!
-// example: g_weaponreplace_nex "nex minstanex", then Nexes become MinstaNexes 50% of the times
-// set the cvars to "0" to totally disable a weapon
-set sv_q3acompat_machineshotgunswap 0 "shorthand for swapping uzi and shotgun"
-// }}}
-
// {{{ starting gear
set g_start_weapon_laser -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
set g_start_weapon_shotgun -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
// }}}
// {{{ pickup items
-// Ammo caps copied from balanceFruit
set g_pickup_ammo_anyway 0
set g_pickup_weapons_anyway 1
set g_pickup_shells 20
set g_balance_uzi_speed 18000
set g_balance_uzi_bulletconstant 300 // 13.1qu
// }}}
-// {{{ mortar
+// {{{ mortar // TODO
set g_balance_grenadelauncher_primary_type 0
set g_balance_grenadelauncher_primary_damage 65
set g_balance_grenadelauncher_primary_edgedamage 35
set g_balance_grenadelauncher_bouncestop 0.12
// }}}
// {{{ minelayer // TODO
-set g_balance_minelayer_damage 35
+set g_balance_minelayer_damage 65
set g_balance_minelayer_edgedamage 30
set g_balance_minelayer_force 250
set g_balance_minelayer_radius 175
set g_balance_minelayer_proximityradius 150
set g_balance_minelayer_speed 750
set g_balance_minelayer_lifetime 60
-set g_balance_minelayer_refire 1.5
+set g_balance_minelayer_refire 1.3
set g_balance_minelayer_animtime 0.4
set g_balance_minelayer_ammo 5
set g_balance_minelayer_health 15
set g_balance_minelayer_remote_radius 200
set g_balance_minelayer_remote_force 300
// }}}
-// {{{ electro
+// {{{ electro // TODO
set g_balance_electro_lightning 0
set g_balance_electro_primary_damage 55
set g_balance_electro_primary_edgedamage 5
set g_balance_electro_secondary_speed 900
set g_balance_electro_secondary_speed_up 200
set g_balance_electro_secondary_speed_z 0
-set g_balance_electro_secondary_lifetime 3
set g_balance_electro_secondary_spread 0.05
+set g_balance_electro_secondary_lifetime 3
set g_balance_electro_secondary_refire 0.2
set g_balance_electro_secondary_refire2 1
set g_balance_electro_secondary_animtime 0.3
set g_balance_electro_secondary_health 10
set g_balance_electro_secondary_damageforcescale 4
set g_balance_electro_secondary_count 3
+set g_balance_electro_secondary_bouncefactor 0.5
+set g_balance_electro_secondary_bouncestop 0.075
set g_balance_electro_combo_damage 70
set g_balance_electro_combo_edgedamage 0
set g_balance_electro_combo_force 200
set g_balance_crylink_primary_animtime 0.30008
set g_balance_crylink_primary_ammo 3
set g_balance_crylink_primary_bouncedamagefactor 0.2
-set g_balance_crylink_primary_joinspeed 0
+set g_balance_crylink_primary_joinspread 0
set g_balance_crylink_primary_jointime 0
set g_balance_crylink_primary_joinexplode 0
set g_balance_crylink_primary_joinexplode_damage 0
set g_balance_crylink_secondary_animtime 0.3
set g_balance_crylink_secondary_ammo 3
set g_balance_crylink_secondary_bouncedamagefactor 0.5
-set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_joinspread 0
set g_balance_crylink_secondary_jointime 0
set g_balance_crylink_secondary_joinexplode 0
set g_balance_crylink_secondary_joinexplode_damage 0
set g_balance_crylink_secondary_line_fadetime 2
// }}}
// {{{ nex
-set g_balance_nex_primary_ammo 13
-set g_balance_nex_primary_animtime 0.3
set g_balance_nex_primary_damage 78
set g_balance_nex_primary_force 600
set g_balance_nex_primary_refire 1.505
+set g_balance_nex_primary_animtime 0.3
+set g_balance_nex_primary_ammo 13
set g_balance_nex_primary_damagefalloff_mindist 9999999
set g_balance_nex_primary_damagefalloff_maxdist 9999999
set g_balance_nex_primary_damagefalloff_halflife 9999999
set g_balance_nex_secondary 0
set g_balance_nex_secondary_charge 0
set g_balance_nex_secondary_charge_rate 0.1
+set g_balance_nex_secondary_charge_pool 0
+set g_balance_nex_secondary_charge_pool_regen 0.15
+set g_balance_nex_secondary_charge_pool_pause_regen 1
+set g_balance_nex_secondary_charge_pool_pause_health_regen 1
set g_balance_nex_secondary_damage 80
set g_balance_nex_secondary_force -500
set g_balance_nex_secondary_refire 1.25
set g_balance_hagar_secondary_refire 0.15
set g_balance_hagar_secondary_ammo 2
// }}}
-// {{{ rocketlauncher
+// {{{ rocketlauncher // TODO
set g_balance_rocketlauncher_damage 65
set g_balance_rocketlauncher_edgedamage 25
set g_balance_rocketlauncher_force 360
set g_balance_seeker_missile_ammo 2
set g_balance_seeker_missile_animtime 0.3
set g_balance_seeker_missile_count 8
-set g_balance_seeker_missile_damage 15
+set g_balance_seeker_missile_damage 25
set g_balance_seeker_missile_damageforcescale 4
set g_balance_seeker_missile_decel 0.9
set g_balance_seeker_missile_delay 0.25
+++ /dev/null
-// {{{ starting gear
-set g_start_weapon_laser -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_shotgun -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_uzi -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_grenadelauncher -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_minelayer -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_electro -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_crylink -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_nex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_hagar -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_rocketlauncher -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_porto -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_hook -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_hlac -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_campingrifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_fireball -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_balance_health_start 150
-set g_balance_armor_start 0
-set g_start_ammo_shells 40
-set g_start_ammo_nails 0
-set g_start_ammo_rockets 0
-set g_start_ammo_cells 0
-set g_start_ammo_fuel 0
-set g_warmup_start_health 250 "starting values when being in warmup-stage"
-set g_warmup_start_armor 100 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_shells 50 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_nails 150 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_rockets 50 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_cells 50 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_fuel 0 "starting values when being in warmup-stage"
-set g_lms_start_health 250
-set g_lms_start_armor 100
-set g_lms_start_ammo_shells 50
-set g_lms_start_ammo_nails 150
-set g_lms_start_ammo_rockets 50
-set g_lms_start_ammo_cells 50
-set g_lms_start_ammo_fuel 0
-set g_balance_nix_roundtime 25
-set g_balance_nix_incrtime 1.6
-set g_balance_nix_ammo_shells 15
-set g_balance_nix_ammo_nails 45
-set g_balance_nix_ammo_rockets 15
-set g_balance_nix_ammo_cells 15
-set g_balance_nix_ammo_fuel 0
-set g_balance_nix_ammoincr_shells 2
-set g_balance_nix_ammoincr_nails 6
-set g_balance_nix_ammoincr_rockets 2
-set g_balance_nix_ammoincr_cells 2
-set g_balance_nix_ammoincr_fuel 2
-// }}}
-
-// {{{ pickup items
-set g_pickup_ammo_anyway 0
-set g_pickup_weapons_anyway 0
-set g_pickup_shells 15
-set g_pickup_shells_weapon 15
-set g_pickup_shells_max 999
-set g_pickup_nails 80
-set g_pickup_nails_weapon 80
-set g_pickup_nails_max 999
-set g_pickup_rockets 15
-set g_pickup_rockets_weapon 15
-set g_pickup_rockets_max 999
-set g_pickup_cells 25
-set g_pickup_cells_weapon 25
-set g_pickup_cells_max 999
-set g_pickup_fuel 25
-set g_pickup_fuel_weapon 25
-set g_pickup_fuel_jetpack 50
-set g_pickup_fuel_max 999
-set g_pickup_armorsmall 5
-set g_pickup_armorsmall_max 999
-set g_pickup_armorsmall_anyway 0
-set g_pickup_armormedium 25
-set g_pickup_armormedium_max 999
-set g_pickup_armormedium_anyway 0
-set g_pickup_armorbig 50
-set g_pickup_armorbig_max 999
-set g_pickup_armorbig_anyway 0
-set g_pickup_armorlarge 100
-set g_pickup_armorlarge_max 999
-set g_pickup_armorlarge_anyway 0
-set g_pickup_healthsmall 5
-set g_pickup_healthsmall_max 999
-set g_pickup_healthsmall_anyway 0
-set g_pickup_healthmedium 25
-set g_pickup_healthmedium_max 999
-set g_pickup_healthmedium_anyway 0
-set g_pickup_healthlarge 50
-set g_pickup_healthlarge_max 999
-set g_pickup_healthlarge_anyway 0
-set g_pickup_healthmega 100
-set g_pickup_healthmega_max 999
-set g_pickup_healthmega_anyway 0
-set g_pickup_respawntime_short 15
-set g_pickup_respawntime_medium 20
-set g_pickup_respawntime_long 30
-set g_pickup_respawntime_powerup 120
-set g_pickup_respawntime_weapon 15
-set g_pickup_respawntime_ammo 15
-set g_pickup_respawntimejitter_short 0
-set g_pickup_respawntimejitter_medium 0
-set g_pickup_respawntimejitter_long 0
-set g_pickup_respawntimejitter_powerup 10
-set g_pickup_respawntimejitter_weapon 0
-set g_pickup_respawntimejitter_ammo 0
-// }}}
-
-// {{{ regen/rot
-set g_balance_health_regen 0.1
-set g_balance_health_regenlinear 0
-set g_balance_pause_health_regen 5
-set g_balance_pause_health_regen_spawn 0
-set g_balance_health_rot 0.1
-set g_balance_health_rotlinear 0
-set g_balance_pause_health_rot 5
-set g_balance_pause_health_rot_spawn 10
-set g_balance_health_regenstable 100
-set g_balance_health_rotstable 100
-set g_balance_health_limit 999
-set g_balance_armor_regen 0
-set g_balance_armor_regenlinear 0
-set g_balance_armor_rot 0.1
-set g_balance_armor_rotlinear 0
-set g_balance_pause_armor_rot 5
-set g_balance_pause_armor_rot_spawn 10
-set g_balance_armor_regenstable 100
-set g_balance_armor_rotstable 100
-set g_balance_armor_limit 999
-set g_balance_armor_blockpercent 0.6
-set g_balance_fuel_regen 0.1 "fuel regeneration (only applies if the player owns IT_FUEL_REGEN)"
-set g_balance_fuel_regenlinear 0
-set g_balance_pause_fuel_regen 2 // other than this, fuel uses the health regen counter
-set g_balance_fuel_rot 0.05
-set g_balance_fuel_rotlinear 0
-set g_balance_pause_fuel_rot 5
-set g_balance_pause_fuel_rot_spawn 10
-set g_balance_fuel_regenstable 50
-set g_balance_fuel_rotstable 100
-set g_balance_fuel_limit 999
-// }}}
-
-// {{{ misc
-set g_balance_selfdamagepercent 0.6
-set g_balance_weaponswitchdelay 0.15
-set g_weaponspeedfactor 1 "weapon projectile speed multiplier"
-set g_weaponratefactor 1 "weapon fire rate multiplier"
-set g_weapondamagefactor 1 "weapon damage multiplier"
-set g_weaponforcefactor 1 "weapon force multiplier"
-set g_weaponspreadfactor 1 "weapon spread multiplier"
-set g_balance_firetransfer_time 0.9
-set g_balance_firetransfer_damage 0.8
-set g_throughfloor_damage 0.4
-set g_throughfloor_force 0.7
-set g_projectiles_newton_style 2
-// possible values:
-// 0: absolute velocity projectiles (like Quake)
-// 1: relative velocity projectiles, "Newtonian" (like Tribes 2)
-// 2: relative velocity projectiles, but aim is precorrected so projectiles hit the crosshair (note: strafe rockets then are SLOWER than ones shot while standing, happens in 1 too when aiming correctly which is hard)
-// 3: absolute velocity + player velocity component in shot direction (note: does NOT yield the right relative velocity, but may be good enough, but it is somewhat prone to sniper rockets)
-// 4: just add the player velocity length to the absolute velocity (tZork's sniper rockets)
-set g_projectiles_newton_style_2_minfactor 0.7
-set g_projectiles_newton_style_2_maxfactor 5
-set g_projectiles_spread_style 0
-// possible values:
-// 0: forward + solid sphere (like Quake) - varies velocity
-// 1: forward + flattened solid sphere
-// 2: forward + solid circle
-// 3: forward + normal distribution 3D - varies velocity
-// 4: forward + normal distribution on a plane
-// 5: forward + circle with 1-r falloff
-// 6: forward + circle with 1-r^2 falloff
-// 7: forward + circle with (1-r)(2-r) falloff
-set g_balance_falldamage_deadminspeed 150
-set g_balance_falldamage_minspeed 1400
-set g_balance_falldamage_factor 0.15
-set g_balance_falldamage_maxdamage 25
-// }}}
-
-// {{{ powerups
-set g_balance_powerup_invincible_takedamage 0.2
-set g_balance_powerup_invincible_time 30
-set g_balance_powerup_strength_damage 3
-set g_balance_powerup_strength_force 3
-set g_balance_powerup_strength_time 30
-set g_balance_powerup_strength_selfdamage 1.5
-set g_balance_powerup_strength_selfforce 1.5
-// }}}
-
-// {{{ jetpack/hook
-set g_jetpack_antigravity 0.8 "factor of gravity compensation of the jetpack"
-set g_jetpack_acceleration_side 1200 "acceleration of the jetpack in xy direction"
-set g_jetpack_acceleration_up 600 "acceleration of the jetpack in z direction (note: you have to factor in gravity here, if antigravity is not 1)"
-set g_jetpack_maxspeed_side 1500 "max speed of the jetpack in xy direction"
-set g_jetpack_maxspeed_up 600 "max speed of the jetpack in z direction"
-set g_jetpack_fuel 8 "fuel per second for jetpack"
-set g_jetpack_attenuation 2 "jetpack sound attenuation"
-
-set g_grappling_hook_tarzan 2 // 2: can also pull players
-set g_balance_grapplehook_speed_fly 1800
-set g_balance_grapplehook_speed_pull 2000
-set g_balance_grapplehook_force_rubber 2000
-set g_balance_grapplehook_force_rubber_overstretch 1000
-set g_balance_grapplehook_length_min 50
-set g_balance_grapplehook_stretch 50
-set g_balance_grapplehook_airfriction 0.2
-set g_balance_grapplehook_health 130
-// }}}
-
-// {{{ weapon properties
-// {{{ laser
-set g_balance_laser_primary_damage 35
-set g_balance_laser_primary_edgedamage 10
-set g_balance_laser_primary_force 400
-set g_balance_laser_primary_radius 70
-set g_balance_laser_primary_speed 9000
-set g_balance_laser_primary_spread 0
-set g_balance_laser_primary_refire 0.7
-set g_balance_laser_primary_animtime 0.3
-set g_balance_laser_primary_lifetime 30
-set g_balance_laser_primary_shotangle 0
-set g_balance_laser_primary_delay 0.03
-set g_balance_laser_primary_gauntlet 0
-set g_balance_laser_primary_force_zscale 1
-set g_balance_laser_primary_force_velocitybias 0
-set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
-set g_balance_laser_secondary_damage 35
-set g_balance_laser_secondary_edgedamage 10
-set g_balance_laser_secondary_force 400
-set g_balance_laser_secondary_radius 70
-set g_balance_laser_secondary_speed 9000
-set g_balance_laser_secondary_spread 0
-set g_balance_laser_secondary_refire 0.7
-set g_balance_laser_secondary_animtime 0.3
-set g_balance_laser_secondary_lifetime 30
-set g_balance_laser_secondary_shotangle 0
-set g_balance_laser_secondary_delay 0
-set g_balance_laser_secondary_gauntlet 0
-set g_balance_laser_secondary_force_zscale 1
-set g_balance_laser_secondary_force_velocitybias 0
-// }}
-// {{{ shotgun
-set g_balance_shotgun_primary_bullets 6
-set g_balance_shotgun_primary_damage 9
-set g_balance_shotgun_primary_force 60
-set g_balance_shotgun_primary_spread 0.07
-set g_balance_shotgun_primary_refire 0.5
-set g_balance_shotgun_primary_animtime 0.2
-set g_balance_shotgun_primary_ammo 1
-set g_balance_shotgun_primary_speed 12000
-set g_balance_shotgun_primary_bulletconstant 75 // 3.8qu
-set g_balance_shotgun_secondary 1
-set g_balance_shotgun_secondary_melee_delay 0.35 // match the anim
-set g_balance_shotgun_secondary_melee_range 60
-set g_balance_shotgun_secondary_melee_swing 50
-set g_balance_shotgun_secondary_melee_time 0.1
-set g_balance_shotgun_secondary_damage 115
-set g_balance_shotgun_secondary_force 150
-set g_balance_shotgun_secondary_refire 1.1
-set g_balance_shotgun_secondary_animtime 1
-// }}}
-// {{{ uzi
-set g_balance_uzi_mode 0 // Activates varible spread for sustained & burst mode secondary
-set g_balance_uzi_spread_min 0.02
-set g_balance_uzi_spread_max 0.6
-set g_balance_uzi_spread_add 0.012
-set g_balance_uzi_burst 0 // # of bullets in a burst (if set to 2 or more)
-set g_balance_uzi_burst_refire 0.05 // refire between burst bullets
-set g_balance_uzi_burst_refire2 0.75 // refire after burst
-set g_balance_uzi_burst_spread 0.04
-set g_balance_uzi_burst_damage 18
-set g_balance_uzi_burst_force 50
-set g_balance_uzi_burst_ammo 3
-set g_balance_uzi_first 1
-set g_balance_uzi_first_damage 30
-set g_balance_uzi_first_force 50
-set g_balance_uzi_first_spread 0.015
-set g_balance_uzi_first_refire 0.2
-set g_balance_uzi_first_ammo 1
-set g_balance_uzi_sustained_damage 15
-set g_balance_uzi_sustained_force 27
-set g_balance_uzi_sustained_spread 0.05
-set g_balance_uzi_sustained_refire 0.1
-set g_balance_uzi_sustained_ammo 1
-set g_balance_uzi_speed 18000
-set g_balance_uzi_bulletconstant 115 // 13.1qu
-// }}}
-// {{{ mortar
-set g_balance_grenadelauncher_primary_type 0
-set g_balance_grenadelauncher_primary_damage 70
-set g_balance_grenadelauncher_primary_edgedamage 38
-set g_balance_grenadelauncher_primary_force 400
-set g_balance_grenadelauncher_primary_radius 140
-set g_balance_grenadelauncher_primary_speed 2000
-set g_balance_grenadelauncher_primary_speed_up 200
-set g_balance_grenadelauncher_primary_speed_z 0
-set g_balance_grenadelauncher_primary_spread 0
-set g_balance_grenadelauncher_primary_lifetime 30
-set g_balance_grenadelauncher_primary_lifetime2 1
-set g_balance_grenadelauncher_primary_refire 0.8
-set g_balance_grenadelauncher_primary_animtime 0.3
-set g_balance_grenadelauncher_primary_ammo 2
-set g_balance_grenadelauncher_primary_health 25
-set g_balance_grenadelauncher_primary_damageforcescale 4
-set g_balance_grenadelauncher_primary_remote_minbouncecnt 0
-set g_balance_grenadelauncher_secondary_type 1
-set g_balance_grenadelauncher_secondary_damage 70
-set g_balance_grenadelauncher_secondary_edgedamage 38
-set g_balance_grenadelauncher_secondary_force 400
-set g_balance_grenadelauncher_secondary_radius 140
-set g_balance_grenadelauncher_secondary_speed 1400
-set g_balance_grenadelauncher_secondary_speed_up 200
-set g_balance_grenadelauncher_secondary_speed_z 0
-set g_balance_grenadelauncher_secondary_spread 0
-set g_balance_grenadelauncher_secondary_lifetime 2.5
-set g_balance_grenadelauncher_secondary_lifetime2 0
-set g_balance_grenadelauncher_secondary_refire 0.7
-set g_balance_grenadelauncher_secondary_animtime 0.3
-set g_balance_grenadelauncher_secondary_ammo 2
-set g_balance_grenadelauncher_secondary_health 10
-set g_balance_grenadelauncher_secondary_damageforcescale 4
-set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
-
-set g_balance_grenadelauncher_bouncefactor 0.5
-set g_balance_grenadelauncher_bouncestop 0.075
-// }}}
-// {{{ minelayer // TODO
-set g_balance_minelayer_damage 35
-set g_balance_minelayer_edgedamage 30
-set g_balance_minelayer_force 250
-set g_balance_minelayer_radius 175
-set g_balance_minelayer_proximityradius 150
-set g_balance_minelayer_speed 750
-set g_balance_minelayer_lifetime 60
-set g_balance_minelayer_refire 1.5
-set g_balance_minelayer_animtime 0.4
-set g_balance_minelayer_ammo 5
-set g_balance_minelayer_health 15
-set g_balance_minelayer_limit 4 // 0 disables the limit
-set g_balance_minelayer_protection 1 // don't explode if the mine would hurt the owner or a team mate
-set g_balance_minelayer_damageforcescale 0
-set g_balance_minelayer_detonatedelay -1 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_minelayer_time 0.5
-set g_balance_minelayer_remote_damage 45
-set g_balance_minelayer_remote_edgedamage 40
-set g_balance_minelayer_remote_radius 200
-set g_balance_minelayer_remote_force 300
-// }}}
-// {{{ electro
-set g_balance_electro_lightning 0
-set g_balance_electro_primary_damage 65
-set g_balance_electro_primary_edgedamage 0
-set g_balance_electro_primary_force 200
-set g_balance_electro_primary_force_up 0
-set g_balance_electro_primary_radius 150
-set g_balance_electro_primary_comboradius 0
-set g_balance_electro_primary_speed 2000
-set g_balance_electro_primary_spread 0
-set g_balance_electro_primary_lifetime 30
-set g_balance_electro_primary_refire 0.6
-set g_balance_electro_primary_animtime 0.3
-set g_balance_electro_primary_ammo 2
-set g_balance_electro_primary_range 0
-set g_balance_electro_primary_falloff_mindist 255 // 0.3 * radius
-set g_balance_electro_primary_falloff_maxdist 850
-set g_balance_electro_primary_falloff_halflifedist 425
-set g_balance_electro_secondary_damage 50
-set g_balance_electro_secondary_edgedamage 0
-set g_balance_electro_secondary_force 200
-set g_balance_electro_secondary_radius 150
-set g_balance_electro_secondary_speed 900
-set g_balance_electro_secondary_speed_up 200
-set g_balance_electro_secondary_speed_z 0
-set g_balance_electro_secondary_spread 0
-set g_balance_electro_secondary_lifetime 5
-set g_balance_electro_secondary_refire 0.3
-set g_balance_electro_secondary_refire2 0
-set g_balance_electro_secondary_animtime 0.3
-set g_balance_electro_secondary_ammo 2
-set g_balance_electro_secondary_health 5
-set g_balance_electro_secondary_damageforcescale 4
-set g_balance_electro_secondary_count 1
-set g_balance_electro_combo_damage 80
-set g_balance_electro_combo_edgedamage 0
-set g_balance_electro_combo_force 200
-set g_balance_electro_combo_radius 250
-set g_balance_electro_combo_comboradius 0
-set g_balance_electro_combo_speed 2000
-// }}}
-// {{{ crylink
-set g_balance_crylink_primary_damage 18
-set g_balance_crylink_primary_edgedamage 0
-set g_balance_crylink_primary_force -55
-set g_balance_crylink_primary_radius 80
-set g_balance_crylink_primary_speed 7000
-set g_balance_crylink_primary_spread 0.03
-set g_balance_crylink_primary_shots 4
-set g_balance_crylink_primary_bounces 1
-set g_balance_crylink_primary_refire 0.4
-set g_balance_crylink_primary_animtime 0.3
-set g_balance_crylink_primary_ammo 2
-set g_balance_crylink_primary_bouncedamagefactor 0.5
-set g_balance_crylink_primary_joinspeed 0
-set g_balance_crylink_primary_jointime 0
-set g_balance_crylink_primary_joinexplode 0
-set g_balance_crylink_primary_joinexplode_damage 0
-set g_balance_crylink_primary_joinexplode_edgedamage 0
-set g_balance_crylink_primary_joinexplode_radius 0
-set g_balance_crylink_primary_joinexplode_force 0
-set g_balance_crylink_primary_linkexplode 1
-
-set g_balance_crylink_primary_middle_lifetime 5 // range: 35000 full, fades to 70000
-set g_balance_crylink_primary_middle_fadetime 5
-set g_balance_crylink_primary_other_lifetime 0.1 // range: 700 full, fades to 2450
-set g_balance_crylink_primary_other_fadetime 0.25
-
-set g_balance_crylink_secondary 1
-set g_balance_crylink_secondary_damage 18
-set g_balance_crylink_secondary_edgedamage 0
-set g_balance_crylink_secondary_force -55
-set g_balance_crylink_secondary_radius 3
-set g_balance_crylink_secondary_speed 7000
-set g_balance_crylink_secondary_spread 0.08
-set g_balance_crylink_secondary_shots 7
-set g_balance_crylink_secondary_bounces 0
-set g_balance_crylink_secondary_refire 0.5
-set g_balance_crylink_secondary_animtime 0.3
-set g_balance_crylink_secondary_ammo 2
-set g_balance_crylink_secondary_bouncedamagefactor 0.5
-set g_balance_crylink_secondary_joinspeed 0
-set g_balance_crylink_secondary_jointime 0
-set g_balance_crylink_secondary_joinexplode 0
-set g_balance_crylink_secondary_joinexplode_damage 0
-set g_balance_crylink_secondary_joinexplode_edgedamage 0
-set g_balance_crylink_secondary_joinexplode_radius 0
-set g_balance_crylink_secondary_joinexplode_force 0
-set g_balance_crylink_secondary_linkexplode 1
-
-set g_balance_crylink_secondary_middle_lifetime 5 // range: 35000 full, fades to 70000
-set g_balance_crylink_secondary_middle_fadetime 5
-set g_balance_crylink_secondary_line_lifetime 2 // range: 35000 full, fades to 70000
-set g_balance_crylink_secondary_line_fadetime 2
-// }}}
-// {{{ nex
-set g_balance_nex_primary_damage 90
-set g_balance_nex_primary_force 200
-set g_balance_nex_primary_refire 1.5
-set g_balance_nex_primary_animtime 0.3
-set g_balance_nex_primary_ammo 5
-set g_balance_nex_primary_damagefalloff_mindist 1000
-set g_balance_nex_primary_damagefalloff_maxdist 3000
-set g_balance_nex_primary_damagefalloff_halflife 1500
-set g_balance_nex_primary_damagefalloff_forcehalflife 1500
-
-set g_balance_nex_secondary 0
-set g_balance_nex_secondary_charge 0
-set g_balance_nex_secondary_charge_rate 0.1
-set g_balance_nex_secondary_damage 90
-set g_balance_nex_secondary_force 200
-set g_balance_nex_secondary_refire 1.5
-set g_balance_nex_secondary_animtime 0.3
-set g_balance_nex_secondary_ammo 5
-set g_balance_nex_secondary_damagefalloff_mindist 1000
-set g_balance_nex_secondary_damagefalloff_maxdist 3000
-set g_balance_nex_secondary_damagefalloff_halflife 1500
-set g_balance_nex_secondary_damagefalloff_forcehalflife 1500
-
-set g_balance_nex_charge 0
-set g_balance_nex_charge_mindmg 40
-set g_balance_nex_charge_start 0
-set g_balance_nex_charge_rate 0.1
-set g_balance_nex_charge_limit 0.5
-set g_balance_nex_charge_rot_rate 0
-set g_balance_nex_charge_rot_pause 0 // Dont rot down untill this long after release of charge button
-set g_balance_nex_charge_shot_multiplier 0.5
-set g_balance_nex_charge_velocity_rate 0.2
-set g_balance_nex_charge_minspeed 400
-set g_balance_nex_charge_maxspeed 1000
-// }}}
-// {{{ minstanex
-set g_balance_minstanex_refire 1
-set g_balance_minstanex_animtime 0.3
-set g_balance_minstanex_ammo 10
-// }}}
-// {{{ hagar
-set g_balance_hagar_primary_damage 37
-set g_balance_hagar_primary_edgedamage 15
-set g_balance_hagar_primary_force 100
-set g_balance_hagar_primary_radius 65
-set g_balance_hagar_primary_spread 0.010
-set g_balance_hagar_primary_speed 3000
-set g_balance_hagar_primary_lifetime 30
-set g_balance_hagar_primary_refire 0.15
-set g_balance_hagar_primary_ammo 1
-set g_balance_hagar_secondary 1
-set g_balance_hagar_secondary_damage 37
-set g_balance_hagar_secondary_edgedamage 15
-set g_balance_hagar_secondary_force 100
-set g_balance_hagar_secondary_radius 65
-set g_balance_hagar_secondary_spread 0.015
-set g_balance_hagar_secondary_speed 1400
-set g_balance_hagar_secondary_lifetime_min 30
-set g_balance_hagar_secondary_lifetime_rand 0
-set g_balance_hagar_secondary_refire 0.15
-set g_balance_hagar_secondary_ammo 1
-// }}}
-// {{{ rocketlauncher
-set g_balance_rocketlauncher_damage 105
-set g_balance_rocketlauncher_edgedamage 40
-set g_balance_rocketlauncher_force 600
-set g_balance_rocketlauncher_radius 150
-set g_balance_rocketlauncher_speed 850
-set g_balance_rocketlauncher_speedaccel 0
-set g_balance_rocketlauncher_speedstart 850
-set g_balance_rocketlauncher_lifetime 30
-set g_balance_rocketlauncher_refire 1
-set g_balance_rocketlauncher_animtime 0.3
-set g_balance_rocketlauncher_ammo 3
-set g_balance_rocketlauncher_health 40
-set g_balance_rocketlauncher_damageforcescale 4
-set g_balance_rocketlauncher_detonatedelay 0.2 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_rocketlauncher_guiderate 90 // max degrees per second
-set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
-set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
-set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
-set g_balance_rocketlauncher_guidestop 0 // stop guiding when firing again
-set g_balance_rocketlauncher_remote_damage 105
-set g_balance_rocketlauncher_remote_edgedamage 40
-set g_balance_rocketlauncher_remote_radius 150
-set g_balance_rocketlauncher_remote_force 600
-// }}}
-// {{{ porto
-set g_balance_porto_primary_refire 1.5
-set g_balance_porto_primary_animtime 0.3
-set g_balance_porto_primary_speed 5000
-set g_balance_porto_primary_lifetime 30
-set g_balance_portal_health 200 // these get recharged whenever the portal is used
-set g_balance_portal_lifetime 15 // these get recharged whenever the portal is used
-// }}}
-// {{{ hook
-set g_balance_hook_primary_fuel 5 // hook monkeys set 0
-set g_balance_hook_primary_refire 0 // hook monkeys set 0
-set g_balance_hook_primary_animtime 0.3 // good shoot anim
-set g_balance_hook_primary_hooked_time_max 0 // infinite
-set g_balance_hook_primary_hooked_time_free 2 // 2s being hooked are free
-set g_balance_hook_primary_hooked_fuel 5 // fuel per second hooked
-set g_balance_hook_secondary_damage 25 // not much
-set g_balance_hook_secondary_edgedamage 5 // not much
-set g_balance_hook_secondary_radius 500 // LOTS
-set g_balance_hook_secondary_force -2000 // LOTS
-set g_balance_hook_secondary_ammo 50 // a whole pack
-set g_balance_hook_secondary_lifetime 30 // infinite
-set g_balance_hook_secondary_speed 0 // not much throwing
-set g_balance_hook_secondary_gravity 5 // fast falling
-set g_balance_hook_secondary_refire 3 // don't drop too many bombs...
-set g_balance_hook_secondary_animtime 0.3 // good shoot anim
-set g_balance_hook_secondary_power 3 // effect behaves like a square function
-set g_balance_hook_secondary_duration 1.5 // effect runs for three seconds
-// }}}
-// {{{ hlac
-set g_balance_hlac_primary_spread_min 0.01
-set g_balance_hlac_primary_spread_max 0.25
-set g_balance_hlac_primary_spread_add 0.0045
-set g_balance_hlac_primary_spread_crouchmod 0.25
-
-set g_balance_hlac_primary_damage 23
-set g_balance_hlac_primary_edgedamage 10
-set g_balance_hlac_primary_force 100
-set g_balance_hlac_primary_radius 70
-set g_balance_hlac_primary_speed 9000
-set g_balance_hlac_primary_lifetime 5
-
-set g_balance_hlac_primary_refire 0.1
-set g_balance_hlac_primary_animtime 0.4
-set g_balance_hlac_primary_ammo 1
-
-set g_balance_hlac_secondary 1
-set g_balance_hlac_secondary_spread 0.15
-set g_balance_hlac_secondary_spread_crouchmod 0.5
-
-set g_balance_hlac_secondary_damage 23
-set g_balance_hlac_secondary_edgedamage 10
-set g_balance_hlac_secondary_force 100
-set g_balance_hlac_secondary_radius 70
-set g_balance_hlac_secondary_speed 9000
-set g_balance_hlac_secondary_lifetime 5
-
-set g_balance_hlac_secondary_refire 1
-set g_balance_hlac_secondary_animtime 0.3
-set g_balance_hlac_secondary_ammo 10
-set g_balance_hlac_secondary_shots 6
-// }}}
-// {{{ campingrifle
-set g_balance_campingrifle_magazinecapacity 0
-set g_balance_campingrifle_reloadtime 2 // matches reload anim
-set g_balance_campingrifle_auto_reload_after_changing_weapons 0
-set g_balance_campingrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
-set g_balance_campingrifle_primary_tracer 0
-set g_balance_campingrifle_primary_damage 50
-set g_balance_campingrifle_primary_headshotaddeddamage 50
-set g_balance_campingrifle_primary_spread 0
-set g_balance_campingrifle_primary_force 0
-set g_balance_campingrifle_primary_speed 35000
-set g_balance_campingrifle_primary_lifetime 5
-set g_balance_campingrifle_primary_refire 0.7
-set g_balance_campingrifle_primary_animtime 0.3
-set g_balance_campingrifle_primary_ammo 10
-set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
-set g_balance_campingrifle_primary_burstcost 0.35 // require same cooldown as secondary, note it's smaller than primary refire time
-set g_balance_campingrifle_primary_bullethail 0
-set g_balance_campingrifle_secondary 1
-set g_balance_campingrifle_secondary_tracer 0
-set g_balance_campingrifle_secondary_damage 15
-set g_balance_campingrifle_secondary_headshotaddeddamage 25
-set g_balance_campingrifle_secondary_spread 0.02
-set g_balance_campingrifle_secondary_force 0
-set g_balance_campingrifle_secondary_speed 20000
-set g_balance_campingrifle_secondary_lifetime 5
-set g_balance_campingrifle_secondary_refire 0.1
-set g_balance_campingrifle_secondary_animtime 0.1
-set g_balance_campingrifle_secondary_ammo 4
-set g_balance_campingrifle_secondary_bulletconstant 130 // 18.3qu
-set g_balance_campingrifle_secondary_burstcost 0.35
-set g_balance_campingrifle_secondary_bullethail 0
-// }}}
-// {{{ tuba
-set g_balance_tuba_refire 0.05
-set g_balance_tuba_animtime 0.05
-set g_balance_tuba_attenuation 0.5
-set g_balance_tuba_volume 1
-set g_balance_tuba_fadetime 0.25
-set g_balance_tuba_damage 5
-set g_balance_tuba_edgedamage 0
-set g_balance_tuba_radius 200
-set g_balance_tuba_force 40
-// }}}
-// {{{ fireball
-set g_balance_fireball_primary_ammo 40
-set g_balance_fireball_primary_animtime 0.15
-set g_balance_fireball_primary_bfgdamage 100
-set g_balance_fireball_primary_bfgforce 0
-set g_balance_fireball_primary_bfgradius 1000
-set g_balance_fireball_primary_damage 200
-set g_balance_fireball_primary_damageforcescale 4
-set g_balance_fireball_primary_edgedamage 0
-set g_balance_fireball_primary_force 700
-set g_balance_fireball_primary_health 50
-set g_balance_fireball_primary_laserburntime 0.5
-set g_balance_fireball_primary_laserdamage 80
-set g_balance_fireball_primary_laseredgedamage 20
-set g_balance_fireball_primary_laserradius 256
-set g_balance_fireball_primary_lifetime 15
-set g_balance_fireball_primary_radius 200
-set g_balance_fireball_primary_refire 5
-set g_balance_fireball_primary_refire2 0
-set g_balance_fireball_primary_speed 650
-set g_balance_fireball_primary_spread 0
-set g_balance_fireball_secondary_ammo 5
-set g_balance_fireball_secondary_animtime 0.3
-set g_balance_fireball_secondary_damage 40
-set g_balance_fireball_secondary_damageforcescale 4
-set g_balance_fireball_secondary_damagetime 5
-set g_balance_fireball_secondary_force 100
-set g_balance_fireball_secondary_laserburntime 0.5
-set g_balance_fireball_secondary_laserdamage 50
-set g_balance_fireball_secondary_laseredgedamage 20
-set g_balance_fireball_secondary_laserradius 110
-set g_balance_fireball_secondary_lifetime 7
-set g_balance_fireball_secondary_refire 2
-set g_balance_fireball_secondary_speed 900
-set g_balance_fireball_secondary_speed_up 100
-set g_balance_fireball_secondary_speed_z 0
-set g_balance_fireball_secondary_spread 0
-// }}}
-// {{{ seeker
-set g_balance_seeker_flac_ammo 0.5
-set g_balance_seeker_flac_animtime 0.1
-set g_balance_seeker_flac_damage 15
-set g_balance_seeker_flac_edgedamage 10
-set g_balance_seeker_flac_force 50
-set g_balance_seeker_flac_lifetime 0.1
-set g_balance_seeker_flac_lifetime_rand 0.05
-set g_balance_seeker_flac_radius 100
-set g_balance_seeker_flac_refire 0.1
-set g_balance_seeker_flac_speed 3000
-set g_balance_seeker_flac_speed_up 1000
-set g_balance_seeker_flac_speed_z 0
-set g_balance_seeker_flac_spread 0.4
-set g_balance_seeker_missile_accel 1.05
-set g_balance_seeker_missile_ammo 2
-set g_balance_seeker_missile_animtime 0.3
-set g_balance_seeker_missile_count 4
-set g_balance_seeker_missile_damage 40
-set g_balance_seeker_missile_damageforcescale 4
-set g_balance_seeker_missile_decel 0.9
-set g_balance_seeker_missile_delay 0.25
-set g_balance_seeker_missile_edgedamage 10
-set g_balance_seeker_missile_force 250
-set g_balance_seeker_missile_health 5
-set g_balance_seeker_missile_lifetime 15
-set g_balance_seeker_missile_proxy 0
-set g_balance_seeker_missile_proxy_delay 0.2
-set g_balance_seeker_missile_proxy_maxrange 45
-set g_balance_seeker_missile_radius 80
-set g_balance_seeker_missile_refire 0.5
-set g_balance_seeker_missile_smart 1
-set g_balance_seeker_missile_smart_mindist 800
-set g_balance_seeker_missile_smart_trace_max 2500
-set g_balance_seeker_missile_smart_trace_min 1000
-set g_balance_seeker_missile_speed 700
-set g_balance_seeker_missile_speed_accel 0
-set g_balance_seeker_missile_speed_up 300
-set g_balance_seeker_missile_speed_z 0
-set g_balance_seeker_missile_speed_max 1250
-set g_balance_seeker_missile_spread 0
-set g_balance_seeker_missile_turnrate 0.65
-set g_balance_seeker_tag_ammo 1
-set g_balance_seeker_tag_animtime 0.3
-set g_balance_seeker_tag_damageforcescale 4
-set g_balance_seeker_tag_health 5
-set g_balance_seeker_tag_lifetime 15
-set g_balance_seeker_tag_refire 0.7
-set g_balance_seeker_tag_speed 9000
-set g_balance_seeker_tag_spread 0
-// End new seeker
set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
set g_start_weapon_porto -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
set g_start_weapon_hook -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_hlac 0 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
+set g_start_weapon_hlac -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
set g_start_weapon_campingrifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_fireball 0 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_seeker 0 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
+set g_start_weapon_fireball -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
+set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
set g_balance_health_start 125
set g_balance_armor_start 0
-set g_start_ammo_shells 30
+set g_start_ammo_shells 15
set g_start_ammo_nails 0
set g_start_ammo_rockets 0
set g_start_ammo_cells 0
// {{{ pickup items
set g_pickup_ammo_anyway 1
set g_pickup_weapons_anyway 1
-set g_pickup_shells 30
-set g_pickup_shells_weapon 30
-set g_pickup_shells_max 120
-set g_pickup_nails 80
-set g_pickup_nails_weapon 80
-set g_pickup_nails_max 400
-set g_pickup_rockets 30
-set g_pickup_rockets_weapon 30
-set g_pickup_rockets_max 120
+set g_pickup_shells 15
+set g_pickup_shells_weapon 15
+set g_pickup_shells_max 100
+set g_pickup_nails 75
+set g_pickup_nails_weapon 75
+set g_pickup_nails_max 300
+set g_pickup_rockets 40
+set g_pickup_rockets_weapon 40
+set g_pickup_rockets_max 160
set g_pickup_cells 50
set g_pickup_cells_weapon 50
set g_pickup_cells_max 200
set g_pickup_fuel 25
set g_pickup_fuel_weapon 25
set g_pickup_fuel_jetpack 50
-set g_pickup_fuel_max 999
+set g_pickup_fuel_max 100
set g_pickup_armorsmall 10
set g_pickup_armorsmall_max 200
set g_pickup_armorsmall_anyway 1
// {{{ laser
set g_balance_laser_primary_damage 25
set g_balance_laser_primary_edgedamage 10
-set g_balance_laser_primary_force 400
+set g_balance_laser_primary_force 175
set g_balance_laser_primary_radius 70
set g_balance_laser_primary_speed 12000
set g_balance_laser_primary_spread 0
set g_balance_laser_primary_shotangle 0
set g_balance_laser_primary_delay 0.03
set g_balance_laser_primary_gauntlet 0
-set g_balance_laser_primary_force_zscale 1
-set g_balance_laser_primary_force_velocitybias 0
+set g_balance_laser_primary_force_zscale 2 // 350 upforce
+set g_balance_laser_primary_force_velocitybias 0.3
set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
set g_balance_laser_secondary_damage 25
set g_balance_laser_secondary_edgedamage 10
set g_balance_laser_secondary_shotangle -90
set g_balance_laser_secondary_delay 0
set g_balance_laser_secondary_gauntlet 0
-set g_balance_laser_secondary_force_zscale 1
+set g_balance_laser_secondary_force_zscale 1.25
set g_balance_laser_secondary_force_velocitybias 0
// }}}
// {{{ shotgun
-set g_balance_shotgun_primary_bullets 6
-set g_balance_shotgun_primary_damage 8
+set g_balance_shotgun_primary_bullets 10
+set g_balance_shotgun_primary_damage 6
set g_balance_shotgun_primary_force 15
set g_balance_shotgun_primary_spread 0.11
set g_balance_shotgun_primary_refire 0.5
set g_balance_uzi_burst_force 50
set g_balance_uzi_burst_ammo 3
set g_balance_uzi_first 1
-set g_balance_uzi_first_damage 12
-set g_balance_uzi_first_force 5
-set g_balance_uzi_first_spread 0.015
-set g_balance_uzi_first_refire 0.15
+set g_balance_uzi_first_damage 18
+set g_balance_uzi_first_force 20
+set g_balance_uzi_first_spread 0.03
+set g_balance_uzi_first_refire 0.2
set g_balance_uzi_first_ammo 1
-set g_balance_uzi_sustained_damage 7
-set g_balance_uzi_sustained_force 5
-set g_balance_uzi_sustained_spread 0.05
-set g_balance_uzi_sustained_refire 0.075
+set g_balance_uzi_sustained_damage 10
+set g_balance_uzi_sustained_force 10
+set g_balance_uzi_sustained_spread 0.08
+set g_balance_uzi_sustained_refire 0.1
set g_balance_uzi_sustained_ammo 1
set g_balance_uzi_speed 18000
set g_balance_uzi_bulletconstant 115 // 13.1qu
set g_balance_grenadelauncher_primary_edgedamage 38
set g_balance_grenadelauncher_primary_force 400
set g_balance_grenadelauncher_primary_radius 140
-set g_balance_grenadelauncher_primary_speed 2200
+set g_balance_grenadelauncher_primary_speed 2000
set g_balance_grenadelauncher_primary_speed_up 220
set g_balance_grenadelauncher_primary_speed_z 0
set g_balance_grenadelauncher_primary_spread 0
set g_balance_grenadelauncher_secondary_ammo 2
set g_balance_grenadelauncher_secondary_health 70
set g_balance_grenadelauncher_secondary_damageforcescale 4
-set g_balance_grenadelauncher_secondary_remote_detonateprimary 1
+set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
set g_balance_grenadelauncher_bouncefactor 0.5
set g_balance_grenadelauncher_bouncestop 0.075
set g_balance_minelayer_remote_radius 200
set g_balance_minelayer_remote_force 300
// }}}
-// {{{ electro
-set g_balance_electro_lightning 0
-set g_balance_electro_primary_damage 65
+// {{{ electro // TODO
+set g_balance_electro_lightning 1
+set g_balance_electro_primary_damage 90
set g_balance_electro_primary_edgedamage 0
-set g_balance_electro_primary_force 200
-set g_balance_electro_primary_force_up 0
-set g_balance_electro_primary_radius 150
-set g_balance_electro_primary_comboradius 0
-set g_balance_electro_primary_speed 2000
+set g_balance_electro_primary_force 425
+set g_balance_electro_primary_force_up 125
+set g_balance_electro_primary_radius 850
+set g_balance_electro_primary_comboradius 75
+set g_balance_electro_primary_speed 0
set g_balance_electro_primary_spread 0
-set g_balance_electro_primary_lifetime 30
+set g_balance_electro_primary_lifetime 0
set g_balance_electro_primary_refire 0.6
-set g_balance_electro_primary_animtime 0.3
-set g_balance_electro_primary_ammo 2
-set g_balance_electro_primary_range 0
+set g_balance_electro_primary_animtime 0.03
+set g_balance_electro_primary_ammo 7
+set g_balance_electro_primary_range 800
set g_balance_electro_primary_falloff_mindist 255 // 0.3 * radius
set g_balance_electro_primary_falloff_maxdist 850
set g_balance_electro_primary_falloff_halflifedist 425
-set g_balance_electro_secondary_damage 50
+set g_balance_electro_secondary_damage 25
set g_balance_electro_secondary_edgedamage 0
-set g_balance_electro_secondary_force 200
-set g_balance_electro_secondary_radius 150
+set g_balance_electro_secondary_force 100
+set g_balance_electro_secondary_radius 100
set g_balance_electro_secondary_speed 900
set g_balance_electro_secondary_speed_up 200
set g_balance_electro_secondary_speed_z 0
-set g_balance_electro_secondary_spread 0
+set g_balance_electro_secondary_spread 0.08
set g_balance_electro_secondary_lifetime 2.5
set g_balance_electro_secondary_refire 0.2
set g_balance_electro_secondary_refire2 1
set g_balance_electro_secondary_health 5
set g_balance_electro_secondary_damageforcescale 4
set g_balance_electro_secondary_count 3
+set g_balance_electro_secondary_bouncefactor 0.5
+set g_balance_electro_secondary_bouncestop 0.075
set g_balance_electro_combo_damage 50
set g_balance_electro_combo_edgedamage 0
set g_balance_electro_combo_force 200
set g_balance_electro_combo_radius 250
set g_balance_electro_combo_comboradius 0
-set g_balance_electro_combo_speed 2000
+set g_balance_electro_combo_speed 400
// }}}
-// {{{ crylink
-set g_balance_crylink_primary_damage 14
+// {{{ crylink
+set g_balance_crylink_primary_damage 10
set g_balance_crylink_primary_edgedamage 0
set g_balance_crylink_primary_force -55
set g_balance_crylink_primary_radius 50
-set g_balance_crylink_primary_speed 7000
-set g_balance_crylink_primary_spread 0.02
+set g_balance_crylink_primary_speed 3000
+set g_balance_crylink_primary_spread 0.05
set g_balance_crylink_primary_shots 4
set g_balance_crylink_primary_bounces 1
set g_balance_crylink_primary_refire 0.4
set g_balance_crylink_primary_animtime 0.3
set g_balance_crylink_primary_ammo 2
set g_balance_crylink_primary_bouncedamagefactor 0.5
-set g_balance_crylink_primary_joinspeed 0
+set g_balance_crylink_primary_joinspread 0
set g_balance_crylink_primary_jointime 0
set g_balance_crylink_primary_joinexplode 0
set g_balance_crylink_primary_joinexplode_damage 0
set g_balance_crylink_primary_joinexplode_radius 0
set g_balance_crylink_primary_joinexplode_force 0
set g_balance_crylink_primary_linkexplode 1
+
set g_balance_crylink_primary_middle_lifetime 5 // range: 35000 full, fades to 70000
set g_balance_crylink_primary_middle_fadetime 5
-set g_balance_crylink_primary_other_lifetime 0.1 // range: 700 full, fades to 2450
-set g_balance_crylink_primary_other_fadetime 0.25
+set g_balance_crylink_primary_other_lifetime 5
+set g_balance_crylink_primary_other_fadetime 5
set g_balance_crylink_secondary 1
-set g_balance_crylink_secondary_damage 10
+set g_balance_crylink_secondary_damage 8
set g_balance_crylink_secondary_edgedamage 0
set g_balance_crylink_secondary_force -40
set g_balance_crylink_secondary_radius 10
-set g_balance_crylink_secondary_speed 4000
-set g_balance_crylink_secondary_spread 0.01
+set g_balance_crylink_secondary_speed 9000
+set g_balance_crylink_secondary_spread 0.03
set g_balance_crylink_secondary_shots 3
set g_balance_crylink_secondary_bounces 0
-set g_balance_crylink_secondary_refire 0.1
-set g_balance_crylink_secondary_animtime 0.1
+set g_balance_crylink_secondary_refire 0.2
+set g_balance_crylink_secondary_animtime 0.2
set g_balance_crylink_secondary_ammo 2
set g_balance_crylink_secondary_bouncedamagefactor 0.5
-set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_joinspread 0
set g_balance_crylink_secondary_jointime 0
set g_balance_crylink_secondary_joinexplode 0
set g_balance_crylink_secondary_joinexplode_damage 0
set g_balance_crylink_secondary_middle_lifetime 5 // range: 35000 full, fades to 70000
set g_balance_crylink_secondary_middle_fadetime 5
-set g_balance_crylink_secondary_line_lifetime 2 // range: 35000 full, fades to 70000
-set g_balance_crylink_secondary_line_fadetime 2
+set g_balance_crylink_secondary_line_lifetime 5
+set g_balance_crylink_secondary_line_fadetime 5
// }}}
// {{{ nex
set g_balance_nex_primary_damage 90
-set g_balance_nex_primary_force 300
+set g_balance_nex_primary_force 400
set g_balance_nex_primary_refire 1.5
set g_balance_nex_primary_animtime 0.3
set g_balance_nex_primary_ammo 5
set g_balance_nex_secondary 0
set g_balance_nex_secondary_charge 0
set g_balance_nex_secondary_charge_rate 0.1
-set g_balance_nex_secondary_damage 90
-set g_balance_nex_secondary_force 300
-set g_balance_nex_secondary_refire 1.5
-set g_balance_nex_secondary_animtime 0.3
-set g_balance_nex_secondary_ammo 5
-set g_balance_nex_secondary_damagefalloff_mindist 1000
-set g_balance_nex_secondary_damagefalloff_maxdist 3000
-set g_balance_nex_secondary_damagefalloff_halflife 1500
-set g_balance_nex_secondary_damagefalloff_forcehalflife 1500
+set g_balance_nex_secondary_charge_pool 0
+set g_balance_nex_secondary_charge_pool_regen 0.15
+set g_balance_nex_secondary_charge_pool_pause_regen 1
+set g_balance_nex_secondary_charge_pool_pause_health_regen 1
+set g_balance_nex_secondary_damage 0
+set g_balance_nex_secondary_force 0
+set g_balance_nex_secondary_refire 0
+set g_balance_nex_secondary_animtime 0
+set g_balance_nex_secondary_ammo 2
+set g_balance_nex_secondary_damagefalloff_mindist 0
+set g_balance_nex_secondary_damagefalloff_maxdist 0
+set g_balance_nex_secondary_damagefalloff_halflife 0
+set g_balance_nex_secondary_damagefalloff_forcehalflife 0
-set g_balance_nex_charge 0
+set g_balance_nex_charge 1
set g_balance_nex_charge_mindmg 40
set g_balance_nex_charge_start 0
set g_balance_nex_charge_rate 0.1
set g_balance_nex_charge_limit 0.5
set g_balance_nex_charge_rot_rate 0
set g_balance_nex_charge_rot_pause 0 // Dont rot down untill this long after release of charge button
-set g_balance_nex_charge_shot_multiplier 0.5
+set g_balance_nex_charge_shot_multiplier 0.25
set g_balance_nex_charge_velocity_rate 0.2
set g_balance_nex_charge_minspeed 400
set g_balance_nex_charge_maxspeed 1000
set g_balance_hagar_primary_edgedamage 0
set g_balance_hagar_primary_force 50
set g_balance_hagar_primary_radius 70
-set g_balance_hagar_primary_spread 0.05
-set g_balance_hagar_primary_speed 2400
-set g_balance_hagar_primary_lifetime 30
+set g_balance_hagar_primary_spread 0.08
+set g_balance_hagar_primary_speed 2000
+set g_balance_hagar_primary_lifetime 0.12
set g_balance_hagar_primary_refire 0.15
set g_balance_hagar_primary_ammo 1
set g_balance_hagar_secondary 1
-set g_balance_hagar_secondary_damage 20
-set g_balance_hagar_secondary_edgedamage 10
-set g_balance_hagar_secondary_force 50
-set g_balance_hagar_secondary_radius 90
-set g_balance_hagar_secondary_spread 0.05
+set g_balance_hagar_secondary_damage 37
+set g_balance_hagar_secondary_edgedamage 15
+set g_balance_hagar_secondary_force 100
+set g_balance_hagar_secondary_radius 65
+set g_balance_hagar_secondary_spread 0.015
set g_balance_hagar_secondary_speed 2000
-set g_balance_hagar_secondary_lifetime_min 0.1
-set g_balance_hagar_secondary_lifetime_rand 0.05
-set g_balance_hagar_secondary_refire 0.1
-set g_balance_hagar_secondary_ammo 0.5
+set g_balance_hagar_secondary_lifetime_min 30
+set g_balance_hagar_secondary_lifetime_rand 0
+set g_balance_hagar_secondary_refire 0.15
+set g_balance_hagar_secondary_ammo 1
// }}}
// {{{ rocketlauncher
set g_balance_rocketlauncher_damage 80
set g_balance_rocketlauncher_radius 100
set g_balance_rocketlauncher_speed 1600
set g_balance_rocketlauncher_speedaccel 1600
-set g_balance_rocketlauncher_speedstart 1000
+set g_balance_rocketlauncher_speedstart 800
set g_balance_rocketlauncher_lifetime 30
set g_balance_rocketlauncher_refire 1.2
set g_balance_rocketlauncher_animtime 0.3
set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
set g_balance_rocketlauncher_guidestop 0 // stop guiding when firing again
-set g_balance_rocketlauncher_remote_damage 80
-set g_balance_rocketlauncher_remote_edgedamage 40
+set g_balance_rocketlauncher_remote_damage 70
+set g_balance_rocketlauncher_remote_edgedamage 30
set g_balance_rocketlauncher_remote_radius 100
-set g_balance_rocketlauncher_remote_force 600
+set g_balance_rocketlauncher_remote_force 500
// }}}
// {{{ porto
set g_balance_porto_primary_refire 1.5
set g_balance_porto_primary_animtime 0.3
set g_balance_porto_primary_speed 5000
-set g_balance_porto_primary_lifetime 30
+set g_balance_porto_primary_lifetime 5
set g_balance_portal_health 200 // these get recharged whenever the portal is used
set g_balance_portal_lifetime 15 // these get recharged whenever the portal is used
// }}}
// {{{ hook
-set g_balance_hook_primary_fuel 2 // hook monkeys set 0
+set g_balance_hook_primary_fuel 5 // hook monkeys set 0
set g_balance_hook_primary_refire 0 // hook monkeys set 0
set g_balance_hook_primary_animtime 0.3 // good shoot anim
set g_balance_hook_primary_hooked_time_max 0 // infinite
set g_balance_hook_primary_hooked_time_free 2 // 2s being hooked are free
-set g_balance_hook_primary_hooked_fuel 3 // fuel per second hooked
+set g_balance_hook_primary_hooked_fuel 5 // fuel per second hooked
set g_balance_hook_secondary_damage 25 // not much
set g_balance_hook_secondary_edgedamage 5 // not much
set g_balance_hook_secondary_radius 500 // LOTS
set g_balance_hook_secondary_force -2000 // LOTS
set g_balance_hook_secondary_ammo 50 // a whole pack
-set g_balance_hook_secondary_lifetime 30 // infinite
+set g_balance_hook_secondary_lifetime 5 // infinite
set g_balance_hook_secondary_speed 0 // not much throwing
set g_balance_hook_secondary_gravity 5 // fast falling
set g_balance_hook_secondary_refire 3 // don't drop too many bombs...
set g_balance_hlac_secondary_shots 6
// }}}
// {{{ campingrifle
-set g_balance_campingrifle_magazinecapacity 0
+set g_balance_campingrifle_magazinecapacity 8 // make it pretty much useless in close combat
set g_balance_campingrifle_reloadtime 2 // matches reload anim
set g_balance_campingrifle_auto_reload_after_changing_weapons 0
-set g_balance_campingrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
-set g_balance_campingrifle_primary_tracer 0
-set g_balance_campingrifle_primary_damage 50
-set g_balance_campingrifle_primary_headshotaddeddamage 50
+set g_balance_campingrifle_bursttime 0
+set g_balance_campingrifle_primary_tracer 1
+set g_balance_campingrifle_primary_damage 65
+set g_balance_campingrifle_primary_headshotaddeddamage 75
set g_balance_campingrifle_primary_spread 0
-set g_balance_campingrifle_primary_force 50
-set g_balance_campingrifle_primary_speed 35000
+set g_balance_campingrifle_primary_force 2
+set g_balance_campingrifle_primary_speed 40000
set g_balance_campingrifle_primary_lifetime 5
-set g_balance_campingrifle_primary_refire 0.7
+set g_balance_campingrifle_primary_refire 0.75
set g_balance_campingrifle_primary_animtime 0.3
set g_balance_campingrifle_primary_ammo 10
-set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
-set g_balance_campingrifle_primary_burstcost 0.35 // require same cooldown as secondary, note it's smaller than primary refire time
-set g_balance_campingrifle_primary_bullethail 0
+set g_balance_campingrifle_primary_bulletconstant 110 // 62.2qu
+set g_balance_campingrifle_primary_burstcost 0
+set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
set g_balance_campingrifle_secondary 1
set g_balance_campingrifle_secondary_tracer 0
-set g_balance_campingrifle_secondary_damage 15
-set g_balance_campingrifle_secondary_headshotaddeddamage 25
-set g_balance_campingrifle_secondary_spread 0.02
-set g_balance_campingrifle_secondary_force 30
+set g_balance_campingrifle_secondary_damage 50
+set g_balance_campingrifle_secondary_headshotaddeddamage 50 // 50 damage only on head
+set g_balance_campingrifle_secondary_spread 0
+set g_balance_campingrifle_secondary_force 2
set g_balance_campingrifle_secondary_speed 20000
set g_balance_campingrifle_secondary_lifetime 5
set g_balance_campingrifle_secondary_refire 0.1
set g_balance_campingrifle_secondary_animtime 0.1
-set g_balance_campingrifle_secondary_ammo 4
-set g_balance_campingrifle_secondary_bulletconstant 130 // 18.3qu
-set g_balance_campingrifle_secondary_burstcost 0.35
-set g_balance_campingrifle_secondary_bullethail 0
+set g_balance_campingrifle_secondary_ammo 10
+set g_balance_campingrifle_secondary_bulletconstant 110 // 15.5qu
+set g_balance_campingrifle_secondary_burstcost 0
+set g_balance_campingrifle_secondary_bullethail 0 // empty magazine on shot
// }}}
// {{{ tuba
set g_balance_tuba_refire 0.05
+++ /dev/null
-// {{{ starting gear
-set g_start_weapon_laser -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_shotgun -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_uzi -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_grenadelauncher -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_minelayer -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_electro -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_crylink -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_nex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_hagar -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_rocketlauncher -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_porto -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_hook -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_hlac -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_campingrifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_fireball -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_balance_health_start 150
-set g_balance_armor_start 0
-set g_start_ammo_shells 20
-set g_start_ammo_nails 0
-set g_start_ammo_rockets 0
-set g_start_ammo_cells 0
-set g_start_ammo_fuel 0
-set g_warmup_start_health 200 "starting values when being in warmup-stage"
-set g_warmup_start_armor 100 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_shells 50 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_nails 150 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_rockets 50 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_cells 50 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_fuel 0 "starting values when being in warmup-stage"
-set g_lms_start_health 200
-set g_lms_start_armor 100
-set g_lms_start_ammo_shells 30
-set g_lms_start_ammo_nails 250
-set g_lms_start_ammo_rockets 100
-set g_lms_start_ammo_cells 200
-set g_lms_start_ammo_fuel 0
-set g_balance_nix_roundtime 25
-set g_balance_nix_incrtime 1.6
-set g_balance_nix_ammo_shells 15
-set g_balance_nix_ammo_nails 45
-set g_balance_nix_ammo_rockets 15
-set g_balance_nix_ammo_cells 15
-set g_balance_nix_ammo_fuel 0
-set g_balance_nix_ammoincr_shells 2
-set g_balance_nix_ammoincr_nails 6
-set g_balance_nix_ammoincr_rockets 2
-set g_balance_nix_ammoincr_cells 2
-set g_balance_nix_ammoincr_fuel 2
-// }}}
-
-// {{{ pickup items
-set g_pickup_ammo_anyway 1
-set g_pickup_weapons_anyway 1
-set g_pickup_shells 20
-set g_pickup_shells_weapon 10
-set g_pickup_shells_max 50
-set g_pickup_nails 60
-set g_pickup_nails_weapon 60
-set g_pickup_nails_max 300
-set g_pickup_rockets 25
-set g_pickup_rockets_weapon 15
-set g_pickup_rockets_max 150
-set g_pickup_cells 30
-set g_pickup_cells_weapon 20
-set g_pickup_cells_max 300
-set g_pickup_fuel 25
-set g_pickup_fuel_weapon 15
-set g_pickup_fuel_jetpack 50
-set g_pickup_fuel_max 999
-set g_pickup_armorsmall 5
-set g_pickup_armorsmall_max 999
-set g_pickup_armorsmall_anyway 0
-set g_pickup_armormedium 25
-set g_pickup_armormedium_max 999
-set g_pickup_armormedium_anyway 0
-set g_pickup_armorbig 50
-set g_pickup_armorbig_max 999
-set g_pickup_armorbig_anyway 0
-set g_pickup_armorlarge 100
-set g_pickup_armorlarge_max 999
-set g_pickup_armorlarge_anyway 0
-set g_pickup_healthsmall 5
-set g_pickup_healthsmall_max 999
-set g_pickup_healthsmall_anyway 0
-set g_pickup_healthmedium 25
-set g_pickup_healthmedium_max 999
-set g_pickup_healthmedium_anyway 0
-set g_pickup_healthlarge 50
-set g_pickup_healthlarge_max 999
-set g_pickup_healthlarge_anyway 0
-set g_pickup_healthmega 100
-set g_pickup_healthmega_max 999
-set g_pickup_healthmega_anyway 0
-set g_pickup_respawntime_short 15
-set g_pickup_respawntime_medium 20
-set g_pickup_respawntime_long 30
-set g_pickup_respawntime_powerup 120
-set g_pickup_respawntime_weapon 20
-set g_pickup_respawntime_ammo 15
-set g_pickup_respawntimejitter_short 0
-set g_pickup_respawntimejitter_medium 0
-set g_pickup_respawntimejitter_long 0
-set g_pickup_respawntimejitter_powerup 10
-set g_pickup_respawntimejitter_weapon 0
-set g_pickup_respawntimejitter_ammo 0
-// }}}
-
-// {{{ regen/rot
-set g_balance_health_regen 0.1
-set g_balance_health_regenlinear 0
-set g_balance_pause_health_regen 5
-set g_balance_pause_health_regen_spawn 0
-set g_balance_health_rot 0.1
-set g_balance_health_rotlinear 2.5
-set g_balance_pause_health_rot 4
-set g_balance_pause_health_rot_spawn 8
-set g_balance_health_regenstable 100
-set g_balance_health_rotstable 100
-set g_balance_health_limit 999
-set g_balance_armor_regen 0
-set g_balance_armor_regenlinear 0
-set g_balance_armor_rot 0.1
-set g_balance_armor_rotlinear 2.5
-set g_balance_pause_armor_rot 4
-set g_balance_pause_armor_rot_spawn 8
-set g_balance_armor_regenstable 100
-set g_balance_armor_rotstable 100
-set g_balance_armor_limit 999
-set g_balance_armor_blockpercent 0.7
-set g_balance_fuel_regen 0.1 "fuel regeneration (only applies if the player owns IT_FUEL_REGEN)"
-set g_balance_fuel_regenlinear 0
-set g_balance_pause_fuel_regen 2 // other than this, fuel uses the health regen counter
-set g_balance_fuel_rot 0.05
-set g_balance_fuel_rotlinear 0
-set g_balance_pause_fuel_rot 4
-set g_balance_pause_fuel_rot_spawn 8
-set g_balance_fuel_regenstable 50
-set g_balance_fuel_rotstable 100
-set g_balance_fuel_limit 999
-// }}}
-
-// {{{ misc
-set g_balance_selfdamagepercent 0.6
-set g_balance_weaponswitchdelay 0.15
-set g_weaponspeedfactor 1 "weapon projectile speed multiplier"
-set g_weaponratefactor 1 "weapon fire rate multiplier"
-set g_weapondamagefactor 1 "weapon damage multiplier"
-set g_weaponforcefactor 1 "weapon force multiplier"
-set g_weaponspreadfactor 1 "weapon spread multiplier"
-set g_balance_firetransfer_time 0.9
-set g_balance_firetransfer_damage 0.8
-set g_throughfloor_damage 0.5
-set g_throughfloor_force 0.7
-set g_projectiles_newton_style 2
-// possible values:
-// 0: absolute velocity projectiles (like Quake)
-// 1: relative velocity projectiles, "Newtonian" (like Tribes 2)
-// 2: relative velocity projectiles, but aim is precorrected so projectiles hit the crosshair (note: strafe rockets then are SLOWER than ones shot while standing, happens in 1 too when aiming correctly which is hard)
-// 3: absolute velocity + player velocity component in shot direction (note: does NOT yield the right relative velocity, but may be good enough, but it is somewhat prone to sniper rockets)
-// 4: just add the player velocity length to the absolute velocity (tZork's sniper rockets)
-set g_projectiles_newton_style_2_minfactor 0.7
-set g_projectiles_newton_style_2_maxfactor 5
-set g_projectiles_spread_style 7
-// possible values:
-// 0: forward + solid sphere (like Quake) - varies velocity
-// 1: forward + flattened solid sphere
-// 2: forward + solid circle
-// 3: forward + normal distribution 3D - varies velocity
-// 4: forward + normal distribution on a plane
-// 5: forward + circle with 1-r falloff
-// 6: forward + circle with 1-r^2 falloff
-// 7: forward + circle with (1-r)(2-r) falloff
-set g_balance_falldamage_deadminspeed 150
-set g_balance_falldamage_minspeed 800
-set g_balance_falldamage_factor 0.02 // maxspeed = minspeed + maxdamage / factor = 4550
-set g_balance_falldamage_maxdamage 75
-// }}}
-
-// {{{ powerups
-set g_balance_powerup_invincible_takedamage 0.3
-set g_balance_powerup_invincible_time 30
-set g_balance_powerup_strength_damage 3
-set g_balance_powerup_strength_force 3
-set g_balance_powerup_strength_time 30
-set g_balance_powerup_strength_selfdamage 1.5
-set g_balance_powerup_strength_selfforce 1.5
-// }}}
-
-// {{{ jetpack/hook
-set g_jetpack_antigravity 0.8 "factor of gravity compensation of the jetpack"
-set g_jetpack_acceleration_side 1200 "acceleration of the jetpack in xy direction"
-set g_jetpack_acceleration_up 600 "acceleration of the jetpack in z direction (note: you have to factor in gravity here, if antigravity is not 1)"
-set g_jetpack_maxspeed_side 1500 "max speed of the jetpack in xy direction"
-set g_jetpack_maxspeed_up 600 "max speed of the jetpack in z direction"
-set g_jetpack_fuel 8 "fuel per second for jetpack"
-set g_jetpack_attenuation 2 "jetpack sound attenuation"
-
-set g_grappling_hook_tarzan 2 // 2: can also pull players
-set g_balance_grapplehook_speed_fly 1800
-set g_balance_grapplehook_speed_pull 2000
-set g_balance_grapplehook_force_rubber 2000
-set g_balance_grapplehook_force_rubber_overstretch 1000
-set g_balance_grapplehook_length_min 50
-set g_balance_grapplehook_stretch 50
-set g_balance_grapplehook_airfriction 0.2
-set g_balance_grapplehook_health 130
-// }}}
-
-// {{{ weapon properties
-// {{{ laser
-set g_balance_laser_primary_damage 20
-set g_balance_laser_primary_edgedamage 10
-set g_balance_laser_primary_force 230
-set g_balance_laser_primary_radius 60
-set g_balance_laser_primary_speed 9000
-set g_balance_laser_primary_spread 0
-set g_balance_laser_primary_refire 0.6
-set g_balance_laser_primary_animtime 0.6
-set g_balance_laser_primary_lifetime 5
-set g_balance_laser_primary_shotangle 0
-set g_balance_laser_primary_delay 0
-set g_balance_laser_primary_gauntlet 0
-set g_balance_laser_primary_force_zscale 1.2
-set g_balance_laser_primary_force_velocitybias 0.15
-set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
-set g_balance_laser_secondary_damage 35
-set g_balance_laser_secondary_edgedamage 10
-set g_balance_laser_secondary_force 400
-set g_balance_laser_secondary_radius 70
-set g_balance_laser_secondary_speed 9000
-set g_balance_laser_secondary_spread 0
-set g_balance_laser_secondary_refire 0.7
-set g_balance_laser_secondary_animtime 0.3
-set g_balance_laser_secondary_lifetime 30
-set g_balance_laser_secondary_shotangle 0
-set g_balance_laser_secondary_delay 0
-set g_balance_laser_secondary_gauntlet 0
-set g_balance_laser_secondary_force_zscale 1
-set g_balance_laser_secondary_force_velocitybias 0
-// }}}
-// {{{ shotgun
-set g_balance_shotgun_primary_bullets 10
-set g_balance_shotgun_primary_damage 5
-set g_balance_shotgun_primary_force 5
-set g_balance_shotgun_primary_spread 0.07
-set g_balance_shotgun_primary_refire 0.8
-set g_balance_shotgun_primary_animtime 0.2
-set g_balance_shotgun_primary_ammo 1
-set g_balance_shotgun_primary_speed 12000
-set g_balance_shotgun_primary_bulletconstant 75 // 3.8qu
-set g_balance_shotgun_secondary 1
-set g_balance_shotgun_secondary_melee_delay 0.35 // match the anim
-set g_balance_shotgun_secondary_melee_range 85
-set g_balance_shotgun_secondary_melee_swing 50
-set g_balance_shotgun_secondary_melee_time 0.1
-set g_balance_shotgun_secondary_damage 110
-set g_balance_shotgun_secondary_force 150
-set g_balance_shotgun_secondary_refire 1.1
-set g_balance_shotgun_secondary_animtime 1
-// }}}
-// {{{ uzi
-set g_balance_uzi_mode 1 // Activates varible spread for sustained & burst mode secondary
-set g_balance_uzi_spread_min 0.02
-set g_balance_uzi_spread_max 0.6
-set g_balance_uzi_spread_add 0.008
-set g_balance_uzi_burst 3 // # of bullets in a burst (if set to 2 or more)
-set g_balance_uzi_burst_refire 0.05 // refire between burst bullets
-set g_balance_uzi_burst_refire2 0.4 // refire after burst
-set g_balance_uzi_burst_spread 0.03
-set g_balance_uzi_burst_damage 18 // 90 dps (but 90 dmg deliverd in .25s)
-set g_balance_uzi_burst_force 50
-set g_balance_uzi_burst_ammo 3
-set g_balance_uzi_first 1
-set g_balance_uzi_first_damage 30
-set g_balance_uzi_first_force 50
-set g_balance_uzi_first_spread 0.015
-set g_balance_uzi_first_refire 0.2
-set g_balance_uzi_first_ammo 1
-set g_balance_uzi_sustained_damage 14 // 120 dps
-set g_balance_uzi_sustained_force 12
-set g_balance_uzi_sustained_spread 0.02
-set g_balance_uzi_sustained_refire 0.1
-set g_balance_uzi_sustained_ammo 1
-set g_balance_uzi_speed 18000
-set g_balance_uzi_bulletconstant 115 // 13.1qu
-// }}}
-// {{{ mortar
-set g_balance_grenadelauncher_primary_type 0
-set g_balance_grenadelauncher_primary_damage 50
-set g_balance_grenadelauncher_primary_edgedamage 30
-set g_balance_grenadelauncher_primary_force 250
-set g_balance_grenadelauncher_primary_radius 140
-set g_balance_grenadelauncher_primary_speed 2000
-set g_balance_grenadelauncher_primary_speed_up 200
-set g_balance_grenadelauncher_primary_speed_z 0
-set g_balance_grenadelauncher_primary_spread 0
-set g_balance_grenadelauncher_primary_lifetime 30
-set g_balance_grenadelauncher_primary_lifetime2 1
-set g_balance_grenadelauncher_primary_refire 0.8
-set g_balance_grenadelauncher_primary_animtime 0.3
-set g_balance_grenadelauncher_primary_ammo 2
-set g_balance_grenadelauncher_primary_health 25
-set g_balance_grenadelauncher_primary_damageforcescale 4
-set g_balance_grenadelauncher_primary_remote_minbouncecnt 0
-
-set g_balance_grenadelauncher_secondary_type 1
-set g_balance_grenadelauncher_secondary_damage 60
-set g_balance_grenadelauncher_secondary_edgedamage 35
-set g_balance_grenadelauncher_secondary_force 300
-set g_balance_grenadelauncher_secondary_radius 140
-set g_balance_grenadelauncher_secondary_speed 1400
-set g_balance_grenadelauncher_secondary_speed_up 200
-set g_balance_grenadelauncher_secondary_speed_z 0
-set g_balance_grenadelauncher_secondary_spread 0
-set g_balance_grenadelauncher_secondary_lifetime 2.5
-set g_balance_grenadelauncher_secondary_lifetime2 0
-set g_balance_grenadelauncher_secondary_refire 0.7
-set g_balance_grenadelauncher_secondary_animtime 0.3
-set g_balance_grenadelauncher_secondary_ammo 2
-set g_balance_grenadelauncher_secondary_health 10
-set g_balance_grenadelauncher_secondary_damageforcescale 4
-set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
-
-set g_balance_grenadelauncher_bouncefactor 0.5
-set g_balance_grenadelauncher_bouncestop 0.075
-// }}}
-// {{{ minelayer // TODO
-set g_balance_minelayer_damage 35
-set g_balance_minelayer_edgedamage 30
-set g_balance_minelayer_force 250
-set g_balance_minelayer_radius 175
-set g_balance_minelayer_proximityradius 150
-set g_balance_minelayer_speed 750
-set g_balance_minelayer_lifetime 60
-set g_balance_minelayer_refire 1.5
-set g_balance_minelayer_animtime 0.4
-set g_balance_minelayer_ammo 5
-set g_balance_minelayer_health 15
-set g_balance_minelayer_limit 4 // 0 disables the limit
-set g_balance_minelayer_protection 1 // don't explode if the mine would hurt the owner or a team mate
-set g_balance_minelayer_damageforcescale 0
-set g_balance_minelayer_detonatedelay -1 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_minelayer_time 0.5
-set g_balance_minelayer_remote_damage 45
-set g_balance_minelayer_remote_edgedamage 40
-set g_balance_minelayer_remote_radius 200
-set g_balance_minelayer_remote_force 300
-// }}}
-// {{{ electro
-set g_balance_electro_lightning 0
-set g_balance_electro_primary_damage 35
-set g_balance_electro_primary_edgedamage 0
-set g_balance_electro_primary_force 150
-set g_balance_electro_primary_force_up 0
-set g_balance_electro_primary_radius 155
-set g_balance_electro_primary_comboradius 0
-set g_balance_electro_primary_speed 2000
-set g_balance_electro_primary_spread 0
-set g_balance_electro_primary_lifetime 30
-set g_balance_electro_primary_refire 0.65
-set g_balance_electro_primary_animtime 0.3
-set g_balance_electro_primary_ammo 2
-set g_balance_electro_primary_range 0
-set g_balance_electro_primary_falloff_mindist 255 // 0.3 * radius
-set g_balance_electro_primary_falloff_maxdist 850
-set g_balance_electro_primary_falloff_halflifedist 425
-set g_balance_electro_secondary_damage 25
-set g_balance_electro_secondary_edgedamage 0
-set g_balance_electro_secondary_force 50
-set g_balance_electro_secondary_radius 25
-set g_balance_electro_secondary_speed 750
-set g_balance_electro_secondary_speed_up 150
-set g_balance_electro_secondary_speed_z 0
-set g_balance_electro_secondary_spread 0.025
-set g_balance_electro_secondary_lifetime 5
-set g_balance_electro_secondary_refire 0.1
-set g_balance_electro_secondary_refire2 2
-set g_balance_electro_secondary_animtime 0.15
-set g_balance_electro_secondary_ammo 2
-set g_balance_electro_secondary_health 10
-set g_balance_electro_secondary_damageforcescale 2
-set g_balance_electro_secondary_count 3
-set g_balance_electro_combo_damage 80
-set g_balance_electro_combo_edgedamage 10
-set g_balance_electro_combo_force 150
-set g_balance_electro_combo_radius 250
-set g_balance_electro_combo_comboradius 0
-set g_balance_electro_combo_speed 1000
-// }}}
-// {{{ crylink
-set g_balance_crylink_primary_damage 5
-set g_balance_crylink_primary_edgedamage 3
-set g_balance_crylink_primary_force 10
-set g_balance_crylink_primary_radius 15
-set g_balance_crylink_primary_speed 1500
-set g_balance_crylink_primary_spread 0.1
-set g_balance_crylink_primary_shots 8
-set g_balance_crylink_primary_bounces 1
-set g_balance_crylink_primary_refire 1
-set g_balance_crylink_primary_animtime 0.4
-set g_balance_crylink_primary_ammo 2
-set g_balance_crylink_primary_bouncedamagefactor 0.2
-set g_balance_crylink_primary_joinspeed 300
-set g_balance_crylink_primary_jointime 0
-set g_balance_crylink_primary_joinexplode 1 //if != 0 do a extra damage pass when projectiles join
-set g_balance_crylink_primary_joinexplode_damage 100 //Max demage (Determined by % of _primary_shots that joins)
-set g_balance_crylink_primary_joinexplode_edgedamage 20
-set g_balance_crylink_primary_joinexplode_radius 200
-set g_balance_crylink_primary_joinexplode_force 400
-set g_balance_crylink_primary_linkexplode 0
-
-set g_balance_crylink_primary_middle_lifetime 5
-set g_balance_crylink_primary_middle_fadetime 0.25
-set g_balance_crylink_primary_other_lifetime 2 // range: 800 full, fades to 1300
-set g_balance_crylink_primary_other_fadetime 0.25
-
-set g_balance_crylink_secondary 1
-set g_balance_crylink_secondary_damage 2
-set g_balance_crylink_secondary_edgedamage 0
-set g_balance_crylink_secondary_force -20
-set g_balance_crylink_secondary_radius 5
-set g_balance_crylink_secondary_speed 1600
-set g_balance_crylink_secondary_spread 0.03
-set g_balance_crylink_secondary_shots 3
-set g_balance_crylink_secondary_bounces 0
-set g_balance_crylink_secondary_refire 0.15
-set g_balance_crylink_secondary_animtime 0.15
-set g_balance_crylink_secondary_ammo 1
-set g_balance_crylink_secondary_bouncedamagefactor 0.5
-set g_balance_crylink_secondary_joinspeed 0
-set g_balance_crylink_secondary_jointime 0
-set g_balance_crylink_secondary_joinexplode 0
-set g_balance_crylink_secondary_joinexplode_damage 0
-set g_balance_crylink_secondary_joinexplode_edgedamage 0
-set g_balance_crylink_secondary_joinexplode_radius 0
-set g_balance_crylink_secondary_joinexplode_force 0
-set g_balance_crylink_secondary_linkexplode 1
-
-set g_balance_crylink_secondary_middle_lifetime 5 // range: 10000 full, fades to 10000
-set g_balance_crylink_secondary_middle_fadetime 5
-set g_balance_crylink_secondary_line_lifetime 2 // range: 4000 full, fades to 8000
-set g_balance_crylink_secondary_line_fadetime 2
-// }}}
-// {{{ nex
-set g_balance_nex_primary_damage 100
-set g_balance_nex_primary_force 600
-set g_balance_nex_primary_refire 1
-set g_balance_nex_primary_animtime 0.3
-set g_balance_nex_primary_ammo 5
-set g_balance_nex_primary_damagefalloff_mindist 0
-set g_balance_nex_primary_damagefalloff_maxdist 0
-set g_balance_nex_primary_damagefalloff_halflife 0
-set g_balance_nex_primary_damagefalloff_forcehalflife 0
-
-set g_balance_nex_secondary 1
-set g_balance_nex_secondary_charge 1
-set g_balance_nex_secondary_charge_rate 0.55
-set g_balance_nex_secondary_damage 100
-set g_balance_nex_secondary_force 600
-set g_balance_nex_secondary_refire 1.5
-set g_balance_nex_secondary_animtime 0.3
-set g_balance_nex_secondary_ammo 5
-set g_balance_nex_secondary_damagefalloff_mindist 0
-set g_balance_nex_secondary_damagefalloff_maxdist 0
-set g_balance_nex_secondary_damagefalloff_halflife 0
-set g_balance_nex_secondary_damagefalloff_forcehalflife 0
-
-set g_balance_nex_charge 1
-set g_balance_nex_charge_mindmg 10
-set g_balance_nex_charge_start 0
-set g_balance_nex_charge_rate 0.35
-set g_balance_nex_charge_limit 0.5
-set g_balance_nex_charge_rot_rate 0.1
-set g_balance_nex_charge_rot_pause 1 // Dont rot down untill this long after release of charge button
-set g_balance_nex_charge_shot_multiplier 0
-set g_balance_nex_charge_velocity_rate 0
-set g_balance_nex_charge_minspeed 400
-set g_balance_nex_charge_maxspeed 1000
-// }}}
-// {{{ minstanex
-set g_balance_minstanex_refire 1
-set g_balance_minstanex_animtime 0.3
-set g_balance_minstanex_ammo 10
-// }}}
-// {{{ hagar
-set g_balance_hagar_primary_damage 25
-set g_balance_hagar_primary_edgedamage 5
-set g_balance_hagar_primary_force 70
-set g_balance_hagar_primary_radius 60
-set g_balance_hagar_primary_spread 0.010
-set g_balance_hagar_primary_speed 2500
-set g_balance_hagar_primary_lifetime 30
-set g_balance_hagar_primary_refire 0.2
-set g_balance_hagar_primary_ammo 1
-set g_balance_hagar_secondary 1
-set g_balance_hagar_secondary_damage 30
-set g_balance_hagar_secondary_edgedamage 15
-set g_balance_hagar_secondary_force 50
-set g_balance_hagar_secondary_radius 65
-set g_balance_hagar_secondary_spread 0.015
-set g_balance_hagar_secondary_speed 1400
-set g_balance_hagar_secondary_lifetime_min 30
-set g_balance_hagar_secondary_lifetime_rand 0
-set g_balance_hagar_secondary_refire 0.15
-set g_balance_hagar_secondary_ammo 1
-// }}}
-// {{{ rocketlauncher // TODO
-set g_balance_rocketlauncher_damage 120
-set g_balance_rocketlauncher_edgedamage 25
-set g_balance_rocketlauncher_force 350
-set g_balance_rocketlauncher_radius 130
-set g_balance_rocketlauncher_speed 900
-set g_balance_rocketlauncher_speedaccel 0
-set g_balance_rocketlauncher_speedstart 900
-set g_balance_rocketlauncher_lifetime 9
-set g_balance_rocketlauncher_refire 1.2
-set g_balance_rocketlauncher_animtime 0.4
-set g_balance_rocketlauncher_ammo 3
-set g_balance_rocketlauncher_health 10
-set g_balance_rocketlauncher_damageforcescale 0
-set g_balance_rocketlauncher_detonatedelay -1 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_rocketlauncher_guiderate 25 // max degrees per second
-set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
-set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
-set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
-set g_balance_rocketlauncher_guidestop 0 // stop guiding when firing again
-set g_balance_rocketlauncher_remote_damage 90
-set g_balance_rocketlauncher_remote_edgedamage 20
-set g_balance_rocketlauncher_remote_radius 125
-set g_balance_rocketlauncher_remote_force 350
-// }}}
-// {{{ porto
-set g_balance_porto_primary_refire 1.5
-set g_balance_porto_primary_animtime 0.3
-set g_balance_porto_primary_speed 2000
-set g_balance_porto_primary_lifetime 30
-set g_balance_portal_health 200 // these get recharged whenever the portal is used
-set g_balance_portal_lifetime 15 // these get recharged whenever the portal is used
-// }}}
-// {{{ hook
-set g_balance_hook_primary_fuel 5 // hook monkeys set 0
-set g_balance_hook_primary_refire 0 // hook monkeys set 0
-set g_balance_hook_primary_animtime 0.3 // good shoot anim
-set g_balance_hook_primary_hooked_time_max 0 // infinite
-set g_balance_hook_primary_hooked_time_free 2 // 2s being hooked are free
-set g_balance_hook_primary_hooked_fuel 5 // fuel per second hooked
-set g_balance_hook_secondary_damage 25 // not much
-set g_balance_hook_secondary_edgedamage 5 // not much
-set g_balance_hook_secondary_radius 500 // LOTS
-set g_balance_hook_secondary_force -2000 // LOTS
-set g_balance_hook_secondary_ammo 50 // a whole pack
-set g_balance_hook_secondary_lifetime 5 // infinite
-set g_balance_hook_secondary_speed 0 // not much throwing
-set g_balance_hook_secondary_gravity 5 // fast falling
-set g_balance_hook_secondary_refire 3 // don't drop too many bombs...
-set g_balance_hook_secondary_animtime 0.3 // good shoot anim
-set g_balance_hook_secondary_power 3 // effect behaves like a square function
-set g_balance_hook_secondary_duration 1.5 // effect runs for three seconds
-// }}}
-// {{{ hlac
-set g_balance_hlac_primary_spread_min 0.01
-set g_balance_hlac_primary_spread_max 0.6
-set g_balance_hlac_primary_spread_add 0.01
-set g_balance_hlac_primary_spread_crouchmod 0.5
-
-set g_balance_hlac_primary_damage 22
-set g_balance_hlac_primary_edgedamage 2
-set g_balance_hlac_primary_force -100
-set g_balance_hlac_primary_radius 100
-set g_balance_hlac_primary_speed 5000
-set g_balance_hlac_primary_lifetime 3
-
-set g_balance_hlac_primary_refire 0.1
-set g_balance_hlac_primary_animtime 0.4
-set g_balance_hlac_primary_ammo 1
-
-set g_balance_hlac_secondary 1
-set g_balance_hlac_secondary_spread 0.2
-set g_balance_hlac_secondary_spread_crouchmod 0.5
-
-set g_balance_hlac_secondary_damage 20
-set g_balance_hlac_secondary_edgedamage 3
-set g_balance_hlac_secondary_force 100
-set g_balance_hlac_secondary_radius 50
-set g_balance_hlac_secondary_speed 9000
-set g_balance_hlac_secondary_lifetime 3
-
-set g_balance_hlac_secondary_refire 1
-set g_balance_hlac_secondary_animtime 0.7
-set g_balance_hlac_secondary_ammo 10
-set g_balance_hlac_secondary_shots 6
-// }}}
-// {{{ campingrifle
-set g_balance_campingrifle_magazinecapacity 8 // make it pretty much useless in close combat
-set g_balance_campingrifle_reloadtime 2 // matches reload anim
-set g_balance_campingrifle_auto_reload_after_changing_weapons 0
-set g_balance_campingrifle_bursttime 0
-set g_balance_campingrifle_primary_tracer 1
-set g_balance_campingrifle_primary_damage 40
-set g_balance_campingrifle_primary_headshotaddeddamage 100
-set g_balance_campingrifle_primary_spread 0
-set g_balance_campingrifle_primary_force 2
-set g_balance_campingrifle_primary_speed 40000
-set g_balance_campingrifle_primary_lifetime 5
-set g_balance_campingrifle_primary_refire 0.65
-set g_balance_campingrifle_primary_animtime 0.6
-set g_balance_campingrifle_primary_ammo 10
-set g_balance_campingrifle_primary_bulletconstant 110 // 62.2qu
-set g_balance_campingrifle_primary_burstcost 0
-set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
-set g_balance_campingrifle_secondary 1
-set g_balance_campingrifle_secondary_tracer 0
-set g_balance_campingrifle_secondary_damage 50
-set g_balance_campingrifle_secondary_headshotaddeddamage 50 // 50 damage only on head
-set g_balance_campingrifle_secondary_spread 0
-set g_balance_campingrifle_secondary_force 2
-set g_balance_campingrifle_secondary_speed 20000
-set g_balance_campingrifle_secondary_lifetime 5
-set g_balance_campingrifle_secondary_refire 1.5
-set g_balance_campingrifle_secondary_animtime 0.6
-set g_balance_campingrifle_secondary_ammo 10
-set g_balance_campingrifle_secondary_bulletconstant 110 // 15.5qu
-set g_balance_campingrifle_secondary_burstcost 0
-set g_balance_campingrifle_secondary_bullethail 0 // empty magazine on shot
-// }}}
-// {{{ tuba
-set g_balance_tuba_refire 0.05
-set g_balance_tuba_animtime 0.05
-set g_balance_tuba_attenuation 0.5
-set g_balance_tuba_volume 1
-set g_balance_tuba_fadetime 0.25
-set g_balance_tuba_damage 5
-set g_balance_tuba_edgedamage 0
-set g_balance_tuba_radius 200
-set g_balance_tuba_force 40
-// }}}
-// {{{ fireball
-set g_balance_fireball_primary_ammo 40
-set g_balance_fireball_primary_animtime 0.15
-set g_balance_fireball_primary_bfgdamage 150
-set g_balance_fireball_primary_bfgforce 0
-set g_balance_fireball_primary_bfgradius 1000
-set g_balance_fireball_primary_damage 200
-set g_balance_fireball_primary_damageforcescale 4
-set g_balance_fireball_primary_edgedamage 0
-set g_balance_fireball_primary_force 700
-set g_balance_fireball_primary_health 50
-set g_balance_fireball_primary_laserburntime 0.5
-set g_balance_fireball_primary_laserdamage 80
-set g_balance_fireball_primary_laseredgedamage 20
-set g_balance_fireball_primary_laserradius 256
-set g_balance_fireball_primary_lifetime 15
-set g_balance_fireball_primary_radius 200
-set g_balance_fireball_primary_refire 5
-set g_balance_fireball_primary_refire2 0
-set g_balance_fireball_primary_speed 650
-set g_balance_fireball_primary_spread 0
-set g_balance_fireball_secondary_ammo 5
-set g_balance_fireball_secondary_animtime 0.3
-set g_balance_fireball_secondary_damage 40
-set g_balance_fireball_secondary_damageforcescale 4
-set g_balance_fireball_secondary_damagetime 5
-set g_balance_fireball_secondary_force 100
-set g_balance_fireball_secondary_laserburntime 0.5
-set g_balance_fireball_secondary_laserdamage 50
-set g_balance_fireball_secondary_laseredgedamage 20
-set g_balance_fireball_secondary_laserradius 110
-set g_balance_fireball_secondary_lifetime 7
-set g_balance_fireball_secondary_refire 2
-set g_balance_fireball_secondary_speed 900
-set g_balance_fireball_secondary_speed_up 100
-set g_balance_fireball_secondary_speed_z 0
-set g_balance_fireball_secondary_spread 0
-// }}}
-// {{{ seeker
-set g_balance_seeker_flac_ammo 0.5
-set g_balance_seeker_flac_animtime 0.1
-set g_balance_seeker_flac_damage 15
-set g_balance_seeker_flac_edgedamage 10
-set g_balance_seeker_flac_force 50
-set g_balance_seeker_flac_lifetime 0.05
-set g_balance_seeker_flac_lifetime_rand 0.02
-set g_balance_seeker_flac_radius 100
-set g_balance_seeker_flac_refire 0.1
-set g_balance_seeker_flac_speed 5000
-set g_balance_seeker_flac_speed_up 500
-set g_balance_seeker_flac_speed_z 0
-set g_balance_seeker_flac_spread 0.25
-set g_balance_seeker_missile_accel 1.05
-set g_balance_seeker_missile_ammo 2
-set g_balance_seeker_missile_animtime 0.3
-set g_balance_seeker_missile_count 4
-set g_balance_seeker_missile_damage 50
-set g_balance_seeker_missile_damageforcescale 2
-set g_balance_seeker_missile_decel 0.9
-set g_balance_seeker_missile_delay 0.25
-set g_balance_seeker_missile_edgedamage 10
-set g_balance_seeker_missile_force 250
-set g_balance_seeker_missile_health 5
-set g_balance_seeker_missile_lifetime 15
-set g_balance_seeker_missile_proxy 0
-set g_balance_seeker_missile_proxy_delay 0.2
-set g_balance_seeker_missile_proxy_maxrange 45
-set g_balance_seeker_missile_radius 80
-set g_balance_seeker_missile_refire 0.5
-set g_balance_seeker_missile_smart 1
-set g_balance_seeker_missile_smart_mindist 800
-set g_balance_seeker_missile_smart_trace_max 2500
-set g_balance_seeker_missile_smart_trace_min 1000
-set g_balance_seeker_missile_speed 700
-set g_balance_seeker_missile_speed_accel 0
-set g_balance_seeker_missile_speed_up 300
-set g_balance_seeker_missile_speed_z 0
-set g_balance_seeker_missile_speed_max 1250
-set g_balance_seeker_missile_spread 0
-set g_balance_seeker_missile_turnrate 0.65
-set g_balance_seeker_tag_ammo 1
-set g_balance_seeker_tag_animtime 0.3
-set g_balance_seeker_tag_damageforcescale 4
-set g_balance_seeker_tag_health 5
-set g_balance_seeker_tag_lifetime 15
-set g_balance_seeker_tag_refire 1
-set g_balance_seeker_tag_speed 9000
-set g_balance_seeker_tag_spread 0
-// End new seeker
set g_warmup_start_ammo_cells 50 "starting values when being in warmup-stage"
set g_warmup_start_ammo_fuel 0 "starting values when being in warmup-stage"
set g_lms_start_health 200
-set g_lms_start_armor 150
+set g_lms_start_armor 100
set g_lms_start_ammo_shells 30
set g_lms_start_ammo_nails 200
set g_lms_start_ammo_rockets 150
set g_pickup_fuel_jetpack 50
set g_pickup_fuel_max 100
set g_pickup_armorsmall 5
-set g_pickup_armorsmall_max 250
+set g_pickup_armorsmall_max 150
set g_pickup_armorsmall_anyway 1
set g_pickup_armormedium 25
-set g_pickup_armormedium_max 250
-set g_pickup_armormedium_anyway 1
+set g_pickup_armormedium_max 50
+set g_pickup_armormedium_anyway 0
set g_pickup_armorbig 50
-set g_pickup_armorbig_max 250
-set g_pickup_armorbig_anyway 1
+set g_pickup_armorbig_max 50
+set g_pickup_armorbig_anyway 0
set g_pickup_armorlarge 100
-set g_pickup_armorlarge_max 250
+set g_pickup_armorlarge_max 150
set g_pickup_armorlarge_anyway 1
set g_pickup_healthsmall 5
set g_pickup_healthsmall_max 250
set g_pickup_healthsmall_anyway 1
set g_pickup_healthmedium 25
-set g_pickup_healthmedium_max 150
+set g_pickup_healthmedium_max 100
set g_pickup_healthmedium_anyway 0
set g_pickup_healthlarge 50
set g_pickup_healthlarge_max 150
set g_balance_laser_secondary_force_velocitybias 0
// }}}
// {{{ shotgun
-set g_balance_shotgun_primary_bullets 20
-set g_balance_shotgun_primary_damage 3
+set g_balance_shotgun_primary_bullets 18
+set g_balance_shotgun_primary_damage 4
set g_balance_shotgun_primary_force 20
-set g_balance_shotgun_primary_spread 0.16
+set g_balance_shotgun_primary_spread 0.18
set g_balance_shotgun_primary_refire 1
set g_balance_shotgun_primary_animtime 0.4
set g_balance_shotgun_primary_ammo 1
// {{{ mortar // TODO
set g_balance_grenadelauncher_primary_type 0
set g_balance_grenadelauncher_primary_damage 50
-set g_balance_grenadelauncher_primary_edgedamage 25
+set g_balance_grenadelauncher_primary_edgedamage 32
set g_balance_grenadelauncher_primary_force 300
-set g_balance_grenadelauncher_primary_radius 100
-set g_balance_grenadelauncher_primary_speed 1200
+set g_balance_grenadelauncher_primary_radius 115
+set g_balance_grenadelauncher_primary_speed 1500
set g_balance_grenadelauncher_primary_speed_up 225
set g_balance_grenadelauncher_primary_speed_z 0
set g_balance_grenadelauncher_primary_spread 0
set g_balance_grenadelauncher_secondary_edgedamage 32
set g_balance_grenadelauncher_secondary_force 300
set g_balance_grenadelauncher_secondary_radius 150
-set g_balance_grenadelauncher_secondary_speed 1200
-set g_balance_grenadelauncher_secondary_speed_up 225
+set g_balance_grenadelauncher_secondary_speed 1000
+set g_balance_grenadelauncher_secondary_speed_up 250
set g_balance_grenadelauncher_secondary_speed_z 0
set g_balance_grenadelauncher_secondary_spread 0
set g_balance_grenadelauncher_secondary_lifetime 3
set g_balance_electro_primary_lifetime 0
set g_balance_electro_primary_refire 0.4
set g_balance_electro_primary_animtime 0.03333333
-set g_balance_electro_primary_ammo 7
+set g_balance_electro_primary_ammo 5
set g_balance_electro_primary_range 800
-set g_balance_electro_primary_falloff_mindist 255 // 0.3 * radius
-set g_balance_electro_primary_falloff_maxdist 850
-set g_balance_electro_primary_falloff_halflifedist 425
+set g_balance_electro_primary_falloff_mindist 0
+set g_balance_electro_primary_falloff_maxdist 0
+set g_balance_electro_primary_falloff_halflifedist 0
set g_balance_electro_secondary_damage 25
set g_balance_electro_secondary_edgedamage 0
set g_balance_electro_secondary_force 100
set g_balance_electro_secondary_health 10
set g_balance_electro_secondary_damageforcescale 4
set g_balance_electro_secondary_count 3
-set g_balance_electro_combo_damage 40
+set g_balance_electro_secondary_bouncefactor 0.5
+set g_balance_electro_secondary_bouncestop 0.075
+set g_balance_electro_combo_damage 50
set g_balance_electro_combo_edgedamage 0
set g_balance_electro_combo_force 80
set g_balance_electro_combo_radius 250
set g_balance_crylink_primary_force 40
set g_balance_crylink_primary_radius 80
set g_balance_crylink_primary_speed 1200
-set g_balance_crylink_primary_spread 0.1
+set g_balance_crylink_primary_spread 0.05
set g_balance_crylink_primary_shots 7
set g_balance_crylink_primary_bounces 2
set g_balance_crylink_primary_refire 0.8
set g_balance_crylink_primary_animtime 0.4
set g_balance_crylink_primary_ammo 2
set g_balance_crylink_primary_bouncedamagefactor 0.2
-set g_balance_crylink_primary_joinspeed 250
-set g_balance_crylink_primary_jointime 0
+set g_balance_crylink_primary_joinspread 0.2
+set g_balance_crylink_primary_jointime 0.1
set g_balance_crylink_primary_joinexplode 0
set g_balance_crylink_primary_joinexplode_damage 0
set g_balance_crylink_primary_joinexplode_edgedamage 0
set g_balance_crylink_primary_joinexplode_radius 0
set g_balance_crylink_primary_joinexplode_force 0
-set g_balance_crylink_primary_linkexplode 0
+set g_balance_crylink_primary_linkexplode 1
set g_balance_crylink_primary_middle_lifetime 5 // range: 10000 full, fades to 20000
set g_balance_crylink_primary_middle_fadetime 5
set g_balance_crylink_secondary_animtime 0.15
set g_balance_crylink_secondary_ammo 1
set g_balance_crylink_secondary_bouncedamagefactor 0.5
-set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_joinspread 0
set g_balance_crylink_secondary_jointime 0
set g_balance_crylink_secondary_joinexplode 0
set g_balance_crylink_secondary_joinexplode_damage 0
set g_balance_nex_primary_damage 100
set g_balance_nex_primary_force 500
set g_balance_nex_primary_refire 1
-set g_balance_nex_primary_animtime 0.75
+set g_balance_nex_primary_animtime 0.4
set g_balance_nex_primary_ammo 5
-set g_balance_nex_primary_damagefalloff_mindist 1000
-set g_balance_nex_primary_damagefalloff_maxdist 3000
-set g_balance_nex_primary_damagefalloff_halflife 1000
-set g_balance_nex_primary_damagefalloff_forcehalflife 2000
+set g_balance_nex_primary_damagefalloff_mindist 0
+set g_balance_nex_primary_damagefalloff_maxdist 0
+set g_balance_nex_primary_damagefalloff_halflife 0
+set g_balance_nex_primary_damagefalloff_forcehalflife 0
set g_balance_nex_secondary 1
set g_balance_nex_secondary_charge 1
-set g_balance_nex_secondary_charge_rate 0.125
+set g_balance_nex_secondary_charge_rate 0.5
+set g_balance_nex_secondary_charge_pool 1
+set g_balance_nex_secondary_charge_pool_regen 0.15
+set g_balance_nex_secondary_charge_pool_pause_regen 1
+set g_balance_nex_secondary_charge_pool_pause_health_regen 1
set g_balance_nex_secondary_damage 0
set g_balance_nex_secondary_force 0
set g_balance_nex_secondary_refire 0
set g_balance_nex_secondary_animtime 0
-set g_balance_nex_secondary_ammo 2
+set g_balance_nex_secondary_ammo 0.25 // full charge pool is 1, so it depletes in 4 secs
set g_balance_nex_secondary_damagefalloff_mindist 0
set g_balance_nex_secondary_damagefalloff_maxdist 0
set g_balance_nex_secondary_damagefalloff_halflife 0
set g_balance_nex_secondary_damagefalloff_forcehalflife 0
set g_balance_nex_charge 1
-set g_balance_nex_charge_mindmg 40
+set g_balance_nex_charge_mindmg 30
set g_balance_nex_charge_start 0.5
-set g_balance_nex_charge_rate 0.05
+set g_balance_nex_charge_rate 0.5
set g_balance_nex_charge_limit 0.5
-set g_balance_nex_charge_rot_rate 0.01
-set g_balance_nex_charge_rot_pause 0 // Dont rot down untill this long after release of charge button
-set g_balance_nex_charge_shot_multiplier 0.675
-set g_balance_nex_charge_velocity_rate 0.2
-set g_balance_nex_charge_minspeed 400
+set g_balance_nex_charge_rot_rate 0.1
+set g_balance_nex_charge_rot_pause 1 // Dont rot down until this long after release of charge button
+set g_balance_nex_charge_shot_multiplier 0
+set g_balance_nex_charge_velocity_rate 0
+set g_balance_nex_charge_minspeed 600
set g_balance_nex_charge_maxspeed 1000
// }}}
// {{{ minstanex
set g_balance_rocketlauncher_edgedamage 33
set g_balance_rocketlauncher_force 350
set g_balance_rocketlauncher_radius 125
-set g_balance_rocketlauncher_speed 1000
-set g_balance_rocketlauncher_speedaccel 0
-set g_balance_rocketlauncher_speedstart 1000
+set g_balance_rocketlauncher_speed 1600
+set g_balance_rocketlauncher_speedaccel 1600
+set g_balance_rocketlauncher_speedstart 800
set g_balance_rocketlauncher_lifetime 5
set g_balance_rocketlauncher_refire 1
set g_balance_rocketlauncher_animtime 0.4
set g_balance_electro_secondary_health 10
set g_balance_electro_secondary_damageforcescale 2
set g_balance_electro_secondary_count 3
+set g_balance_electro_secondary_bouncefactor 0.5
+set g_balance_electro_secondary_bouncestop 0.075
set g_balance_electro_combo_damage 80
set g_balance_electro_combo_edgedamage 10
set g_balance_crylink_primary_animtime 0.4
set g_balance_crylink_primary_ammo 2
set g_balance_crylink_primary_bouncedamagefactor 0.2
-set g_balance_crylink_primary_joinspeed 150
+set g_balance_crylink_primary_joinspread 0.1
set g_balance_crylink_primary_jointime 0
set g_balance_crylink_primary_joinexplode 1 //if != 0 do a extra damage pass when projectiles join
set g_balance_crylink_primary_joinexplode_damage 100 //Max demage (Determined by % of _primary_shots that joins)
set g_balance_crylink_secondary_animtime 0.15
set g_balance_crylink_secondary_ammo 1
set g_balance_crylink_secondary_bouncedamagefactor 0.5
-set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_joinspread 0
set g_balance_crylink_secondary_jointime 0
set g_balance_crylink_secondary_joinexplode 0
set g_balance_crylink_secondary_joinexplode_damage 0
set g_balance_nex_secondary 1
set g_balance_nex_secondary_charge 1
set g_balance_nex_secondary_charge_rate 0.55
+set g_balance_nex_secondary_charge_pool 0
+set g_balance_nex_secondary_charge_pool_regen 0.15
+set g_balance_nex_secondary_charge_pool_pause_regen 1
+set g_balance_nex_secondary_charge_pool_pause_health_regen 1
set g_balance_nex_secondary_damage 100
set g_balance_nex_secondary_force 600
set g_balance_nex_secondary_refire 1.5
_cl_name Player
_cl_playermodel models/player/umbra.iqm
_cl_playerskin 0
-seta crosshair 3
-seta crosshair_color_red 0.6
-seta crosshair_color_green 0.8
-seta crosshair_color_blue 1
-seta crosshair_alpha 1
-seta crosshair_size 0.35
+seta crosshair 16
+seta crosshair_color "0.6 0.8 1"
+seta crosshair_alpha 0.3
+seta crosshair_size 0.5
seta crosshair_dot 1
seta crosshair_dot_alpha 1
-seta crosshair_dot_size 1
+seta crosshair_dot_size 0.6
+seta crosshair_dot_color "1 0 0" "when != 0, use custom color for the crosshair dot"
seta crosshair_pickup 0.25
seta crosshair_pickup_speed 4
seta crosshair_per_weapon 0 "when 1, each gun will display a different crosshair"
seta crosshair_color_override 0 "when 1, crosshair_color_* overrides the per-weapon color"
+seta crosshair_color_per_weapon 1 "when 1, each gun will display a different colored crosshair"
seta crosshair_effect_speed -1 "how fast (in seconds) some crosshair effects should take place, 0 = instant, -1 = 2x weapon switch time"
seta crosshair_effect_scalefade 1 "use scaling and fading for crosshair effects"
seta crosshair_hittest 1 "do a crosshair hit evaluation; also, the crosshair is scaled by the given number when aiming at an enemy, and blurred when aiming at a team mate"
seta crosshair_hittest_blur 1 "blur the crosshair if the shot is obstructed"
seta crosshair_hittest_showimpact 0 "move the crosshair to the actual impact location if obstructed"
seta crosshair_laser "" "crosshair to display when wielding the laser"
-seta crosshair_laser_color_red 1 "crosshair color red component to display when wielding the laser"
-seta crosshair_laser_color_green 0.35 "crosshair color green component to display when wielding the laser"
-seta crosshair_laser_color_blue 0.2 "crosshair color blue component to display when wielding the laser"
+seta crosshair_laser_color "1 0.35 0.2" "crosshair color to display when wielding the laser"
seta crosshair_laser_alpha 0.75 "crosshair alpha value to display when wielding the laser"
seta crosshair_laser_size 0.4 "crosshair size when wielding the laser"
seta crosshair_shotgun "" "crosshair to display when wielding the shotgun"
-seta crosshair_shotgun_color_red 0.7 "crosshair color red component to display when wielding the shotgun"
-seta crosshair_shotgun_color_green 0.7 "crosshair color green component to display when wielding the shotgun"
-seta crosshair_shotgun_color_blue 0.7 "crosshair color blue component to display when wielding the shotgun"
+seta crosshair_shotgun_color "0.7 0.7 0.7" "crosshair color to display when wielding the shotgun"
seta crosshair_shotgun_alpha 1.1 "crosshair alpha value to display when wielding the shotgun"
seta crosshair_shotgun_size 0.65 "crosshair size when wielding the shotgun"
seta crosshair_uzi "" "crosshair to display when wielding the machinegun"
-seta crosshair_uzi_color_red 0.4 "crosshair color red component to display when wielding the machinegun"
-seta crosshair_uzi_color_green 0.9 "crosshair color green component to display when wielding the machinegun"
-seta crosshair_uzi_color_blue 0.35 "crosshair color blue component to display when wielding the machinegun"
+seta crosshair_uzi_color "0.4 0.9 0.35" "crosshair color to display when wielding the machinegun"
seta crosshair_uzi_alpha 0.9 "crosshair alpha value to display when wielding the machinegun"
seta crosshair_uzi_size 0.6 "crosshair size when wielding the machinegun"
seta crosshair_grenadelauncher "" "crosshair to display when wielding the mortar"
-seta crosshair_grenadelauncher_color_red 1 "crosshair color red component to display when wielding the mortar"
-seta crosshair_grenadelauncher_color_green 0.15 "crosshair color green component to display when wielding the mortar"
-seta crosshair_grenadelauncher_color_blue 0 "crosshair color blue component to display when wielding the mortar"
+seta crosshair_grenadelauncher_color "1 0.15 0" "crosshair color to display when wielding the mortar"
seta crosshair_grenadelauncher_alpha 1.15 "crosshair alpha value to display when wielding the mortar"
seta crosshair_grenadelauncher_size 0.7 "crosshair size when wielding the mortar"
seta crosshair_minelayer "" "crosshair to display when wielding the mortar"
-seta crosshair_minelayer_color_red 0.75 "crosshair color red component to display when wielding the mortar"
-seta crosshair_minelayer_color_green 0.75 "crosshair color green component to display when wielding the mortar"
-seta crosshair_minelayer_color_blue 0 "crosshair color blue component to display when wielding the mortar"
+seta crosshair_minelayer_color "0.75 0.75 0" "crosshair color to display when wielding the mortar"
seta crosshair_minelayer_alpha 1.15 "crosshair alpha value to display when wielding the mortar"
seta crosshair_minelayer_size 0.9 "crosshair size when wielding the mortar"
seta crosshair_electro "" "crosshair to display when wielding the electro"
-seta crosshair_electro_color_red 0.35 "crosshair color red component to display when wielding the electro"
-seta crosshair_electro_color_green 0.5 "crosshair color green component to display when wielding the electro"
-seta crosshair_electro_color_blue 1 "crosshair color blue component to display when wielding the electro"
+seta crosshair_electro_color "0.35 0.5 1" "crosshair color to display when wielding the electro"
seta crosshair_electro_alpha 1 "crosshair alpha value to display when wielding the electro"
seta crosshair_electro_size 0.5 "crosshair size when wielding the electro"
seta crosshair_crylink "" "crosshair to display when wielding the crylink"
-seta crosshair_crylink_color_red 0.85 "crosshair color red component to display when wielding the crylink"
-seta crosshair_crylink_color_green 0.25 "crosshair color green component to display when wielding the crylink"
-seta crosshair_crylink_color_blue 1 "crosshair color blue component to display when wielding the crylink"
+seta crosshair_crylink_color "0.85 0.25 1" "crosshair color to display when wielding the crylink"
seta crosshair_crylink_alpha 0.85 "crosshair alpha value to display when wielding the crylink"
seta crosshair_crylink_size 0.4 "crosshair size when wielding the crylink"
seta crosshair_nex "" "crosshair to display when wielding the nex gun"
-seta crosshair_nex_color_red 0 "crosshair color red component to display when wielding the nex gun"
-seta crosshair_nex_color_green 0.9 "crosshair color green component to display when wielding the nex gun"
-seta crosshair_nex_color_blue 1 "crosshair color blue component to display when wielding the nex gun"
+seta crosshair_nex_color "0 0.9 1" "crosshair color to display when wielding the nex gun"
seta crosshair_nex_alpha 0.85 "crosshair alpha value to display when wielding the nex gun"
seta crosshair_nex_size 0.65 "crosshair size when wielding the nex gun"
seta crosshair_hagar "" "crosshair to display when wielding the hagar"
-seta crosshair_hagar_color_red 0.85 "crosshair color red component to display when wielding the hagar"
-seta crosshair_hagar_color_green 0.5 "crosshair color green component to display when wielding the hagar"
-seta crosshair_hagar_color_blue 0.35 "crosshair color blue component to display when wielding the hagar"
+seta crosshair_hagar_color "0.85 0.5 0.35" "crosshair color to display when wielding the hagar"
seta crosshair_hagar_alpha 1 "crosshair alpha value to display when wielding the hagar"
seta crosshair_hagar_size 0.8 "crosshair size when wielding the hagar"
seta crosshair_rocketlauncher "" "crosshair to display when wielding the rocketlauncher"
-seta crosshair_rocketlauncher_color_red 1 "crosshair color red component to display when wielding the rocketlauncher"
-seta crosshair_rocketlauncher_color_green 0.75 "crosshair color green component to display when wielding the rocketlauncher"
-seta crosshair_rocketlauncher_color_blue 0.2 "crosshair color blue component to display when wielding the rocketlauncher"
+seta crosshair_rocketlauncher_color "1 0.75 0.2" "crosshair color to display when wielding the rocketlauncher"
seta crosshair_rocketlauncher_alpha 1 "crosshair alpha value to display when wielding the rocketlauncher"
seta crosshair_rocketlauncher_size 0.5875 "crosshair size when wielding the rocketlauncher"
seta crosshair_porto "" "crosshair to display when wielding the porto"
-seta crosshair_porto_color_red 0.5 "crosshair color red component to display when wielding the porto"
-seta crosshair_porto_color_green 1 "crosshair color green component to display when wielding the porto"
-seta crosshair_porto_color_blue 0.5 "crosshair color blue component to display when wielding the porto"
+seta crosshair_porto_color "0.5 1 0.5" "crosshair color to display when wielding the porto"
seta crosshair_porto_alpha 0.85 "crosshair alpha value to display when wielding the porto"
seta crosshair_porto_size 0.6 "crosshair size when wielding the porto"
seta crosshair_minstanex "" "crosshair to display when wielding the minstanex gun"
-seta crosshair_minstanex_color_red 0.65 "crosshair color red component to display when wielding the minstanex gun"
-seta crosshair_minstanex_color_green 0.65 "crosshair color green component to display when wielding the minstanex gun"
-seta crosshair_minstanex_color_blue 1 "crosshair color blue component to display when wielding the minstanex gun"
+seta crosshair_minstanex_color "0.65 0.65 1" "crosshair color to display when wielding the minstanex gun"
seta crosshair_minstanex_alpha 1 "crosshair alpha value to display when wielding the minstanex gun"
seta crosshair_minstanex_size 0.4 "crosshair size when wielding the minstanex gun"
seta crosshair_hook "" "crosshair to display when wielding the hook"
-seta crosshair_hook_color_red 0.65 "crosshair color red component to display when wielding the hook"
-seta crosshair_hook_color_green 1 "crosshair color green component to display when wielding the hook"
-seta crosshair_hook_color_blue 0.85 "crosshair color blue component to display when wielding the hook"
+seta crosshair_hook_color "0.65 1 0.85" "crosshair color to display when wielding the hook"
seta crosshair_hook_alpha 0.85 "crosshair alpha value to display when wielding the hook"
seta crosshair_hook_size 0.5 "crosshair size when wielding the hook"
seta crosshair_hlac "" "crosshair to display when wielding the H.L.A.C"
-seta crosshair_hlac_color_red 1 "crosshair color red component to display when wielding the H.L.A.C."
-seta crosshair_hlac_color_green 0.65 "crosshair color green component to display when wielding the H.L.A.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 "1 0.65 0.2" "crosshair color to display when wielding the H.L.A.C."
seta crosshair_hlac_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 "1 0.35 0.35" "crosshair color to display when wielding the TAG seeker"
seta crosshair_seeker_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"
-seta crosshair_campingrifle_color_blue 0.25 "crosshair color blue component to display when wielding the campingrifle"
+seta crosshair_campingrifle_color "0.85 0.5 0.25" "crosshair color to display when wielding the campingrifle"
seta crosshair_campingrifle_alpha 1 "crosshair alpha value to display when wielding the campingrifle"
seta crosshair_campingrifle_size 0.65 "crosshair size when wielding the campingrifle"
seta crosshair_tuba "" "crosshair to display when wielding the tuba"
-seta crosshair_tuba_color_red 0.85 "crosshair color red component to display when wielding the tuba"
-seta crosshair_tuba_color_green 0.5 "crosshair color green component to display when wielding the tuba"
-seta crosshair_tuba_color_blue 0.25 "crosshair color blue component 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"
seta crosshair_tuba_size 1 "crosshair size when wielding the tuba"
seta crosshair_fireball "" "crosshair to display when wielding the fireball"
-seta crosshair_fireball_color_red 0.2 "crosshair color red component to display when wielding the fireball"
-seta crosshair_fireball_color_green 1.0 "crosshair color green component to display when wielding the fireball"
-seta crosshair_fireball_color_blue 0.2 "crosshair color blue component to display when wielding the fireball"
+seta crosshair_fireball_color "0.2 1.0 0.2" "crosshair color to display when wielding the fireball"
seta crosshair_fireball_alpha 1 "crosshair alpha value to display when wielding the fireball"
seta crosshair_fireball_size 1 "crosshair size when wielding the fireball"
+
+// ring around crosshair, used for various purposes (such as indicating bullets left in clip, nex charge)
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 crosshair_nexvelocity_currentcharge_scale 30
-seta crosshair_nexvelocity_currentcharge_alpha 0.15
-seta crosshair_nexvelocity_currentcharge_color_red 0.8
-seta crosshair_nexvelocity_currentcharge_color_green 0
-seta crosshair_nexvelocity_currentcharge_color_blue 0
-seta crosshair_nexvelocity_currentcharge_movingavg_rate 0.05
+seta crosshair_ring_campingrifle_alpha 0.15
+
+seta crosshair_ring_nex_outer_alpha 0.15
+seta crosshair_ring_nex_inner_alpha 0.15
+seta crosshair_ring_nex_inner_color_red 0.8
+seta crosshair_ring_nex_inner_color_green 0
+seta crosshair_ring_nex_inner_color_blue 0
+seta crosshair_ring_nex_currentcharge_scale 30
+seta crosshair_ring_nex_currentcharge_movingavg_rate 0.05
seta cl_reticle_stretch 0 "whether to stretch reticles so they fit the screen (brakes image proportions)"
seta cl_reticle_item_nex 1 "draw aiming recticle for the nex weapon's zoom, 0 disables and values between 0 and 1 change alpha"
cl_rollangle 0 // amount of view tilt when strafing, default is 2.0
v_kicktime 0 // how long damage kicks of the view last, default is 0 seconds
-gl_polyblend 0.5 // whether to use screen tints, default is 1
+gl_polyblend 0 // whether to use screen tints, this has now been replaced by a better system in CSQC
r_motionblur 0 // motion blur value, default is 0
r_damageblur 0 // motion blur when damaged, default is 0
set sv_spectator_speed_multiplier 1.5
seta sv_spectate 1 "if set to 1, new clients are allowed to spectate or observe the game, if set to 0 joining clients spawn as players immediately (no spectating)"
seta sv_defaultcharacter 0 "master switch, if set to 1 the further configuration for replacing all player models, skins and colors is taken from the sv_defaultplayermodel, sv_defaultplayerskin and sv_defaultplayercolors variables"
-seta sv_defaultplayermodel "models/player/nexus.zym" "default model selection, only works if sv_defaultcharacter is set to 1"
+seta sv_defaultplayermodel "models/player/erebus.iqm" "default model selection, only works if sv_defaultcharacter is set to 1"
seta sv_defaultplayerskin 0 "each model has 1 or more skins (combination of model and skin = character), set which skin of the model you wish the default character to have, only works if sv_defaultcharacter is set to 1"
seta sv_defaultplayermodel_red "" "\"\" means see sv_defaultplayermodel"
seta sv_defaultplayerskin_red 0
set g_minstagib_ammo_start 10 "starting ammo"
set g_minstagib_ammo_drop 5 "how much ammo you'll get for weapons or cells"
set g_minstagib_invis_alpha 0.15
-set g_minstagib_speed_jumpheight 1.8 "jump height multiplier that applies while you carry the invincibility powerup"
-set g_minstagib_speed_moverate 1.25 "speed-multiplier that applies while you carry the invincibility powerup"
+set g_minstagib_speed_highspeed 1.5 "speed-multiplier that applies while you carry the invincibility powerup"
set g_vampire 0 "set to 1 to enable the vampire mode, where the damage done to your opponent gets added to your own health"
set g_weaponarena "0" "put in a list of weapons to enable a weapon arena mode, or try \"all\" or \"most\""
set g_weaponarena_random "0" "if set to a number, only that weapon count is given on every spawn (randomly)"
set g_balance_rune_speed_atkrate 0.66
set g_balance_curse_slow_atkrate 1.5
set g_balance_rune_speed_combo_atkrate 1.2
-set g_balance_rune_speed_moverate 1.25
-set g_balance_curse_slow_moverate 0.8
-set g_balance_rune_speed_combo_moverate 0.9
-set g_balance_rune_speed_jumpheight 1.4
-set g_balance_curse_slow_jumpheight 1.0
-set g_balance_rune_speed_combo_jumpheight 1.0
+set g_balance_rune_speed_highspeed 1.5
+set g_balance_curse_slow_highspeed 0.6
+set g_balance_rune_speed_combo_highspeed 0.9
// domination
set g_domination 0 "Domination: capture and hold control points to gain points"
// onslaught
set g_onslaught 0 "Onslaught: take control points towards the enemy generator and then destroy it"
-set g_onslaught_gen_health 5000
+set g_onslaught_gen_health 2500
set g_onslaught_cp_health 1000
set g_onslaught_cp_buildhealth 100
-set g_onslaught_cp_buildtime 10
+set g_onslaught_cp_buildtime 5
set g_onslaught_cp_regen 20
// assault
set g_nexball_basketball_delay_hold_forteam 60 "time before a ball reset when a team holds the ball for too long"
set g_nexball_basketball_teamsteal 1 "1 to allow players to steal from teammates, 0 to disallow"
-set g_nexball_basketball_carrier_speed 0.9 "speed multiplier for the ballcarrier"
+set g_nexball_basketball_carrier_highspeed 0.8 "speed multiplier for the ballcarrier"
set g_nexball_meter_period 1 "time to make a full cycle on the power meter"
set g_nexball_basketball_meter 1 "use the power meter for basketball"
alias singleplayer_levellist "set scmenu_campaign_dump 1; togglemenu; wait; togglemenu"
// Green's fullbright skins
-alias cl_fbskin_green "playermodel models/player/nexus.zym; playerskin 6; color 3 3"
-alias cl_fbskin_red "playermodel models/player/nexus.zym; playerskin 6; color 4 4"
-alias cl_fbskin_orange "playermodel models/player/nexus.zym; playerskin 6; color 14 14"
-alias cl_fbskin_off "playermodel models/player/nexus.zym; playerskin 0"
-alias sv_fbskin_green "g_fullbrightplayers 1; sv_defaultcharacter 1; sv_defaultplayermodel models/player/nexus.zym; sv_defaultplayerskin 6; sv_defaultplayercolors 51"
-alias sv_fbskin_red "g_fullbrightplayers 1; sv_defaultcharacter 1; sv_defaultplayermodel models/player/nexus.zym; sv_defaultplayerskin 6; sv_defaultplayercolors 68"
-alias sv_fbskin_orange "g_fullbrightplayers 1; sv_defaultcharacter 1; sv_defaultplayermodel models/player/nexus.zym; sv_defaultplayerskin 6; sv_defaultplayercolors 238"
-alias sv_fbskin_off "g_fullbrightplayers 0; sv_defaultcharacter 0; sv_defaultplayerskin 0; sv_defaultplayercolors \"\""
+alias cl_fbskin_green "playermodel models/player/erebus.iqm; playerskin 1; color 3 3"
+alias cl_fbskin_red "playermodel models/player/erebus.iqm; playerskin 1; color 4 4"
+alias cl_fbskin_orange "playermodel models/player/erebus.iqm; playerskin 1; color 14 14"
+alias cl_fbskin_off "playermodel models/player/erebus.iqm; playerskin 0"
+alias sv_fbskin_green "sv_defaultcharacter 1; sv_defaultplayermodel models/player/erebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors 51"
+alias sv_fbskin_red "sv_defaultcharacter 1; sv_defaultplayermodel models/player/erebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors 68"
+alias sv_fbskin_orange "sv_defaultcharacter 1; sv_defaultplayermodel models/player/erebus.iqm; sv_defaultplayerskin 1; sv_defaultplayercolors 238"
+alias sv_fbskin_off "sv_defaultcharacter 0; sv_defaultplayerskin 0; sv_defaultplayercolors \"\""
seta sv_servermodelsonly 1
seta hud_panel_weapons_label 1 "1 = show number of weapon, 2 = show bound key of weapon"
seta hud_panel_weapons_complainbubble_time 1 "time that a new entry stays until it fades out"
seta hud_panel_weapons_complainbubble_fadetime 0.25 "fade out time"
-seta hud_panel_weapons_accuracy 1 "show accuracy color as the weapon icon background"
-seta hud_panel_weapons_accuracy_color0 "1 0 0"
-seta hud_panel_weapons_accuracy_color1 "1 1 0"
-seta hud_panel_weapons_accuracy_color2 "0 1 0"
-seta hud_panel_weapons_accuracy_color_levels "0 20 100" "accuracy values at which a specified color (hud_panel_weapons_accuracy_color<X>) will be used. If your accuracy is between 2 of these values then a mix of the Xth and X+1th colors will be used. You can specify up to 10 values, in increasing order"
+seta hud_panel_weapons_accuracy 1 "show accuracy color as the weapon icon background; colors can be configured with accuracy_color* cvars"
seta hud_panel_weapons_ammo 1 "show ammo as a status bar"
seta hud_panel_weapons_ammo_full_shells 50 "show 100% of the status bar at this ammo count"
seta hud_panel_weapons_ammo_full_nails 200 "show 100% of the status bar at this ammo count"
seta hud_panel_weapons_timeout "3" "panel disappears if you don't switch weapon for this amount of seconds"
seta hud_panel_weapons_timeout_effect "1" "disappearance effect: 0) no effect; 1) panel moves out of screen; 2) panel fades out"
+seta hud_panel_ammo_maxammo "40" "when you have this much ammo, the ammo status bar is full"
+
+seta hud_panel_healtharmor_maxhealth "250" "when you have this much health, the health status bar is full"
+seta hud_panel_healtharmor_maxarmor "150" "when you have this much armor, the armor status bar is full"
+
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_showbinds 1 "the way to show the keys to press in HUD messages: 0 displays commands, 1 bound keys, 2 both"
seta hud_showbinds_limit 2 "maximum number of bound keys to show for a command. 0 for unlimited"
+seta hud_damage 1 "an improved version of gl_polyblend, draw an image instead when hurt"
+seta hud_damage_gentle_alpha_multiplier 0.25 "how much to multiply alpha of flash when using the cl_gentle version, it's much more opaque than the non-gentle version"
+seta hud_damage_gentle_color "1 0.7 1" "color of flash for cl_gentle version"
+seta hud_damage_color "1 0 0" "color of flash"
+seta hud_damage_factor 0.025 "(damage * factor) = how much to add to the alpha value"
+seta hud_damage_fade_rate 1 "how much to subtract from the alpha value each second"
+seta hud_damage_maxalpha 2 "how much to limit the alpha value to"
+seta hud_damage_pain_threshold 0.1 "how much alpha to ignore (must be bigger than the hud_damage_factor so that e.g. rot is ignored)"
+seta hud_damage_pain_threshold_lower 1.25 "how much we lower pain_threshold with when nearing 0 health (if pain_threshold gets negative then we always draw a flash at alpha = fabs(pain_threshold)"
+seta hud_damage_pain_threshold_lower_health 50 "at which health we start lowering pain_threshold"
+seta hud_damage_pain_threshold_pulsating_min 0.6 "minimum value when calculating the pulse: max(pulsating_min, fabs(sin(PI * time / period))"
+seta hud_damage_pain_threshold_pulsating_period 0.8 "one pulse every X seconds"
+
// 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 scoreboard_accuracy 1 "show weapon accuracy stats panel on scoreboard"
+seta scoreboard_accuracy 1 "show weapon accuracy stats panel on scoreboard; colors can be configured with accuracy_color* cvars"
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_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"
+seta accuracy_color_levels "0 20 100" "accuracy values at which a specified color (accuracy_color<X>) will be used. If your accuracy is between 2 of these values then a mix of the Xth and X+1th colors will be used. You can specify up to 10 values, in increasing order"
+seta accuracy_color0 "1 0 0"
+seta accuracy_color1 "1 1 0"
+seta accuracy_color2 "0 1 0"
+
// 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"
seta menu_slist_showempty 1 "show servers even if they are no empty and have no opponents to play against"
seta cl_gentle 0 "client side gentle mode, master switch for removing both gibs and messages"
seta cl_gentle_gibs 0 "client side gentle mode (only replaces gibs); when set to 1, white smoke replaces gibs, when set to 2, colorful clouds replace gibs"
seta cl_gentle_messages 0 "client side gentle mode (only replaces frag messages/centerprints)"
+seta cl_gentle_damage 0 "client side gentle mode (only replaces damage flash); when set to 1, a white flash replaces the blood image, when set to 2, a randomily colored flash is used instead"
seta cl_racetimer_position 0.25 "Y-axis positioning of the race timer (from 0 to 1)"
seta cl_showpressedkeys 0 "Show which movement keys someone is pressing: 1 for spectating, 2 for always"
seta cl_showacceleration 0 "show the XY acceleration of the player"
seta cl_showacceleration_z 0 "include the speed on the Z-axis"
seta cl_showacceleration_size 40 "height of the bar"
-seta cl_showacceleration_scale 5 "X-axis scale of the bar"
+seta cl_showacceleration_scale 1 "X-axis scale of the bar"
seta cl_showacceleration_alpha 0.5 "alpha of the bar"
seta cl_showacceleration_color_custom 0 "0 = dynamic color depending on acceleration, 1 = use custom color"
seta cl_showacceleration_color "1 0 0" "color of the bar, needs cl_showacceleration_color_custom to be 1"
set g_forced_team_pink "" "list of player IDs for pink team"
set g_forced_team_otherwise "default" "action if a non listed player joins (can be default for default action, spectate for forcing to spectate, or red, blue, yellow, pink)"
+// player statistics server URI
+set g_playerstats_uri ""
+
// other config files
exec balanceXonotic.cfg
exec ctfscoring-ai.cfg
exec effects-normal.cfg
-exec physicsNoQWBunny-xpmbased.cfg
+exec physicsX0.cfg
exec turrets.cfg
// hud cvar descriptions
originjitter 6 6 6
// dust/smoke drifting away from the impact
effect TE_GUNSHOT
-count 2
+count 0.8
type smoke
tex 0 8
color 0x101010 0x101010
velocityjitter 8 8 8
// dust/smoke staying at the impact
effect TE_GUNSHOT
-count 0.5
+count 0.2
type smoke
tex 0 8
color 0x505050 0x505050
velocityjitter 0 0 0
// bouncing sparks
effect TE_GUNSHOT
-count 5
+count 2.5
type spark
color 0x8f4333 0xfff31b
size 0.4 0.4
type alphastatic
notunderwater
tex 0 8
-count 3
+count 1
size 10 20
sizeincrease 25
alpha 300 550 756
type alphastatic
notunderwater
tex 36 36
-count 0.5
+count 0.2
size 10 11
sizeincrease 74
alpha 200 350 500
// sparks
effect shotgun_impact
notunderwater
-count 1.5
+count 0.5
type spark
tex 40 40
color 0xFDFFD9 0xFDFFD9
type alphastatic
notunderwater
tex 0 8
-count 3
+count 1.5
size 10 20
sizeincrease 15
alpha 300 550 456
bounce 6
velocitymultiplier 0.03
rotate 0 360 -50 50
-//derbis
+//debris
effect machinegun_impact
type alphastatic
notunderwater
// fire effect which make bright dot inside
effect hagar_explode
notunderwater
-count 5
+count 3.5
type smoke
tex 48 55
color 0xffe955 0xff5a00
type alphastatic
notunderwater
tex 0 8
-count 10
+count 7
size 20 40
sizeincrease 20
alpha 200 500 600
stretchfactor 0.1
-
-// crylink linkjoin effect
+// crylink joinexplode effect
// decal
-// used in qcsrc/client/damage.qc: pointparticles(particleeffectnum("crylink_linkjoin"), org2, '0 0 0', 1)
-effect crylink_linkjoin
+// used in qcsrc/client/damage.qc: pointparticles(particleeffectnum("crylink_joinexplode"), org2, '0 0 0', 1)
+effect crylink_joinexplode
countabsolute 1
type decal
tex 47 47
-size 8 8
+size 24 24
alpha 256 256 0
originjitter 12 12 12
-//lightradius 60
-//lightradiusfade 300
+//lightradius 200
+//lightradiusfade 800
//lightcolor 3.2 0.4 4
// purple flare effect
-effect crylink_linkjoin
+effect crylink_joinexplode
countabsolute 1
type static
tex 39 39
color 0x504060 0x504060
-size 8 8
+size 24 24
alpha 256 256 512
// purple sparks
-effect crylink_linkjoin
-count 10
+effect crylink_joinexplode
+count 40
type spark
tex 41 41
color 0xA040C0 0xA040C0
bounce 2
-size 1 2
+size 6 6
alpha 256 256 1024
-velocityjitter 256 256 256
+velocityjitter 512 512 512
// purple splash
-effect crylink_linkjoin
+effect crylink_joinexplode
count 1.5
type static
color 0xE070FF 0xE070FF
-size 8 8
+size 16 16
alpha 256 256 512
-velocityjitter 8 8 8
+velocityjitter 32 32 32
// purple splash
-effect crylink_linkjoin
-count 1.5
+effect crylink_joinexplode
+count 3
type static
color 0xE070FF 0xE070FF
-size 8 8
+size 16 16
alpha 256 256 1024
-velocityjitter 32 32 32
-
-
+velocityjitter 256 256 256
seta hud_panel_ammo_bg_padding ""
seta hud_panel_ammo_onlycurrent "0"
seta hud_panel_ammo_iconalign "0"
+seta hud_panel_ammo_progressbar "0"
+seta hud_panel_ammo_progressbar_xoffset "0"
+seta hud_panel_ammo_progressbar_name "progressbar"
+seta hud_panel_ammo_text "1"
seta hud_panel_powerups 1
seta hud_panel_powerups_pos "0.660000 0.940000"
seta hud_panel_powerups_iconalign "4"
seta hud_panel_powerups_baralign "4"
seta hud_panel_powerups_progressbar "1"
+seta hud_panel_powerups_progressbar_strength "progressbar"
+seta hud_panel_powerups_progressbar_shield "progressbar"
+seta hud_panel_powerups_text "1"
seta hud_panel_healtharmor 1
seta hud_panel_healtharmor_pos "0.330000 0.920000"
seta hud_panel_healtharmor_bg_alpha ""
seta hud_panel_healtharmor_bg_border ""
seta hud_panel_healtharmor_bg_padding ""
-seta hud_panel_healtharmor_flip "0
+seta hud_panel_healtharmor_flip "0"
seta hud_panel_healtharmor_iconalign "4"
seta hud_panel_healtharmor_baralign "4"
seta hud_panel_healtharmor_progressbar "1"
+seta hud_panel_healtharmor_progressbar_health "progressbar"
+seta hud_panel_healtharmor_progressbar_armor "progressbar"
+seta hud_panel_healtharmor_text "1"
seta hud_panel_notify 1
seta hud_panel_notify_pos "0.660000 0.730000"
--- /dev/null
+seta hud_skin "luminos"
+seta hud_panel_bg "0"
+seta hud_panel_bg_color "1 0.4375 0"
+seta hud_panel_bg_color_team "0"
+seta hud_panel_bg_alpha "1"
+seta hud_panel_bg_border "8"
+seta hud_panel_bg_padding "2"
+seta hud_panel_fg_alpha "1"
+
+seta hud_dock "0"
+seta hud_dock_color "0 0.449576 0.860796"
+seta hud_dock_color_team "0.700000"
+seta hud_dock_alpha "1"
+
+seta hud_progressbar_alpha "0.500000"
+seta hud_progressbar_strength_color "0 0 0.6"
+seta hud_progressbar_shield_color "0.6 0 0.6"
+seta hud_progressbar_health_color "0.6 0 0"
+seta hud_progressbar_armor_color "0 0.6 0"
+seta hud_progressbar_fuel_color "0.6 0.6 0"
+seta hud_progressbar_nexball_color "0.7 0.1 0"
+
+seta _hud_panelorder "10 3 0 14 6 9 13 4 1 2 11 12 7 5 8 "
+
+seta hud_configure_grid "1"
+seta hud_configure_grid_xsize "0.010000"
+seta hud_configure_grid_ysize "0.010000"
+
+seta scr_centerpos "0.25"
+
+seta hud_panel_weapons 1
+seta hud_panel_weapons_pos "0.350000 0.940000"
+seta hud_panel_weapons_size "0.300000 0.060000"
+seta hud_panel_weapons_bg ""
+seta hud_panel_weapons_bg_color ""
+seta hud_panel_weapons_bg_color_team ""
+seta hud_panel_weapons_bg_alpha ""
+seta hud_panel_weapons_bg_border ""
+seta hud_panel_weapons_bg_padding ""
+seta hud_panel_weapons_complainbubble "1"
+seta hud_panel_weapons_complainbubble_padding "-10"
+seta hud_panel_weapons_complainbubble_color_outofammo "0.8 0 0"
+seta hud_panel_weapons_complainbubble_color_donthave "0.8 0.5 0"
+seta hud_panel_weapons_complainbubble_color_unavailable "0 0.3 0.8"
+seta hud_panel_weapons_ammo_color "0 1 0"
+seta hud_panel_weapons_ammo_alpha "1"
+seta hud_panel_weapons_aspect "2"
+
+seta hud_panel_ammo 1
+seta hud_panel_ammo_pos "0.650000 0.890000"
+seta hud_panel_ammo_size "0.055000 0.110000"
+seta hud_panel_ammo_bg ""
+seta hud_panel_ammo_bg_color ""
+seta hud_panel_ammo_bg_color_team ""
+seta hud_panel_ammo_bg_alpha ""
+seta hud_panel_ammo_bg_border ""
+seta hud_panel_ammo_bg_padding ""
+seta hud_panel_ammo_onlycurrent "0"
+seta hud_panel_ammo_iconalign "0"
+seta hud_panel_ammo_progressbar "0"
+seta hud_panel_ammo_progressbar_xoffset "0"
+seta hud_panel_ammo_progressbar_name "progressbar"
+seta hud_panel_ammo_text "1"
+
+seta hud_panel_powerups 1
+seta hud_panel_powerups_pos "0.290000 0.890000"
+seta hud_panel_powerups_size "0.055000 0.110000"
+seta hud_panel_powerups_bg "0"
+seta hud_panel_powerups_bg_color ""
+seta hud_panel_powerups_bg_color_team ""
+seta hud_panel_powerups_bg_alpha ""
+seta hud_panel_powerups_bg_border ""
+seta hud_panel_powerups_bg_padding "-3"
+seta hud_panel_powerups_flip "1"
+seta hud_panel_powerups_iconalign "1"
+seta hud_panel_powerups_baralign "1"
+seta hud_panel_powerups_progressbar "1"
+seta hud_panel_powerups_progressbar_strength "progressbar"
+seta hud_panel_powerups_progressbar_shield "progressbar"
+seta hud_panel_powerups_text "1"
+
+seta hud_panel_healtharmor 1
+seta hud_panel_healtharmor_pos "0.350000 0.890000"
+seta hud_panel_healtharmor_size "0.300000 0.050000"
+seta hud_panel_healtharmor_bg ""
+seta hud_panel_healtharmor_bg_color ""
+seta hud_panel_healtharmor_bg_color_team ""
+seta hud_panel_healtharmor_bg_alpha ""
+seta hud_panel_healtharmor_bg_border ""
+seta hud_panel_healtharmor_bg_padding "0"
+seta hud_panel_healtharmor_flip "0"
+seta hud_panel_healtharmor_iconalign "3"
+seta hud_panel_healtharmor_baralign "3"
+seta hud_panel_healtharmor_progressbar "1"
+seta hud_panel_healtharmor_progressbar_health "progressbar"
+seta hud_panel_healtharmor_progressbar_armor "progressbar"
+seta hud_panel_healtharmor_text "1"
+
+seta hud_panel_notify 1
+seta hud_panel_notify_pos "0 0"
+seta hud_panel_notify_size "0.210000 0.260000"
+seta hud_panel_notify_bg "0"
+seta hud_panel_notify_bg_color ""
+seta hud_panel_notify_bg_color_team ""
+seta hud_panel_notify_bg_alpha ""
+seta hud_panel_notify_bg_border ""
+seta hud_panel_notify_bg_padding ""
+seta hud_panel_notify_flip "1"
+seta hud_panel_notify_print "0"
+
+seta hud_panel_timer 1
+seta hud_panel_timer_pos "0.435000 0"
+seta hud_panel_timer_size "0.135000 0.060000"
+seta hud_panel_timer_bg "0"
+seta hud_panel_timer_bg_color ""
+seta hud_panel_timer_bg_color_team ""
+seta hud_panel_timer_bg_alpha ""
+seta hud_panel_timer_bg_border ""
+seta hud_panel_timer_bg_padding "0"
+
+seta hud_panel_radar 2
+seta hud_panel_radar_pos "0.810000 0"
+seta hud_panel_radar_size "0.190000 0.250000"
+seta hud_panel_radar_bg "border_radar"
+seta hud_panel_radar_bg_color ""
+seta hud_panel_radar_bg_color_team ""
+seta hud_panel_radar_bg_alpha "0.500000"
+seta hud_panel_radar_bg_border "0"
+seta hud_panel_radar_bg_padding "0"
+seta hud_panel_radar_foreground_alpha "0.500000"
+
+seta hud_panel_score 1
+seta hud_panel_score_pos "0.465000 0.045000"
+seta hud_panel_score_size "0.090000 0.060000"
+seta hud_panel_score_bg ""
+seta hud_panel_score_bg_color ""
+seta hud_panel_score_bg_color_team ""
+seta hud_panel_score_bg_alpha ""
+seta hud_panel_score_bg_border ""
+seta hud_panel_score_bg_padding ""
+
+seta hud_panel_racetimer 1
+seta hud_panel_racetimer_pos "0.360000 0.090000"
+seta hud_panel_racetimer_size "0.280000 0.090000"
+seta hud_panel_racetimer_bg "0"
+seta hud_panel_racetimer_bg_color ""
+seta hud_panel_racetimer_bg_color_team ""
+seta hud_panel_racetimer_bg_alpha ""
+seta hud_panel_racetimer_bg_border ""
+seta hud_panel_racetimer_bg_padding ""
+
+seta hud_panel_vote 1
+seta hud_panel_vote_pos "0 0.890000"
+seta hud_panel_vote_size "0.170000 0.110000"
+seta hud_panel_vote_bg ""
+seta hud_panel_vote_bg_color ""
+seta hud_panel_vote_bg_color_team ""
+seta hud_panel_vote_bg_alpha ""
+seta hud_panel_vote_bg_border ""
+seta hud_panel_vote_bg_padding ""
+seta hud_panel_vote_alreadyvoted_alpha "0.800000"
+
+seta hud_panel_modicons 1
+seta hud_panel_modicons_pos "0.560000 0"
+seta hud_panel_modicons_size "0.050000 0.100000"
+seta hud_panel_modicons_bg ""
+seta hud_panel_modicons_bg_color ""
+seta hud_panel_modicons_bg_color_team ""
+seta hud_panel_modicons_bg_alpha ""
+seta hud_panel_modicons_bg_border ""
+seta hud_panel_modicons_bg_padding ""
+
+seta hud_panel_pressedkeys 1
+seta hud_panel_pressedkeys_pos "0.450000 0.650000"
+seta hud_panel_pressedkeys_size "0.100000 0.110000"
+seta hud_panel_pressedkeys_bg "0"
+seta hud_panel_pressedkeys_bg_color ""
+seta hud_panel_pressedkeys_bg_color_team ""
+seta hud_panel_pressedkeys_bg_alpha ""
+seta hud_panel_pressedkeys_bg_border ""
+seta hud_panel_pressedkeys_bg_padding ""
+seta hud_panel_pressedkeys_aspect "1.600000"
+
+seta hud_panel_chat 1
+seta hud_panel_chat_pos "0 0.775000"
+seta hud_panel_chat_size "0.460000 0.110000"
+seta hud_panel_chat_bg "0"
+seta hud_panel_chat_bg_color ""
+seta hud_panel_chat_bg_color_team ""
+seta hud_panel_chat_bg_alpha ""
+seta hud_panel_chat_bg_border ""
+seta hud_panel_chat_bg_padding ""
+
+seta hud_panel_engineinfo 0
+seta hud_panel_engineinfo_pos "0.910000 0.970000"
+seta hud_panel_engineinfo_size "0.090000 0.030000"
+seta hud_panel_engineinfo_bg "0"
+seta hud_panel_engineinfo_bg_color ""
+seta hud_panel_engineinfo_bg_color_team ""
+seta hud_panel_engineinfo_bg_alpha ""
+seta hud_panel_engineinfo_bg_border ""
+seta hud_panel_engineinfo_bg_padding ""
+
+seta hud_panel_infomessages 1
+seta hud_panel_infomessages_pos "0.710000 0"
+seta hud_panel_infomessages_size "0.290000 0.100000"
+seta hud_panel_infomessages_bg "0"
+seta hud_panel_infomessages_bg_color ""
+seta hud_panel_infomessages_bg_color_team ""
+seta hud_panel_infomessages_bg_alpha ""
+seta hud_panel_infomessages_bg_border ""
+seta hud_panel_infomessages_bg_padding "0"
+seta hud_panel_infomessages_flip "1"
+
+menu_sync
--- /dev/null
+seta hud_skin "luminos_xhair"
+seta hud_panel_bg "0"
+seta hud_panel_bg_color "1 0.4375 0"
+seta hud_panel_bg_color_team "0"
+seta hud_panel_bg_alpha "1"
+seta hud_panel_bg_border "8"
+seta hud_panel_bg_padding "2"
+seta hud_panel_fg_alpha "1"
+
+seta hud_dock "0"
+seta hud_dock_color "0 0.449576 0.860796"
+seta hud_dock_color_team "0.700000"
+seta hud_dock_alpha "1"
+
+seta hud_progressbar_alpha "0.3"
+seta hud_progressbar_strength_color "0 0 0.6"
+seta hud_progressbar_shield_color "0.6 0 0.6"
+seta hud_progressbar_health_color "0.6 0 0"
+seta hud_progressbar_armor_color "0 0.6 0"
+seta hud_progressbar_fuel_color "0.6 0.6 0"
+seta hud_progressbar_nexball_color "0.7 0.1 0"
+
+seta _hud_panelorder "3 1 2 11 10 0 14 6 9 13 4 12 7 5 8 "
+
+seta hud_configure_grid "1"
+seta hud_configure_grid_xsize "0.010000"
+seta hud_configure_grid_ysize "0.010000"
+
+seta scr_centerpos "0.25"
+
+seta hud_panel_weapons 1
+seta hud_panel_weapons_pos "0.350000 0.940000"
+seta hud_panel_weapons_size "0.300000 0.060000"
+seta hud_panel_weapons_bg ""
+seta hud_panel_weapons_bg_color ""
+seta hud_panel_weapons_bg_color_team ""
+seta hud_panel_weapons_bg_alpha ""
+seta hud_panel_weapons_bg_border ""
+seta hud_panel_weapons_bg_padding ""
+seta hud_panel_weapons_complainbubble "1"
+seta hud_panel_weapons_complainbubble_padding "-10"
+seta hud_panel_weapons_complainbubble_color_outofammo "0.8 0 0"
+seta hud_panel_weapons_complainbubble_color_donthave "0.8 0.5 0"
+seta hud_panel_weapons_complainbubble_color_unavailable "0 0.3 0.8"
+seta hud_panel_weapons_ammo_color "0 1 0"
+seta hud_panel_weapons_ammo_alpha "1"
+seta hud_panel_weapons_aspect "2"
+
+seta hud_panel_ammo 1
+seta hud_panel_ammo_pos "0.450000 0.630000"
+seta hud_panel_ammo_size "0.080000 0.040000"
+seta hud_panel_ammo_bg ""
+seta hud_panel_ammo_bg_color ""
+seta hud_panel_ammo_bg_color_team ""
+seta hud_panel_ammo_bg_alpha ""
+seta hud_panel_ammo_bg_border ""
+seta hud_panel_ammo_bg_padding ""
+seta hud_panel_ammo_onlycurrent "1"
+seta hud_panel_ammo_iconalign "0"
+seta hud_panel_ammo_progressbar "1"
+seta hud_panel_ammo_progressbar_name "progressbar_ammo"
+seta hud_panel_ammo_text "1"
+
+seta hud_panel_powerups 1
+seta hud_panel_powerups_pos "0.270000 0.940000"
+seta hud_panel_powerups_size "0.080000 0.060000"
+seta hud_panel_powerups_bg "0"
+seta hud_panel_powerups_bg_color ""
+seta hud_panel_powerups_bg_color_team ""
+seta hud_panel_powerups_bg_alpha ""
+seta hud_panel_powerups_bg_border ""
+seta hud_panel_powerups_bg_padding "-3"
+seta hud_panel_powerups_flip "1"
+seta hud_panel_powerups_iconalign "1"
+seta hud_panel_powerups_baralign "1"
+seta hud_panel_powerups_progressbar "1"
+seta hud_panel_powerups_progressbar_strength "progressbar"
+seta hud_panel_powerups_progressbar_shield "progressbar"
+
+seta hud_panel_healtharmor 1
+seta hud_panel_healtharmor_pos "0.350000 0.380000"
+seta hud_panel_healtharmor_size "0.070000 0.240000"
+seta hud_panel_healtharmor_bg "border_healtharmor"
+seta hud_panel_healtharmor_bg_color "0.464391 0.464391 0.464391"
+seta hud_panel_healtharmor_bg_color_team ""
+seta hud_panel_healtharmor_bg_alpha "0.600000"
+seta hud_panel_healtharmor_bg_border "-1"
+seta hud_panel_healtharmor_bg_padding "0"
+seta hud_panel_healtharmor_flip "0"
+seta hud_panel_healtharmor_iconalign "1"
+seta hud_panel_healtharmor_baralign "1"
+seta hud_panel_healtharmor_progressbar "1"
+seta hud_panel_healtharmor_progressbar_health "progressbar_health"
+seta hud_panel_healtharmor_progressbar_armor "progressbar_armor"
+seta hud_panel_healtharmor_text "0"
+
+seta hud_panel_notify 1
+seta hud_panel_notify_pos "0 0"
+seta hud_panel_notify_size "0.210000 0.260000"
+seta hud_panel_notify_bg "0"
+seta hud_panel_notify_bg_color ""
+seta hud_panel_notify_bg_color_team ""
+seta hud_panel_notify_bg_alpha ""
+seta hud_panel_notify_bg_border ""
+seta hud_panel_notify_bg_padding ""
+seta hud_panel_notify_flip "1"
+seta hud_panel_notify_print "0"
+
+seta hud_panel_timer 1
+seta hud_panel_timer_pos "0.435000 0"
+seta hud_panel_timer_size "0.135000 0.060000"
+seta hud_panel_timer_bg "0"
+seta hud_panel_timer_bg_color ""
+seta hud_panel_timer_bg_color_team ""
+seta hud_panel_timer_bg_alpha ""
+seta hud_panel_timer_bg_border ""
+seta hud_panel_timer_bg_padding "0"
+
+seta hud_panel_radar 2
+seta hud_panel_radar_pos "0.810000 0"
+seta hud_panel_radar_size "0.190000 0.250000"
+seta hud_panel_radar_bg "border_radar"
+seta hud_panel_radar_bg_color ""
+seta hud_panel_radar_bg_color_team ""
+seta hud_panel_radar_bg_alpha "0.500000"
+seta hud_panel_radar_bg_border "0"
+seta hud_panel_radar_bg_padding "0"
+seta hud_panel_radar_foreground_alpha "0.500000"
+
+seta hud_panel_score 1
+seta hud_panel_score_pos "0.465000 0.045000"
+seta hud_panel_score_size "0.090000 0.060000"
+seta hud_panel_score_bg ""
+seta hud_panel_score_bg_color ""
+seta hud_panel_score_bg_color_team ""
+seta hud_panel_score_bg_alpha ""
+seta hud_panel_score_bg_border ""
+seta hud_panel_score_bg_padding ""
+
+seta hud_panel_racetimer 1
+seta hud_panel_racetimer_pos "0.360000 0.090000"
+seta hud_panel_racetimer_size "0.280000 0.090000"
+seta hud_panel_racetimer_bg "0"
+seta hud_panel_racetimer_bg_color ""
+seta hud_panel_racetimer_bg_color_team ""
+seta hud_panel_racetimer_bg_alpha ""
+seta hud_panel_racetimer_bg_border ""
+seta hud_panel_racetimer_bg_padding ""
+
+seta hud_panel_vote 1
+seta hud_panel_vote_pos "0 0.890000"
+seta hud_panel_vote_size "0.170000 0.110000"
+seta hud_panel_vote_bg ""
+seta hud_panel_vote_bg_color ""
+seta hud_panel_vote_bg_color_team ""
+seta hud_panel_vote_bg_alpha ""
+seta hud_panel_vote_bg_border ""
+seta hud_panel_vote_bg_padding ""
+seta hud_panel_vote_alreadyvoted_alpha "0.800000"
+
+seta hud_panel_modicons 1
+seta hud_panel_modicons_pos "0.560000 0"
+seta hud_panel_modicons_size "0.050000 0.100000"
+seta hud_panel_modicons_bg ""
+seta hud_panel_modicons_bg_color ""
+seta hud_panel_modicons_bg_color_team ""
+seta hud_panel_modicons_bg_alpha ""
+seta hud_panel_modicons_bg_border ""
+seta hud_panel_modicons_bg_padding ""
+
+seta hud_panel_pressedkeys 1
+seta hud_panel_pressedkeys_pos "0.450000 0.690000"
+seta hud_panel_pressedkeys_size "0.100000 0.110000"
+seta hud_panel_pressedkeys_bg "0"
+seta hud_panel_pressedkeys_bg_color ""
+seta hud_panel_pressedkeys_bg_color_team ""
+seta hud_panel_pressedkeys_bg_alpha ""
+seta hud_panel_pressedkeys_bg_border ""
+seta hud_panel_pressedkeys_bg_padding ""
+seta hud_panel_pressedkeys_aspect "1.600000"
+
+seta hud_panel_chat 1
+seta hud_panel_chat_pos "0 0.775000"
+seta hud_panel_chat_size "0.460000 0.110000"
+seta hud_panel_chat_bg "0"
+seta hud_panel_chat_bg_color ""
+seta hud_panel_chat_bg_color_team ""
+seta hud_panel_chat_bg_alpha ""
+seta hud_panel_chat_bg_border ""
+seta hud_panel_chat_bg_padding ""
+
+seta hud_panel_engineinfo 0
+seta hud_panel_engineinfo_pos "0.910000 0.970000"
+seta hud_panel_engineinfo_size "0.090000 0.030000"
+seta hud_panel_engineinfo_bg "0"
+seta hud_panel_engineinfo_bg_color ""
+seta hud_panel_engineinfo_bg_color_team ""
+seta hud_panel_engineinfo_bg_alpha ""
+seta hud_panel_engineinfo_bg_border ""
+seta hud_panel_engineinfo_bg_padding ""
+
+seta hud_panel_infomessages 1
+seta hud_panel_infomessages_pos "0.710000 0"
+seta hud_panel_infomessages_size "0.290000 0.100000"
+seta hud_panel_infomessages_bg "0"
+seta hud_panel_infomessages_bg_color ""
+seta hud_panel_infomessages_bg_color_team ""
+seta hud_panel_infomessages_bg_alpha ""
+seta hud_panel_infomessages_bg_border ""
+seta hud_panel_infomessages_bg_padding "0"
+seta hud_panel_infomessages_flip "1"
+
+menu_sync
seta hud_panel_ammo_bg_padding ""
seta hud_panel_ammo_onlycurrent "0"
seta hud_panel_ammo_iconalign "0"
+seta hud_panel_ammo_progressbar "0"
+seta hud_panel_ammo_progressbar_xoffset "0"
+seta hud_panel_ammo_progressbar_name "progressbar"
+seta hud_panel_ammo_text "1"
seta hud_panel_powerups 1
seta hud_panel_powerups_pos "0.660000 0.910000"
seta hud_panel_powerups_iconalign "0"
seta hud_panel_powerups_baralign "0"
seta hud_panel_powerups_progressbar "0"
+seta hud_panel_powerups_progressbar_strength "progressbar"
+seta hud_panel_powerups_progressbar_shield "progressbar"
+seta hud_panel_powerups_text "1"
seta hud_panel_healtharmor 1
seta hud_panel_healtharmor_pos "0.370000 0.930000"
seta hud_panel_healtharmor_bg_alpha ""
seta hud_panel_healtharmor_bg_border ""
seta hud_panel_healtharmor_bg_padding ""
-seta hud_panel_healtharmor_flip "0
+seta hud_panel_healtharmor_flip "0"
seta hud_panel_healtharmor_iconalign "0"
seta hud_panel_healtharmor_baralign "0"
seta hud_panel_healtharmor_progressbar "0"
+seta hud_panel_healtharmor_progressbar_health "progressbar"
+seta hud_panel_healtharmor_progressbar_armor "progressbar"
+seta hud_panel_healtharmor_text "1"
seta hud_panel_notify 0
seta hud_panel_notify_pos "0 0.650000"
+++ /dev/null
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-
-my ($in, $out) = @ARGV;
-
-my %changes = ();
-while(<STDIN>)
-{
- chomp;
- /^(?:seta?\s)?\s*(\S+)\s+(.*)/
- or next;
- $changes{$1} = $2;
-}
-
-my %changes_unapplied = %changes;
-my $result = "";
-open my $fh, "<", $in
- or die "<$in: $!";
-while(<$fh>)
-{
- chomp;
- /^(seta?\s?\s*)(\S+)(\s+)(.*)/
- or do { $result .= "$_\n"; next; };
- my $v = exists($changes{$2}) ? $changes{$2} : $4;
- $result .= "$1$2$3$v\n";
- delete $changes_unapplied{$2};
-}
-close $fh;
-open $fh, ">", $out
- or die ">$out: $!";
-print $fh $result;
-print $fh "set $_ $changes_unapplied{$_}\n" for keys %changes_unapplied;
-close $fh;
--- /dev/null
+erebus,erebus
+erebus.001,shadowhead
--- /dev/null
+erebus,erebusfullbright
+erebus.001,shadowhead
--- /dev/null
+//TAG: soldier
+//affirmative sound/player/carni-lycan/player/affirmative 0
+attack sound/player/soldier/coms/attack 0
+//attacking sound/player/carni-lycan/player/attacking 0
+attackinfive sound/player/soldier/coms/attackinfive 0
+coverme sound/player/soldier/coms/coverme 0
+defend sound/player/soldier/coms/defend 0
+//defending sound/player/carni-lycan/player/defending 0
+//droppedflag sound/player/carni-lycan/player/droppedflag 0
+flagcarriertakingdamage sound/player/soldier/coms/flagcarriertakingdamage 0
+freelance sound/player/soldier/coms/freelance 2
+getflag sound/player/soldier/coms/getflag 0
+incoming sound/player/soldier/coms/incoming 0
+meet sound/player/soldier/coms/meet 0
+needhelp sound/player/soldier/coms/needhelp 2
+//negative sound/player/carni-lycan/player/negative 0
+//onmyway sound/player/carni-lycan/player/onmyway 0
+//roaming sound/player/carni-lycan/player/roaming 0
+//seenenemy sound/player/carni-lycan/player/seenenemy 0
+seenflag sound/player/soldier/coms/seenflag 0
+taunt sound/player/soldier/coms/taunt 3
+teamshoot sound/player/soldier/coms/teamshoot 3
+death sound/player/soldier/player/death 3
+drown sound/player/soldier/player/drown 0
+fall sound/player/soldier/player/fall 0
+falling sound/player/soldier/player/falling 0
+gasp sound/player/soldier/player/gasp 0
+jump sound/player/soldier/player/jump 0
+pain25 sound/player/soldier/player/pain25 0
+pain50 sound/player/soldier/player/pain50 0
+pain75 sound/player/soldier/player/pain75 0
+pain100 sound/player/soldier/player/pain100 0
--- /dev/null
+name Glowing Erebus
+species human
+sex Male
+weight 106
+age 26
+
+Heavyweight Xonotic Solider with LEDs
--- /dev/null
+erebus,erebus
+erebus.001,shadowhead
--- /dev/null
+erebus,erebusfullbright
+erebus.001,shadowhead
--- /dev/null
+erebus,erebus
+erebus.001,shadowhead
--- /dev/null
+erebus,erebusfullbright
+erebus.001,shadowhead
sprite item-shield "Shield" ff00ff 000000 0.5 ff00ff ffff00 0.5
sprite item-fuelregen "Fuel regen" ff8000 000000 0.5 ff8000 ffff00 0.5
sprite item-jetpack "Jet Pack" 808080 000000 0.5 808080 ffff00 0.5
+
+sprite freezetag_frozen "Frozen!" 40e6ff 000000 0.0 # bright cyan
+++ /dev/null
-// Xonotic 1.0 physics
-sv_gravity 800
-sv_maxspeed 400
-sv_maxairspeed 100
-sv_stopspeed 100
-sv_accelerate 5.5
-sv_airaccelerate 5.5
-sv_friction 5
-edgefriction 1
-sv_stepheight 34
-sv_jumpvelocity 300
-sv_wateraccelerate -1
-sv_waterfriction -1
-sv_airaccel_sideways_friction 0
-sv_airaccel_qw 0
-sv_airstopaccelerate 0
-sv_airstrafeaccelerate 0
-sv_maxairstrafespeed 0
-sv_airstrafeaccel_qw 0
-sv_aircontrol 0
-sv_aircontrol_penalty 0
-sv_aircontrol_power 2
-sv_airspeedlimit_nonqw 0
-sv_warsowbunny_turnaccel 0
-sv_warsowbunny_accel 0.1593
-sv_warsowbunny_topspeed 925
-sv_warsowbunny_backtosideratio 0.8
-sv_friction_on_land 0.5
-sv_doublejump 0
-// 1.0 did not allow re-jumping due to a bug, this is quite close to it
-sv_jumpspeedcap_min ""
-sv_jumpspeedcap_max ""
-sv_jumpspeedcap_max_disable_on_ramps 0
+++ /dev/null
-// Xonotic 1.5 physics
-sv_gravity 800
-sv_maxspeed 400
-sv_maxairspeed 50
-sv_stopspeed 100
-sv_accelerate 5.5
-sv_airaccelerate 5.5
-sv_friction 5
-edgefriction 1
-sv_stepheight 34
-sv_jumpvelocity 300
-sv_wateraccelerate -1
-sv_waterfriction -1
-sv_airaccel_sideways_friction 0
-sv_airaccel_qw 0
-sv_airstopaccelerate 0
-sv_airstrafeaccelerate 0
-sv_maxairstrafespeed 0
-sv_airstrafeaccel_qw 0
-sv_aircontrol 0
-sv_aircontrol_penalty 0
-sv_aircontrol_power 2
-sv_airspeedlimit_nonqw 0
-sv_warsowbunny_turnaccel 0
-sv_warsowbunny_accel 0.1593
-sv_warsowbunny_topspeed 925
-sv_warsowbunny_backtosideratio 0.8
-sv_friction_on_land 0.25
-sv_doublejump 0
-sv_jumpspeedcap_min ""
-sv_jumpspeedcap_max ""
-sv_jumpspeedcap_max_disable_on_ramps 0
+++ /dev/null
-// experimental post-Xonotic 1.5 physics (never released)
-sv_gravity 800
-sv_maxspeed 400
-sv_maxairspeed 50
-sv_stopspeed 100
-sv_accelerate 5.5
-sv_airaccelerate 5.5
-sv_friction 5
-edgefriction 1
-sv_stepheight 34
-sv_jumpvelocity 300
-sv_wateraccelerate -1
-sv_waterfriction -1
-sv_airaccel_sideways_friction 0
-sv_airaccel_qw 0
-sv_airstopaccelerate 0
-sv_airstrafeaccelerate 0
-sv_maxairstrafespeed 0
-sv_airstrafeaccel_qw 0
-sv_aircontrol 0
-sv_aircontrol_penalty 0
-sv_aircontrol_power 2
-sv_airspeedlimit_nonqw 0
-sv_warsowbunny_turnaccel 0
-sv_warsowbunny_accel 0.1593
-sv_warsowbunny_topspeed 925
-sv_warsowbunny_backtosideratio 0.8
-sv_friction_on_land 0
-sv_doublejump 0
-sv_jumpspeedcap_min ""
-sv_jumpspeedcap_max ""
-sv_jumpspeedcap_max_disable_on_ramps 0
+++ /dev/null
-// experimental post-Xonotic 1.5 physics (never released)
-sv_gravity 800
-sv_maxspeed 400
-sv_maxairspeed 25
-sv_stopspeed 100
-sv_accelerate 5.5
-sv_airaccelerate 5.5
-sv_friction 5
-edgefriction 1
-sv_stepheight 34
-sv_jumpvelocity 300
-sv_wateraccelerate -1
-sv_waterfriction -1
-sv_airaccel_sideways_friction 0
-sv_airaccel_qw 0
-sv_airstopaccelerate 0
-sv_airstrafeaccelerate 0
-sv_maxairstrafespeed 0
-sv_airstrafeaccel_qw 0
-sv_aircontrol 0
-sv_aircontrol_penalty 0
-sv_aircontrol_power 2
-sv_airspeedlimit_nonqw 0
-sv_warsowbunny_turnaccel 0
-sv_warsowbunny_accel 0.1593
-sv_warsowbunny_topspeed 925
-sv_warsowbunny_backtosideratio 0.8
-sv_friction_on_land 0
-sv_doublejump 0
-sv_jumpspeedcap_min ""
-sv_jumpspeedcap_max ""
-sv_jumpspeedcap_max_disable_on_ramps 0
+++ /dev/null
-// experimental post-Xonotic 1.5 physics (never released)
-sv_gravity 800
-sv_maxspeed 400
-sv_maxairspeed 50
-sv_stopspeed 100
-sv_accelerate 5.5
-sv_airaccelerate 5.5
-sv_friction 5
-edgefriction 1
-sv_stepheight 34
-sv_jumpvelocity 300
-sv_wateraccelerate -1
-sv_waterfriction -1
-sv_airaccel_sideways_friction 0
-sv_airaccel_qw 0
-sv_airstopaccelerate 0
-sv_airstrafeaccelerate 0
-sv_maxairstrafespeed 0
-sv_airstrafeaccel_qw 0
-sv_aircontrol 0
-sv_aircontrol_penalty 0
-sv_aircontrol_power 2
-sv_airspeedlimit_nonqw 0
-sv_warsowbunny_turnaccel 0
-sv_warsowbunny_accel 0.1593
-sv_warsowbunny_topspeed 925
-sv_warsowbunny_backtosideratio 0.8
-sv_friction_on_land 0.2
-sv_doublejump 0
-sv_jumpspeedcap_min ""
-sv_jumpspeedcap_max ""
-sv_jumpspeedcap_max_disable_on_ramps 0
+++ /dev/null
-// Quake, Bunny Reintroduced (Xonotic 2.0 to 2.4.2 physics)
-sv_gravity 800
-sv_maxspeed 400
-sv_maxairspeed 220
-sv_stopspeed 100
-sv_accelerate 5.5
-sv_airaccelerate 5.5
-sv_friction 5
-edgefriction 1
-sv_stepheight 34
-sv_jumpvelocity 300
-sv_wateraccelerate -1
-sv_waterfriction -1
-sv_airaccel_sideways_friction 0.3
-sv_airaccel_qw 0.93
-sv_airstopaccelerate 0
-sv_airstrafeaccelerate 0
-sv_maxairstrafespeed 0
-sv_airstrafeaccel_qw 0
-sv_aircontrol 0
-sv_aircontrol_penalty 0
-sv_aircontrol_power 2
-sv_airspeedlimit_nonqw 0
-sv_warsowbunny_turnaccel 0
-sv_warsowbunny_accel 0.1593
-sv_warsowbunny_topspeed 925
-sv_warsowbunny_backtosideratio 0.8
-sv_friction_on_land 0
-sv_doublejump 0
-sv_jumpspeedcap_min ""
-sv_jumpspeedcap_max ""
-sv_jumpspeedcap_max_disable_on_ramps 0
+++ /dev/null
-// Xonotic 2.5 physics
-sv_gravity 800
-sv_maxspeed 400
-sv_maxairspeed 220
-sv_stopspeed 100
-sv_accelerate 8
-sv_airaccelerate 5.5
-sv_friction 7
-edgefriction 1
-sv_stepheight 34
-sv_jumpvelocity 300
-sv_wateraccelerate -1
-sv_waterfriction -1
-sv_airaccel_sideways_friction 0.35
-sv_airaccel_qw 0.95
-sv_airstopaccelerate 0
-sv_airstrafeaccelerate 0
-sv_maxairstrafespeed 0
-sv_airstrafeaccel_qw 0
-sv_aircontrol 0
-sv_aircontrol_penalty 0
-sv_aircontrol_power 2
-sv_airspeedlimit_nonqw 0
-sv_warsowbunny_turnaccel 0
-sv_warsowbunny_accel 0.1593
-sv_warsowbunny_topspeed 925
-sv_warsowbunny_backtosideratio 0.8
-sv_friction_on_land 0
-sv_doublejump 0
-sv_jumpspeedcap_min ""
-sv_jumpspeedcap_max ""
-sv_jumpspeedcap_max_disable_on_ramps 0
+++ /dev/null
-// Xonotic 2.6 physics
-sv_gravity 800
-sv_maxspeed 400
-sv_maxairspeed 220
-sv_stopspeed 100
-sv_accelerate 8
-sv_airaccelerate 5.5
-sv_friction 7
-edgefriction 1
-sv_stepheight 34
-sv_jumpvelocity 300
-sv_wateraccelerate -1
-sv_waterfriction -1
-sv_airaccel_sideways_friction 0.35
-sv_airaccel_qw 0.95
-sv_airstopaccelerate 0
-sv_airstrafeaccelerate 0
-sv_maxairstrafespeed 0
-sv_airstrafeaccel_qw 0
-sv_aircontrol 0
-sv_aircontrol_penalty 0
-sv_aircontrol_power 2
-sv_airspeedlimit_nonqw 0
-sv_warsowbunny_turnaccel 0
-sv_warsowbunny_accel 0.1593
-sv_warsowbunny_topspeed 925
-sv_warsowbunny_backtosideratio 0.8
-sv_friction_on_land 0
-sv_doublejump 0
-sv_jumpspeedcap_min ""
-sv_jumpspeedcap_max ""
-sv_jumpspeedcap_max_disable_on_ramps 0
--- /dev/null
+// "NoQWBunny" physics based on XPM
+sv_gravity 800
+sv_maxspeed 424
+sv_maxairspeed 400
+
+sv_stopspeed 100
+sv_accelerate 13
+sv_airaccelerate 2
+sv_friction 8
+edgefriction 1
+sv_stepheight 26
+// Q1: 16+2
+// Nex: 32+2
+// we try: 24+2
+
+// actually, what we want is 266.6666 for 180bpm
+// but 260 takes same amount of frames and is nicer to mappers
+sv_jumpvelocity 260
+sv_wateraccelerate -1
+sv_waterfriction -1
+sv_airaccel_sideways_friction 0 // breaks strafing?
+sv_airaccel_qw -0.8
+
+sv_airstopaccelerate -0.95
+sv_airstrafeaccelerate 24
+sv_maxairstrafespeed 100
+sv_airstrafeaccel_qw -0.97
+sv_aircontrol 125
+sv_aircontrol_penalty 150
+sv_aircontrol_power 2.5
+sv_airspeedlimit_nonqw 800
+sv_warsowbunny_turnaccel 0
+sv_warsowbunny_accel 0.1593
+sv_warsowbunny_topspeed 925
+sv_warsowbunny_backtosideratio 0.8
+sv_friction_on_land 0
+sv_doublejump 0 // TINY (1.35x normal) doublejumps only, can be disabled if wanted...
+sv_jumpspeedcap_min 0 // need predicting? (it should already be in CSQC prediction code)
+sv_jumpspeedcap_max ""
+sv_jumpspeedcap_max_disable_on_ramps 1
--- /dev/null
+// Xonotic 1.0 physics
+sv_gravity 800
+sv_maxspeed 400
+sv_maxairspeed 100
+sv_stopspeed 100
+sv_accelerate 5.5
+sv_airaccelerate 5.5
+sv_friction 5
+edgefriction 1
+sv_stepheight 34
+sv_jumpvelocity 300
+sv_wateraccelerate -1
+sv_waterfriction -1
+sv_airaccel_sideways_friction 0
+sv_airaccel_qw 0
+sv_airstopaccelerate 0
+sv_airstrafeaccelerate 0
+sv_maxairstrafespeed 0
+sv_airstrafeaccel_qw 0
+sv_aircontrol 0
+sv_aircontrol_penalty 0
+sv_aircontrol_power 2
+sv_airspeedlimit_nonqw 0
+sv_warsowbunny_turnaccel 0
+sv_warsowbunny_accel 0.1593
+sv_warsowbunny_topspeed 925
+sv_warsowbunny_backtosideratio 0.8
+sv_friction_on_land 0.5
+sv_doublejump 0
+// 1.0 did not allow re-jumping due to a bug, this is quite close to it
+sv_jumpspeedcap_min ""
+sv_jumpspeedcap_max ""
+sv_jumpspeedcap_max_disable_on_ramps 0
--- /dev/null
+// Xonotic 1.5 physics
+sv_gravity 800
+sv_maxspeed 400
+sv_maxairspeed 50
+sv_stopspeed 100
+sv_accelerate 5.5
+sv_airaccelerate 5.5
+sv_friction 5
+edgefriction 1
+sv_stepheight 34
+sv_jumpvelocity 300
+sv_wateraccelerate -1
+sv_waterfriction -1
+sv_airaccel_sideways_friction 0
+sv_airaccel_qw 0
+sv_airstopaccelerate 0
+sv_airstrafeaccelerate 0
+sv_maxairstrafespeed 0
+sv_airstrafeaccel_qw 0
+sv_aircontrol 0
+sv_aircontrol_penalty 0
+sv_aircontrol_power 2
+sv_airspeedlimit_nonqw 0
+sv_warsowbunny_turnaccel 0
+sv_warsowbunny_accel 0.1593
+sv_warsowbunny_topspeed 925
+sv_warsowbunny_backtosideratio 0.8
+sv_friction_on_land 0.25
+sv_doublejump 0
+sv_jumpspeedcap_min ""
+sv_jumpspeedcap_max ""
+sv_jumpspeedcap_max_disable_on_ramps 0
--- /dev/null
+// experimental post-Xonotic 1.5 physics (never released)
+sv_gravity 800
+sv_maxspeed 400
+sv_maxairspeed 50
+sv_stopspeed 100
+sv_accelerate 5.5
+sv_airaccelerate 5.5
+sv_friction 5
+edgefriction 1
+sv_stepheight 34
+sv_jumpvelocity 300
+sv_wateraccelerate -1
+sv_waterfriction -1
+sv_airaccel_sideways_friction 0
+sv_airaccel_qw 0
+sv_airstopaccelerate 0
+sv_airstrafeaccelerate 0
+sv_maxairstrafespeed 0
+sv_airstrafeaccel_qw 0
+sv_aircontrol 0
+sv_aircontrol_penalty 0
+sv_aircontrol_power 2
+sv_airspeedlimit_nonqw 0
+sv_warsowbunny_turnaccel 0
+sv_warsowbunny_accel 0.1593
+sv_warsowbunny_topspeed 925
+sv_warsowbunny_backtosideratio 0.8
+sv_friction_on_land 0
+sv_doublejump 0
+sv_jumpspeedcap_min ""
+sv_jumpspeedcap_max ""
+sv_jumpspeedcap_max_disable_on_ramps 0
--- /dev/null
+// experimental post-Xonotic 1.5 physics (never released)
+sv_gravity 800
+sv_maxspeed 400
+sv_maxairspeed 25
+sv_stopspeed 100
+sv_accelerate 5.5
+sv_airaccelerate 5.5
+sv_friction 5
+edgefriction 1
+sv_stepheight 34
+sv_jumpvelocity 300
+sv_wateraccelerate -1
+sv_waterfriction -1
+sv_airaccel_sideways_friction 0
+sv_airaccel_qw 0
+sv_airstopaccelerate 0
+sv_airstrafeaccelerate 0
+sv_maxairstrafespeed 0
+sv_airstrafeaccel_qw 0
+sv_aircontrol 0
+sv_aircontrol_penalty 0
+sv_aircontrol_power 2
+sv_airspeedlimit_nonqw 0
+sv_warsowbunny_turnaccel 0
+sv_warsowbunny_accel 0.1593
+sv_warsowbunny_topspeed 925
+sv_warsowbunny_backtosideratio 0.8
+sv_friction_on_land 0
+sv_doublejump 0
+sv_jumpspeedcap_min ""
+sv_jumpspeedcap_max ""
+sv_jumpspeedcap_max_disable_on_ramps 0
--- /dev/null
+// experimental post-Xonotic 1.5 physics (never released)
+sv_gravity 800
+sv_maxspeed 400
+sv_maxairspeed 50
+sv_stopspeed 100
+sv_accelerate 5.5
+sv_airaccelerate 5.5
+sv_friction 5
+edgefriction 1
+sv_stepheight 34
+sv_jumpvelocity 300
+sv_wateraccelerate -1
+sv_waterfriction -1
+sv_airaccel_sideways_friction 0
+sv_airaccel_qw 0
+sv_airstopaccelerate 0
+sv_airstrafeaccelerate 0
+sv_maxairstrafespeed 0
+sv_airstrafeaccel_qw 0
+sv_aircontrol 0
+sv_aircontrol_penalty 0
+sv_aircontrol_power 2
+sv_airspeedlimit_nonqw 0
+sv_warsowbunny_turnaccel 0
+sv_warsowbunny_accel 0.1593
+sv_warsowbunny_topspeed 925
+sv_warsowbunny_backtosideratio 0.8
+sv_friction_on_land 0.2
+sv_doublejump 0
+sv_jumpspeedcap_min ""
+sv_jumpspeedcap_max ""
+sv_jumpspeedcap_max_disable_on_ramps 0
--- /dev/null
+// Quake, Bunny Reintroduced (Xonotic 2.0 to 2.4.2 physics)
+sv_gravity 800
+sv_maxspeed 400
+sv_maxairspeed 220
+sv_stopspeed 100
+sv_accelerate 5.5
+sv_airaccelerate 5.5
+sv_friction 5
+edgefriction 1
+sv_stepheight 34
+sv_jumpvelocity 300
+sv_wateraccelerate -1
+sv_waterfriction -1
+sv_airaccel_sideways_friction 0.3
+sv_airaccel_qw 0.93
+sv_airstopaccelerate 0
+sv_airstrafeaccelerate 0
+sv_maxairstrafespeed 0
+sv_airstrafeaccel_qw 0
+sv_aircontrol 0
+sv_aircontrol_penalty 0
+sv_aircontrol_power 2
+sv_airspeedlimit_nonqw 0
+sv_warsowbunny_turnaccel 0
+sv_warsowbunny_accel 0.1593
+sv_warsowbunny_topspeed 925
+sv_warsowbunny_backtosideratio 0.8
+sv_friction_on_land 0
+sv_doublejump 0
+sv_jumpspeedcap_min ""
+sv_jumpspeedcap_max ""
+sv_jumpspeedcap_max_disable_on_ramps 0
--- /dev/null
+// Xonotic 2.5 physics
+sv_gravity 800
+sv_maxspeed 400
+sv_maxairspeed 220
+sv_stopspeed 100
+sv_accelerate 8
+sv_airaccelerate 5.5
+sv_friction 7
+edgefriction 1
+sv_stepheight 34
+sv_jumpvelocity 300
+sv_wateraccelerate -1
+sv_waterfriction -1
+sv_airaccel_sideways_friction 0.35
+sv_airaccel_qw 0.95
+sv_airstopaccelerate 0
+sv_airstrafeaccelerate 0
+sv_maxairstrafespeed 0
+sv_airstrafeaccel_qw 0
+sv_aircontrol 0
+sv_aircontrol_penalty 0
+sv_aircontrol_power 2
+sv_airspeedlimit_nonqw 0
+sv_warsowbunny_turnaccel 0
+sv_warsowbunny_accel 0.1593
+sv_warsowbunny_topspeed 925
+sv_warsowbunny_backtosideratio 0.8
+sv_friction_on_land 0
+sv_doublejump 0
+sv_jumpspeedcap_min ""
+sv_jumpspeedcap_max ""
+sv_jumpspeedcap_max_disable_on_ramps 0
--- /dev/null
+// Xonotic 2.6 physics
+sv_gravity 800
+sv_maxspeed 400
+sv_maxairspeed 220
+sv_stopspeed 100
+sv_accelerate 8
+sv_airaccelerate 5.5
+sv_friction 7
+edgefriction 1
+sv_stepheight 34
+sv_jumpvelocity 300
+sv_wateraccelerate -1
+sv_waterfriction -1
+sv_airaccel_sideways_friction 0.35
+sv_airaccel_qw 0.95
+sv_airstopaccelerate 0
+sv_airstrafeaccelerate 0
+sv_maxairstrafespeed 0
+sv_airstrafeaccel_qw 0
+sv_aircontrol 0
+sv_aircontrol_penalty 0
+sv_aircontrol_power 2
+sv_airspeedlimit_nonqw 0
+sv_warsowbunny_turnaccel 0
+sv_warsowbunny_accel 0.1593
+sv_warsowbunny_topspeed 925
+sv_warsowbunny_backtosideratio 0.8
+sv_friction_on_land 0
+sv_doublejump 0
+sv_jumpspeedcap_min ""
+sv_jumpspeedcap_max ""
+sv_jumpspeedcap_max_disable_on_ramps 0
+++ /dev/null
-// "NoQWBunny" physics based on XPM
-sv_gravity 800
-sv_maxspeed 400
-sv_maxairspeed 400
-
-sv_stopspeed 100
-sv_accelerate 15
-sv_airaccelerate 2
-sv_friction 8
-edgefriction 1
-sv_stepheight 26
-// Q1: 16+2
-// Nex: 32+2
-// we try: 24+2
-
-// actually, what we want is 266.6666 for 180bpm
-// but 260 takes same amount of frames and is nicer to mappers
-sv_jumpvelocity 260
-sv_wateraccelerate -1
-sv_waterfriction -1
-sv_airaccel_sideways_friction 0
-sv_airaccel_qw -0.8
-
-sv_airstopaccelerate 3
-sv_airstrafeaccelerate 24
-sv_maxairstrafespeed 100
-sv_airstrafeaccel_qw -0.95
-sv_aircontrol 125
-sv_aircontrol_penalty 150
-sv_aircontrol_power 2
-sv_airspeedlimit_nonqw 800
-sv_warsowbunny_turnaccel 0
-sv_warsowbunny_accel 0.1593
-sv_warsowbunny_topspeed 925
-sv_warsowbunny_backtosideratio 0.8
-sv_friction_on_land 0
-sv_doublejump 0
-sv_jumpspeedcap_min ""
-sv_jumpspeedcap_max ""
-sv_jumpspeedcap_max_disable_on_ramps 1
--- /dev/null
+// "NoQWBunny" physics based on XPM
+sv_gravity 800
+sv_maxspeed 360
+sv_maxairspeed 400
+
+sv_stopspeed 100
+sv_accelerate 15
+sv_airaccelerate 2
+sv_friction 8
+edgefriction 1
+sv_stepheight 26
+// Q1: 16+2
+// Nex: 32+2
+// we try: 24+2
+
+// actually, what we want is 266.6666 for 180bpm
+// but 260 takes same amount of frames and is nicer to mappers
+sv_jumpvelocity 260
+sv_wateraccelerate -1
+sv_waterfriction -1
+sv_airaccel_sideways_friction 0
+sv_airaccel_qw -0.8
+
+sv_airstopaccelerate 3
+sv_airstrafeaccelerate 24
+sv_maxairstrafespeed 100
+sv_airstrafeaccel_qw -0.95
+sv_aircontrol 125
+sv_aircontrol_penalty 150
+sv_aircontrol_power 2
+sv_airspeedlimit_nonqw 800
+sv_warsowbunny_turnaccel 0
+sv_warsowbunny_accel 0.1593
+sv_warsowbunny_topspeed 925
+sv_warsowbunny_backtosideratio 0.8
+sv_friction_on_land 0
+sv_doublejump 0
+sv_jumpspeedcap_min ""
+sv_jumpspeedcap_max ""
+sv_jumpspeedcap_max_disable_on_ramps 1
if(newspectatee_status != spectatee_status)
{
float i;
- // clear the weapon accuracy stats
- for(i = WEP_FIRST; i <= WEP_LAST; ++i) {
- weapon_hits[i] = 0;
- weapon_fired[i] = 0;
- }
// clear race stuff
race_laptime = 0;
psrandom(s);
}
+void Ent_ReadAccuracy(void)
+{
+ float sf, f, w, b;
+ sf = ReadInt24_t();
+ if(sf == 0)
+ {
+ for(w = 0; w <= WEP_LAST - WEP_FIRST; ++w)
+ weapon_accuracy[w] = -1;
+ return;
+ }
+
+ for(w = 0, f = 1; w <= WEP_LAST - WEP_FIRST; ++w, f *= 2)
+ {
+ if(sf & f)
+ {
+ b = ReadByte();
+ if(b == 0)
+ weapon_accuracy[w] = -1;
+ else if(b == 255)
+ weapon_accuracy[w] = 1.0; // no better error handling yet, sorry
+ else
+ weapon_accuracy[w] = (b - 1.0) / 100.0;
+ }
+ }
+}
+
// CSQC_Ent_Update : Called every frame that the server has indicated an update to the SSQC / CSQC entity has occured.
// The only parameter reflects if the entity is "new" to the client, meaning it just came into the client's PVS.
void Ent_RadarLink();
case ENT_CLIENT_HOOK: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_HOOK); break;
case ENT_CLIENT_LGBEAM: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_LGBEAM); break;
case ENT_CLIENT_GAUNTLET: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_GAUNTLET); break;
+ case ENT_CLIENT_ACCURACY: Ent_ReadAccuracy(); break;
default:
error(strcat("unknown entity type in CSQC_Ent_Update: ", ftos(self.enttype), "\n"));
break;
g_weaponswitchdelay = ReadByte() / 255.0;
- g_balance_grenadelauncher_secondary_bouncefactor = ReadCoord();
- g_balance_grenadelauncher_secondary_bouncestop = ReadCoord();
+ g_balance_grenadelauncher_bouncefactor = ReadCoord();
+ g_balance_grenadelauncher_bouncestop = ReadCoord();
+ g_balance_electro_secondary_bouncefactor = ReadCoord();
+ g_balance_electro_secondary_bouncestop = ReadCoord();
nex_scope = !ReadByte();
campingrifle_scope = !ReadByte();
entity nightvision_noise, nightvision_noise2;
float pickup_crosshair_time, pickup_crosshair_size;
+float use_nex_charge_pool;
+
+float myhealth, myhealth_prev;
+float myhealth_flash;
+
+vector myhealth_gentlergb;
void CSQC_UpdateView(float w, float h)
{
drawpic(reticle_pos, "gfx/reticle_nex", reticle_size, '1 1 1', f * cvar("cl_reticle_item_nex"), DRAWFLAG_NORMAL);
}
+ // improved polyblend
+ vector rgb;
+ if(cvar("hud_damage"))
+ {
+ float myhealth_flash_temp;
+ myhealth = getstati(STAT_HEALTH);
+
+ // fade out
+ myhealth_flash = max(0, myhealth_flash - cvar("hud_damage_fade_rate") * frametime);
+ // add new damage
+ myhealth_flash = bound(0, myhealth_flash + max(0, myhealth_prev - myhealth) * cvar("hud_damage_factor"), cvar("hud_damage_maxalpha"));
+
+ float pain_threshold, pain_threshold_lower, pain_threshold_lower_health;
+ pain_threshold = cvar("hud_damage_pain_threshold");
+ pain_threshold_lower = cvar("hud_damage_pain_threshold_lower");
+ pain_threshold_lower_health = cvar("hud_damage_pain_threshold_lower_health");
+
+ if(pain_threshold_lower && myhealth < pain_threshold_lower_health)
+ {
+ pain_threshold = pain_threshold - max(cvar("hud_damage_pain_threshold_pulsating_min"), fabs(sin(M_PI * time / cvar("hud_damage_pain_threshold_pulsating_period")))) * pain_threshold_lower * (1 - max(0, myhealth)/pain_threshold_lower_health);
+ }
+
+ myhealth_flash_temp = bound(0, myhealth_flash - pain_threshold, 1);
+
+ if(myhealth_prev < 1)
+ {
+ if(myhealth >= 1)
+ {
+ myhealth_flash = 0; // just spawned, clear the flash immediately
+ myhealth_flash_temp = 0;
+ }
+ else
+ {
+ myhealth_flash += cvar("hud_damage_fade_rate") * frametime; // dead
+ }
+ }
+
+ if(spectatee_status == -1 || intermission)
+ {
+ myhealth_flash = 0; // observing, or match ended
+ myhealth_flash_temp = 0;
+ }
+
+ myhealth_prev = myhealth;
+
+ if(autocvar_cl_gentle_damage || cvar("cl_gentle"))
+ {
+ if(autocvar_cl_gentle_damage == 2)
+ {
+ if(myhealth_flash < pain_threshold) // only randomize when the flash is gone
+ {
+ myhealth_gentlergb = eX * random() + eY * random() + eZ * random();
+ }
+ }
+ else
+ myhealth_gentlergb = stov(cvar_string("hud_damage_gentle_color"));
+
+ drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, myhealth_gentlergb, cvar("hud_damage_gentle_alpha_multiplier") * bound(0, myhealth_flash_temp, 1), DRAWFLAG_NORMAL);
+ }
+ else
+ drawpic(reticle_pos, "gfx/blood", reticle_size, stov(cvar_string("hud_damage_color")), bound(0, myhealth_flash_temp, 1), DRAWFLAG_NORMAL);
+ }
+
// Draw the mouse cursor
// NOTE: drawpic must happen after R_RenderScene for some reason
//drawpic(getmousepos(), "gfx/cursor.tga", '11 14 0', '1 1 1', 1, 0);
string wcross_wep, wcross_name;
float wcross_scale, wcross_blur;
- wcross_color_x = cvar("crosshair_color_red");
- wcross_color_y = cvar("crosshair_color_green");
- wcross_color_z = cvar("crosshair_color_blue");
- if (cvar("crosshair_per_weapon")) {
+ if (cvar("crosshair_per_weapon") || cvar("crosshair_color_per_weapon")) {
e = get_weaponinfo(activeweapon);
if (e && e.netname != "")
{
wcross_wep = e.netname;
- wcross_resolution *= cvar(strcat("crosshair_", wcross_wep, "_size"));
- if (wcross_resolution == 0)
- return;
- wcross_alpha *= cvar(strcat("crosshair_", wcross_wep, "_alpha"));
- if (wcross_alpha == 0)
- return;
-
- wcross_style = cvar_string(strcat("crosshair_", wcross_wep));
- if(wcross_style == "")
- wcross_style = e.netname;
-
- if(!cvar("crosshair_color_override"))
+ if(cvar("crosshair_per_weapon"))
{
- wcross_color_x = cvar(strcat("crosshair_", wcross_wep, "_color_red"));
- wcross_color_y = cvar(strcat("crosshair_", wcross_wep, "_color_green"));
- wcross_color_z = cvar(strcat("crosshair_", wcross_wep, "_color_blue"));
+ wcross_resolution *= cvar(strcat("crosshair_", wcross_wep, "_size"));
+ if (wcross_resolution == 0)
+ return;
+ wcross_alpha *= cvar(strcat("crosshair_", wcross_wep, "_alpha"));
+ if (wcross_alpha == 0)
+ return;
+
+ wcross_style = cvar_string(strcat("crosshair_", wcross_wep));
+ if(wcross_style == "" || wcross_style == "0")
+ wcross_style = wcross_wep;
}
}
}
+ if(wcross_wep != "" && cvar("crosshair_color_per_weapon"))
+ wcross_color = stov(cvar_string(strcat("crosshair_", wcross_wep, "_color")));
+ else
+ wcross_color = stov(cvar_string("crosshair_color"));
wcross_name = strcat("gfx/crosshair", wcross_style);
wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
- float nex_charge;
+ float nex_charge, nex_charge_pool;
nex_charge = getstatf(STAT_NEX_CHARGE);
+ nex_charge_pool = getstatf(STAT_NEX_CHARGEPOOL);
if(nex_charge_movingavg == 0) // this should only happen if we have just loaded up the game
nex_charge_movingavg = nex_charge;
bullets = getstati(STAT_BULLETS_LOADED);
f = bound(0, bullets / cr_maxbullets, 1);
- a = cvar("crosshair_campingrifle_bulletcounter_alpha");
+ a = cvar("crosshair_ring_campingrifle_alpha");
DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
}
else if (activeweapon == WEP_NEX && nex_charge) // ring around crosshair representing velocity-dependent damage for the nex
{
- vector rgb;
- // indicate how much we're charging right now with an inner circle
- a = cvar("crosshair_nexvelocity_currentcharge_alpha");
- nex_charge_movingavg = (1 - cvar("crosshair_nexvelocity_currentcharge_movingavg_rate")) * nex_charge_movingavg + cvar("crosshair_nexvelocity_currentcharge_movingavg_rate") * nex_charge;
+ if(nex_charge_pool || use_nex_charge_pool)
+ {
+ use_nex_charge_pool = 1;
+
+ a = cvar("crosshair_ring_nex_inner_alpha");
+ rgb = eX * cvar("crosshair_ring_nex_inner_color_red") + eY * cvar("crosshair_ring_nex_inner_color_green") + eZ * cvar("crosshair_ring_nex_inner_color_blue");
+ DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", nex_charge_pool, rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE);
+ }
+ else
+ {
+ // indicate how much we're charging right now with an inner circle
+ a = cvar("crosshair_ring_nex_inner_alpha");
+ nex_charge_movingavg = (1 - cvar("crosshair_ring_nex_currentcharge_movingavg_rate")) * nex_charge_movingavg + cvar("crosshair_ring_nex_currentcharge_movingavg_rate") * nex_charge;
- rgb = eX * cvar("crosshair_nexvelocity_currentcharge_color_red") + eY * cvar("crosshair_nexvelocity_currentcharge_color_green") + eZ * cvar("crosshair_nexvelocity_currentcharge_color_blue");
- DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", bound(0, cvar("crosshair_nexvelocity_currentcharge_scale") * (nex_charge - nex_charge_movingavg), 1), rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE);
+ rgb = eX * cvar("crosshair_ring_nex_inner_color_red") + eY * cvar("crosshair_ring_nex_inner_color_green") + eZ * cvar("crosshair_ring_nex_inner_color_blue");
+ DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", bound(0, cvar("crosshair_ring_nex_currentcharge_scale") * (nex_charge - nex_charge_movingavg), 1), rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE);
+ }
// draw the charge
- a = cvar("crosshair_nexvelocity_alpha");
+ a = cvar("crosshair_ring_nex_outer_alpha");
DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", nex_charge, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
}
CROSSHAIR_DRAW(wcross_resolution, wcross_name, wcross_alpha * f);
if(cvar("crosshair_dot"))
- CROSSHAIR_DRAW(wcross_resolution * cvar("crosshair_dot_size"), "gfx/crosshairdot.tga", wcross_alpha * f * cvar("crosshair_dot_alpha"));
+ {
+ vector wcross_color_old;
+ wcross_color_old = wcross_color;
+ if(cvar_string("crosshair_dot_color") != "0")
+ wcross_color = stov(cvar_string("crosshair_dot_color"));
+ CROSSHAIR_DRAW(wcross_resolution * cvar("crosshair_dot_size"), "gfx/crosshairdot.tga", f * cvar("crosshair_dot_alpha"));
+ wcross_color = wcross_color_old;
+ }
wcross_name_alpha_goal_prev = f;
}
case HUD_NORMAL:
// do some accuracy var caching
float i;
- if(cvar_string("hud_panel_weapons_accuracy_color_levels") != acc_color_levels)
if(!(gametype == GAME_RACE || gametype == GAME_CTS))
{
- if(acc_color_levels)
- strunzone(acc_color_levels);
- acc_color_levels = strzone(cvar_string("hud_panel_weapons_accuracy_color_levels"));
- acc_levels = tokenize(acc_color_levels);
- if (acc_levels > MAX_ACCURACY_LEVELS)
- acc_levels = MAX_ACCURACY_LEVELS;
-
- for (i = 0; i < acc_levels; ++i)
- acc_lev[i] = stof(argv(i));
+ if(cvar_string("accuracy_color_levels") != acc_color_levels)
+ {
+ if(acc_color_levels)
+ strunzone(acc_color_levels);
+ acc_color_levels = strzone(cvar_string("accuracy_color_levels"));
+ acc_levels = tokenize(acc_color_levels);
+ if (acc_levels > MAX_ACCURACY_LEVELS)
+ acc_levels = MAX_ACCURACY_LEVELS;
+
+ for (i = 0; i < acc_levels; ++i)
+ acc_lev[i] = stof(argv(i)) / 100.0;
+ }
+ // let know that acc_col[] needs to be loaded
+ acc_col_x[0] = -1;
}
HUD_Main(); // always run these functions for alpha checks
var float autocvar_cl_casings_ticrate = 0.1;
var float autocvar_cl_casings_sloppy = 1;
-var float autocvar_cl_gentle;
-var float autocvar_cl_gentle_gibs;
-var float autocvar_cl_gentle_messages;
+var float autocvar_cl_gentle_damage;
var float autocvar_scoreboard_color_bg_team;
var float autocvar__hud_configure;
var float autocvar_hud_configure_teamcolorforced;
-var float autocvar_hud_configure_checkcollisions;
var float autocvar_hud_configure_bg_minalpha;
var float autocvar_hud_configure_grid;
var float autocvar_hud_configure_grid_xsize;
var float autocvar__con_chat_maximized;
var string autocvar__hud_panelorder;
-var string autocvar_hud_skin;
var string autocvar_hud_dock;
-var string autocvar_hud_dock_color;
-var float autocvar_hud_dock_color_team;
-var float autocvar_hud_dock_alpha;
var float autocvar_hud_progressbar_alpha;
-var vector autocvar_hud_progressbar_strength_color;
-var vector autocvar_hud_progressbar_shield_color;
-var vector autocvar_hud_progressbar_health_color;
-var vector autocvar_hud_progressbar_armor_color;
-var vector autocvar_hud_progressbar_fuel_color;
-var vector autocvar_hud_progressbar_nexball_color;
var string autocvar_hud_panel_bg;
var vector autocvar_hud_panel_bg_color;
var float autocvar_hud_panel_fg_alpha;
var float autocvar_hud_panel_weapons;
-var vector autocvar_hud_panel_weapons_pos;
-var vector autocvar_hud_panel_weapons_size;
-var string autocvar_hud_panel_weapons_bg;
-var string autocvar_hud_panel_weapons_bg_color;
-var string autocvar_hud_panel_weapons_bg_color_team;
-var string autocvar_hud_panel_weapons_bg_alpha;
-var string autocvar_hud_panel_weapons_bg_border;
-var string autocvar_hud_panel_weapons_bg_padding;
-var float autocvar_hud_panel_weapons_aspect;
-var float autocvar_hud_panel_weapons_accuracy;
-var float autocvar_hud_panel_weapons_ammo;
-var vector autocvar_hud_panel_weapons_ammo_color;
-var float autocvar_hud_panel_weapons_ammo_alpha;
-var float autocvar_hud_panel_weapons_ammo_full_shells;
-var float autocvar_hud_panel_weapons_ammo_full_nails;
-var float autocvar_hud_panel_weapons_ammo_full_rockets;
-var float autocvar_hud_panel_weapons_ammo_full_cells;
-var float autocvar_hud_panel_weapons_ammo_full_fuel;
-var float autocvar_hud_panel_weapons_label;
-var float autocvar_hud_panel_weapons_complainbubble;
-var float autocvar_hud_panel_weapons_complainbubble_padding;
-var float autocvar_hud_panel_weapons_complainbubble_time;
-var float autocvar_hud_panel_weapons_complainbubble_fadetime;
-var vector autocvar_hud_panel_weapons_complainbubble_color_outofammo;
-var vector autocvar_hud_panel_weapons_complainbubble_color_donthave;
-var vector autocvar_hud_panel_weapons_complainbubble_color_unavailable;
var float autocvar_hud_panel_ammo;
-var vector autocvar_hud_panel_ammo_pos;
-var vector autocvar_hud_panel_ammo_size;
-var string autocvar_hud_panel_ammo_bg;
-var string autocvar_hud_panel_ammo_bg_color;
-var string autocvar_hud_panel_ammo_bg_color_team;
-var string autocvar_hud_panel_ammo_bg_alpha;
-var string autocvar_hud_panel_ammo_bg_border;
-var string autocvar_hud_panel_ammo_bg_padding;
var float autocvar_hud_panel_ammo_onlycurrent;
var float autocvar_hud_panel_ammo_iconalign;
var float autocvar_hud_panel_powerups;
-var vector autocvar_hud_panel_powerups_pos;
-var vector autocvar_hud_panel_powerups_size;
-var string autocvar_hud_panel_powerups_bg;
-var string autocvar_hud_panel_powerups_bg_color;
-var string autocvar_hud_panel_powerups_bg_color_team;
-var string autocvar_hud_panel_powerups_bg_alpha;
-var string autocvar_hud_panel_powerups_bg_border;
-var string autocvar_hud_panel_powerups_bg_padding;
-var float autocvar_hud_panel_powerups_flip;
-var float autocvar_hud_panel_powerups_iconalign;
-var float autocvar_hud_panel_powerups_baralign;
-var float autocvar_hud_panel_powerups_progressbar;
var float autocvar_hud_panel_healtharmor;
-var vector autocvar_hud_panel_healtharmor_pos;
-var vector autocvar_hud_panel_healtharmor_size;
-var string autocvar_hud_panel_healtharmor_bg;
-var string autocvar_hud_panel_healtharmor_bg_color;
-var string autocvar_hud_panel_healtharmor_bg_color_team;
-var string autocvar_hud_panel_healtharmor_bg_alpha;
-var string autocvar_hud_panel_healtharmor_bg_border;
-var string autocvar_hud_panel_healtharmor_bg_padding;
-var float autocvar_hud_panel_healtharmor_flip;
-var float autocvar_hud_panel_healtharmor_iconalign;
-var float autocvar_hud_panel_healtharmor_baralign;
-var float autocvar_hud_panel_healtharmor_progressbar;
var float autocvar_hud_panel_notify;
-var vector autocvar_hud_panel_notify_pos;
-var vector autocvar_hud_panel_notify_size;
-var string autocvar_hud_panel_notify_bg;
-var string autocvar_hud_panel_notify_bg_color;
-var string autocvar_hud_panel_notify_bg_color_team;
-var string autocvar_hud_panel_notify_bg_alpha;
-var string autocvar_hud_panel_notify_bg_border;
-var string autocvar_hud_panel_notify_bg_padding;
-var float autocvar_hud_panel_notify_print;
-var float autocvar_hud_panel_notify_time;
-var float autocvar_hud_panel_notify_fadetime;
-var float autocvar_hud_panel_notify_flip;
var float autocvar_hud_panel_timer;
-var vector autocvar_hud_panel_timer_pos;
-var vector autocvar_hud_panel_timer_size;
-var string autocvar_hud_panel_timer_bg;
-var string autocvar_hud_panel_timer_bg_color;
-var string autocvar_hud_panel_timer_bg_color_team;
-var string autocvar_hud_panel_timer_bg_alpha;
-var string autocvar_hud_panel_timer_bg_border;
-var string autocvar_hud_panel_timer_bg_padding;
var float autocvar_hud_panel_timer_increment;
var float autocvar_hud_panel_radar;
-var vector autocvar_hud_panel_radar_pos;
-var vector autocvar_hud_panel_radar_size;
-var string autocvar_hud_panel_radar_bg;
-var string autocvar_hud_panel_radar_bg_color;
-var string autocvar_hud_panel_radar_bg_color_team;
-var string autocvar_hud_panel_radar_bg_alpha;
-var string autocvar_hud_panel_radar_bg_border;
-var string autocvar_hud_panel_radar_bg_padding;
var float autocvar_hud_panel_score;
-var vector autocvar_hud_panel_score_pos;
-var vector autocvar_hud_panel_score_size;
-var string autocvar_hud_panel_score_bg;
-var string autocvar_hud_panel_score_bg_color;
-var string autocvar_hud_panel_score_bg_color_team;
-var string autocvar_hud_panel_score_bg_alpha;
-var string autocvar_hud_panel_score_bg_border;
-var string autocvar_hud_panel_score_bg_padding;
var float autocvar_hud_panel_racetimer;
-var vector autocvar_hud_panel_racetimer_pos;
-var vector autocvar_hud_panel_racetimer_size;
-var string autocvar_hud_panel_racetimer_bg;
-var string autocvar_hud_panel_racetimer_bg_color;
-var string autocvar_hud_panel_racetimer_bg_color_team;
-var string autocvar_hud_panel_racetimer_bg_alpha;
-var string autocvar_hud_panel_racetimer_bg_border;
-var string autocvar_hud_panel_racetimer_bg_padding;
var float autocvar_hud_panel_vote;
-var vector autocvar_hud_panel_vote_pos;
-var vector autocvar_hud_panel_vote_size;
-var string autocvar_hud_panel_vote_bg;
-var string autocvar_hud_panel_vote_bg_color;
-var string autocvar_hud_panel_vote_bg_color_team;
-var string autocvar_hud_panel_vote_bg_alpha;
-var string autocvar_hud_panel_vote_bg_border;
-var string autocvar_hud_panel_vote_bg_padding;
-var float autocvar_hud_panel_vote_alreadyvoted_alpha;
var float autocvar_hud_panel_modicons;
-var vector autocvar_hud_panel_modicons_pos;
-var vector autocvar_hud_panel_modicons_size;
-var string autocvar_hud_panel_modicons_bg;
-var string autocvar_hud_panel_modicons_bg_color;
-var string autocvar_hud_panel_modicons_bg_color_team;
-var string autocvar_hud_panel_modicons_bg_alpha;
-var string autocvar_hud_panel_modicons_bg_border;
-var string autocvar_hud_panel_modicons_bg_padding;
var float autocvar_hud_panel_pressedkeys;
-var vector autocvar_hud_panel_pressedkeys_pos;
-var vector autocvar_hud_panel_pressedkeys_size;
-var string autocvar_hud_panel_pressedkeys_bg;
-var string autocvar_hud_panel_pressedkeys_bg_color;
-var string autocvar_hud_panel_pressedkeys_bg_color_team;
-var string autocvar_hud_panel_pressedkeys_bg_alpha;
-var string autocvar_hud_panel_pressedkeys_bg_border;
-var string autocvar_hud_panel_pressedkeys_bg_padding;
-var float autocvar_hud_panel_pressedkeys_aspect;
var float autocvar_hud_panel_chat;
-var vector autocvar_hud_panel_chat_pos;
-var vector autocvar_hud_panel_chat_size;
-var string autocvar_hud_panel_chat_bg;
-var string autocvar_hud_panel_chat_bg_color;
-var string autocvar_hud_panel_chat_bg_color_team;
-var string autocvar_hud_panel_chat_bg_alpha;
-var string autocvar_hud_panel_chat_bg_border;
-var string autocvar_hud_panel_chat_bg_padding;
var float autocvar_hud_panel_engineinfo;
-var vector autocvar_hud_panel_engineinfo_pos;
-var vector autocvar_hud_panel_engineinfo_size;
-var string autocvar_hud_panel_engineinfo_bg;
-var string autocvar_hud_panel_engineinfo_bg_color;
-var string autocvar_hud_panel_engineinfo_bg_color_team;
-var string autocvar_hud_panel_engineinfo_bg_alpha;
-var string autocvar_hud_panel_engineinfo_bg_border;
-var string autocvar_hud_panel_engineinfo_bg_padding;
var float autocvar_hud_panel_infomessages;
-var vector autocvar_hud_panel_infomessages_pos;
-var vector autocvar_hud_panel_infomessages_size;
-var string autocvar_hud_panel_infomessages_bg;
-var string autocvar_hud_panel_infomessages_bg_color;
-var string autocvar_hud_panel_infomessages_bg_color_team;
-var string autocvar_hud_panel_infomessages_bg_alpha;
-var string autocvar_hud_panel_infomessages_bg_border;
-var string autocvar_hud_panel_infomessages_bg_padding;
var float autocvar_hud_panel_infomessages_flip;
var float autocvar_scoreboard_border_thickness;
const float STAT_FRAGLIMIT = 235;
const float STAT_TIMELIMIT = 236;
const float STAT_MOVEVARS_GRAVITY = 242;
-const float STAT_MOVEVARS_MAXSPEED = 244;
// Sound Constants
//const float CHAN_AUTO = 0;
org_z = ReadShort() * 4 + 2;
vel = decompressShortVector(ReadShort());
- if(autocvar_cl_gentle_gibs || cvar("cl_gentle"))
+ float cl_gentle_gibs = cvar("cl_gentle_gibs");
+ if(cl_gentle_gibs || cvar("cl_gentle"))
type |= 0x80; // set gentle bit
if(type & 0x80)
{
- if(autocvar_cl_gentle_gibs == 2)
+ if(cl_gentle_gibs == 2)
gentle_prefix = "";
- else if(autocvar_cl_gentle_gibs == 3)
+ else if(cl_gentle_gibs == 3)
gentle_prefix = "happy_";
else
gentle_prefix = "morphed_";
gentle_prefix = "particlegibs_";
}
- if not(autocvar_cl_gentle_gibs || cvar("cl_gentle"))
+ if not(cl_gentle_gibs || cvar("cl_gentle"))
amount *= 1 - cvar("cl_nogibs");
if(cvar("ekg"))
// 1/4 height: bottom part
void draw_BorderPicture(vector theOrigin, string pic, vector theSize, vector theColor, float theAlpha, vector theBorderSize)
{
- if (theBorderSize_x <= 0 && theBorderSize_y <= 0) // no border
+ if (theBorderSize_x < 0 && theBorderSize_y < 0) // draw whole image as it is
+ {
+ drawpic(theOrigin, pic, theSize, theColor, theAlpha, 0);
+ return;
+ }
+ if (theBorderSize_x == 0 && theBorderSize_y == 0) // no border
{
// draw only the central part
drawsubpic(theOrigin, theSize, pic, '0.25 0.25 0', '0.5 0.5 0', theColor, theAlpha, 0);
==================
*/
+#define HUD_Write(s) fputs(fh, s)
+// q: quoted, n: not quoted
+#define HUD_Write_Cvar_n(cvar) HUD_Write(strcat("seta ", cvar, " ", cvar_string(cvar), "\n"))
+#define HUD_Write_Cvar_q(cvar) HUD_Write(strcat("seta ", cvar, " \"", cvar_string(cvar), "\"\n"))
+#define HUD_Write_PanelCvar_n(cvar_suf) HUD_Write_Cvar_n(strcat("hud_panel_", panel_name, cvar_suf))
+#define HUD_Write_PanelCvar_q(cvar_suf) HUD_Write_Cvar_q(strcat("hud_panel_", panel_name, cvar_suf))
// Save the config
void HUD_Panel_ExportCfg(string cfgname)
{
float fh;
- fh = fopen(strcat("hud_", autocvar_hud_skin, "_", cfgname, ".cfg"), FILE_WRITE);
+ string filename = strcat("hud_", cvar_string("hud_skin"), "_", cfgname, ".cfg");
+ fh = fopen(filename, FILE_WRITE);
if(fh >= 0)
{
- fputs(fh, strcat("seta hud_skin \"", cvar_string("hud_skin"), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_bg \"", cvar_string("hud_panel_bg"), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_bg_color \"", cvar_string("hud_panel_bg_color"), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_bg_color_team \"", cvar_string("hud_panel_bg_color_team"), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_bg_alpha \"", cvar_string("hud_panel_bg_alpha"), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_bg_border \"", cvar_string("hud_panel_bg_border"), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_bg_padding \"", cvar_string("hud_panel_bg_padding"), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_fg_alpha \"", cvar_string("hud_panel_fg_alpha"), "\"", "\n"));
- fputs(fh, "\n");
-
- fputs(fh, strcat("seta hud_dock \"", cvar_string("hud_dock"), "\"", "\n"));
- fputs(fh, strcat("seta hud_dock_color \"", cvar_string("hud_dock_color"), "\"", "\n"));
- fputs(fh, strcat("seta hud_dock_color_team \"", cvar_string("hud_dock_color_team"), "\"", "\n"));
- fputs(fh, strcat("seta hud_dock_alpha \"", cvar_string("hud_dock_alpha"), "\"", "\n"));
- fputs(fh, "\n");
-
- fputs(fh, strcat("seta hud_progressbar_alpha \"", cvar_string("hud_progressbar_alpha"), "\"", "\n"));
- fputs(fh, strcat("seta hud_progressbar_strength_color \"", cvar_string("hud_progressbar_strength_color"), "\"", "\n"));
- fputs(fh, strcat("seta hud_progressbar_shield_color \"", cvar_string("hud_progressbar_shield_color"), "\"", "\n"));
- fputs(fh, strcat("seta hud_progressbar_health_color \"", cvar_string("hud_progressbar_health_color"), "\"", "\n"));
- fputs(fh, strcat("seta hud_progressbar_armor_color \"", cvar_string("hud_progressbar_armor_color"), "\"", "\n"));
- fputs(fh, strcat("seta hud_progressbar_fuel_color \"", cvar_string("hud_progressbar_fuel_color"), "\"", "\n"));
- fputs(fh, strcat("seta hud_progressbar_nexball_color \"", cvar_string("hud_progressbar_nexball_color"), "\"", "\n"));
- fputs(fh, "\n");
-
- fputs(fh, strcat("seta _hud_panelorder \"", cvar_string("_hud_panelorder"), "\"", "\n"));
- fputs(fh, "\n");
-
- fputs(fh, strcat("seta hud_configure_grid \"", cvar_string("hud_configure_grid"), "\"", "\n"));
- fputs(fh, strcat("seta hud_configure_grid_xsize \"", cvar_string("hud_configure_grid_xsize"), "\"", "\n"));
- fputs(fh, strcat("seta hud_configure_grid_ysize \"", cvar_string("hud_configure_grid_ysize"), "\"", "\n"));
- fputs(fh, "\n");
-
- fputs(fh, strcat("seta scr_centerpos \"", cvar_string("scr_centerpos"), "\"", "\n"));
- fputs(fh, "\n");
+ HUD_Write_Cvar_q("hud_skin");
+ HUD_Write_Cvar_q("hud_panel_bg");
+ HUD_Write_Cvar_q("hud_panel_bg_color");
+ HUD_Write_Cvar_q("hud_panel_bg_color_team");
+ HUD_Write_Cvar_q("hud_panel_bg_alpha");
+ HUD_Write_Cvar_q("hud_panel_bg_border");
+ HUD_Write_Cvar_q("hud_panel_bg_padding");
+ HUD_Write_Cvar_q("hud_panel_fg_alpha");
+ HUD_Write("\n");
+
+ HUD_Write_Cvar_q("hud_dock");
+ HUD_Write_Cvar_q("hud_dock_color");
+ HUD_Write_Cvar_q("hud_dock_color_team");
+ HUD_Write_Cvar_q("hud_dock_alpha");
+ HUD_Write("\n");
+
+ HUD_Write_Cvar_q("hud_progressbar_alpha");
+ HUD_Write_Cvar_q("hud_progressbar_strength_color");
+ HUD_Write_Cvar_q("hud_progressbar_shield_color");
+ HUD_Write_Cvar_q("hud_progressbar_health_color");
+ HUD_Write_Cvar_q("hud_progressbar_armor_color");
+ HUD_Write_Cvar_q("hud_progressbar_fuel_color");
+ HUD_Write_Cvar_q("hud_progressbar_nexball_color");
+ HUD_Write("\n");
+
+ HUD_Write_Cvar_q("_hud_panelorder");
+ HUD_Write("\n");
+
+ HUD_Write_Cvar_q("hud_configure_grid");
+ HUD_Write_Cvar_q("hud_configure_grid_xsize");
+ HUD_Write_Cvar_q("hud_configure_grid_ysize");
+ HUD_Write("\n");
+
+ HUD_Write_Cvar_q("scr_centerpos");
+ HUD_Write("\n");
// common cvars for all panels
float i;
{
HUD_Panel_GetName(i);
- fputs(fh, strcat("seta hud_panel_", panel_name, " ", cvar_string(strcat("hud_panel_", panel_name)), "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_pos \"", cvar_string(strcat("hud_panel_", panel_name, "_pos")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_size \"", cvar_string(strcat("hud_panel_", panel_name, "_size")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_bg \"", cvar_string(strcat("hud_panel_", panel_name, "_bg")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_bg_color \"", cvar_string(strcat("hud_panel_", panel_name, "_bg_color")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_bg_color_team \"", cvar_string(strcat("hud_panel_", panel_name, "_bg_color_team")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_bg_alpha \"", cvar_string(strcat("hud_panel_", panel_name, "_bg_alpha")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_bg_border \"", cvar_string(strcat("hud_panel_", panel_name, "_bg_border")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_bg_padding \"", cvar_string(strcat("hud_panel_", panel_name, "_bg_padding")), "\"", "\n"));
+ HUD_Write_PanelCvar_n("");
+ HUD_Write_PanelCvar_q("_pos");
+ HUD_Write_PanelCvar_q("_size");
+ HUD_Write_PanelCvar_q("_bg");
+ HUD_Write_PanelCvar_q("_bg_color");
+ HUD_Write_PanelCvar_q("_bg_color_team");
+ HUD_Write_PanelCvar_q("_bg_alpha");
+ HUD_Write_PanelCvar_q("_bg_border");
+ HUD_Write_PanelCvar_q("_bg_padding");
switch(i) {
case HUD_PANEL_WEAPONS:
- fputs(fh, strcat("seta hud_panel_", panel_name, "_complainbubble \"", cvar_string(strcat("hud_panel_", panel_name, "_complainbubble")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_complainbubble_padding \"", cvar_string(strcat("hud_panel_", panel_name, "_complainbubble_padding")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_complainbubble_color_outofammo \"", cvar_string(strcat("hud_panel_", panel_name, "_complainbubble_color_outofammo")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_complainbubble_color_donthave \"", cvar_string(strcat("hud_panel_", panel_name, "_complainbubble_color_donthave")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_complainbubble_color_unavailable \"", cvar_string(strcat("hud_panel_", panel_name, "_complainbubble_color_unavailable")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_ammo_color \"", cvar_string(strcat("hud_panel_", panel_name, "_ammo_color")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_ammo_alpha \"", cvar_string(strcat("hud_panel_", panel_name, "_ammo_alpha")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_aspect \"", cvar_string(strcat("hud_panel_", panel_name, "_aspect")), "\"", "\n"));
+ HUD_Write_PanelCvar_q("_complainbubble");
+ HUD_Write_PanelCvar_q("_complainbubble_padding");
+ HUD_Write_PanelCvar_q("_complainbubble_color_outofammo");
+ HUD_Write_PanelCvar_q("_complainbubble_color_donthave");
+ HUD_Write_PanelCvar_q("_complainbubble_color_unavailable");
+ HUD_Write_PanelCvar_q("_ammo_color");
+ HUD_Write_PanelCvar_q("_ammo_alpha");
+ HUD_Write_PanelCvar_q("_aspect");
break;
case HUD_PANEL_AMMO:
- fputs(fh, strcat("seta hud_panel_", panel_name, "_onlycurrent \"", cvar_string(strcat("hud_panel_", panel_name, "_onlycurrent")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_iconalign \"", cvar_string(strcat("hud_panel_", panel_name, "_iconalign")), "\"", "\n"));
+ HUD_Write_PanelCvar_q("_onlycurrent");
+ HUD_Write_PanelCvar_q("_iconalign");
+ HUD_Write_PanelCvar_q("_progressbar");
+ HUD_Write_PanelCvar_q("_progressbar_name");
+ HUD_Write_PanelCvar_q("_text");
break;
case HUD_PANEL_POWERUPS:
- fputs(fh, strcat("seta hud_panel_", panel_name, "_flip \"", cvar_string(strcat("hud_panel_", panel_name, "_flip")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_iconalign \"", cvar_string(strcat("hud_panel_", panel_name, "_iconalign")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_baralign \"", cvar_string(strcat("hud_panel_", panel_name, "_baralign")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_progressbar \"", cvar_string(strcat("hud_panel_", panel_name, "_progressbar")), "\"", "\n"));
+ HUD_Write_PanelCvar_q("_flip");
+ HUD_Write_PanelCvar_q("_iconalign");
+ HUD_Write_PanelCvar_q("_baralign");
+ HUD_Write_PanelCvar_q("_progressbar");
+ HUD_Write_PanelCvar_q("_progressbar_strength");
+ HUD_Write_PanelCvar_q("_progressbar_shield");
break;
case HUD_PANEL_HEALTHARMOR:
- fputs(fh, strcat("seta hud_panel_", panel_name, "_flip \"", cvar_string(strcat("hud_panel_", panel_name, "_flip")), "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_iconalign \"", cvar_string(strcat("hud_panel_", panel_name, "_iconalign")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_baralign \"", cvar_string(strcat("hud_panel_", panel_name, "_baralign")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_progressbar \"", cvar_string(strcat("hud_panel_", panel_name, "_progressbar")), "\"", "\n"));
+ HUD_Write_PanelCvar_q("_flip");
+ HUD_Write_PanelCvar_q("_iconalign");
+ HUD_Write_PanelCvar_q("_baralign");
+ HUD_Write_PanelCvar_q("_progressbar");
+ HUD_Write_PanelCvar_q("_progressbar_health");
+ HUD_Write_PanelCvar_q("_progressbar_armor");
+ HUD_Write_PanelCvar_q("_text");
break;
case HUD_PANEL_NOTIFY:
- fputs(fh, strcat("seta hud_panel_", panel_name, "_flip \"", cvar_string(strcat("hud_panel_", panel_name, "_flip")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_print \"", cvar_string(strcat("hud_panel_", panel_name, "_print")), "\"", "\n"));
+ HUD_Write_PanelCvar_q("_flip");
+ HUD_Write_PanelCvar_q("_print");
break;
case HUD_PANEL_RADAR:
- fputs(fh, strcat("seta hud_panel_", panel_name, "_foreground_alpha \"", cvar_string(strcat("hud_panel_", panel_name, "_foreground_alpha")), "\"", "\n"));
+ HUD_Write_PanelCvar_q("_foreground_alpha");
break;
case HUD_PANEL_VOTE:
- fputs(fh, strcat("seta hud_panel_", panel_name, "_alreadyvoted_alpha \"", cvar_string(strcat("hud_panel_", panel_name, "_alreadyvoted_alpha")), "\"", "\n"));
+ HUD_Write_PanelCvar_q("_alreadyvoted_alpha");
break;
case HUD_PANEL_PRESSEDKEYS:
- fputs(fh, strcat("seta hud_panel_", panel_name, "_aspect \"", cvar_string(strcat("hud_panel_", panel_name, "_aspect")), "\"", "\n"));
+ HUD_Write_PanelCvar_q("_aspect");
break;
case HUD_PANEL_INFOMESSAGES:
- fputs(fh, strcat("seta hud_panel_", panel_name, "_flip \"", cvar_string(strcat("hud_panel_", panel_name, "_flip")), "\"", "\n"));
+ HUD_Write_PanelCvar_q("_flip");
break;
}
- fputs(fh, "\n");
+ HUD_Write("\n");
}
- fputs(fh, strcat("menu_sync", "\n")); // force the menu to reread the cvars, so that the dialogs are updated
+ HUD_Write("menu_sync\n"); // force the menu to reread the cvars, so that the dialogs are updated
- print("^2Successfully exported to hud_", autocvar_hud_skin, "_", cfgname, ".cfg! (Note: It's saved in data/data/)\n");
+ print("^2Successfully exported to ", filename, "! (Note: It's saved in data/data/)\n");
+ fclose(fh);
}
- fclose(fh);
+ else
+ print("^1Couldn't write to ", filename, "\n");
}
const float hlBorderSize = 4;
HUD_Panel_HlBorder(panel_bg_border + 1.5 * hlBorderSize, '0 0.5 1', 0.25 * (1 - autocvar__menu_alpha) * alpha);\
} ENDS_WITH_CURLY_BRACE
-void HUD_Panel_DrawProgressBar(vector pos, float vertical, vector mySize, vector color, float alpha, float drawflag)
+void HUD_Panel_DrawProgressBar(vector pos, vector mySize, string pic, float vertical, float barflip, float x, vector color, float alpha, float drawflag)
{
- if(!alpha)
+ if(!alpha || x == 0)
return;
- string pic;
+ x = bound(0, x, 1);
+
if(vertical) {
- pic = strcat(hud_skin_path, "/statusbar_vertical");
+ pic = strcat(hud_skin_path, "/", pic, "_vertical");
if(precache_pic(pic) == "") {
pic = "gfx/hud/default/statusbar_vertical";
}
- drawsubpic(pos, eY * min(mySize_y * 0.5, mySize_x) + eX * mySize_x, pic, '0 0 0', '1 0.25 0', color, alpha, drawflag);
- if(mySize_y/mySize_x > 2)
- drawsubpic(pos + eY * mySize_x, eY * (mySize_y - 2 * mySize_x) + eX * mySize_x, pic, '0 0.25 0', '1 0.5 0', color, alpha, drawflag);
- drawsubpic(pos + eY * mySize_y - eY * min(mySize_y * 0.5, mySize_x), eY * min(mySize_y * 0.5, mySize_x) + eX * mySize_x, pic, '0 0.75 0', '1 0.25 0', color, alpha, drawflag);
+
+ if(barflip)
+ drawsetcliparea(pos_x, pos_y + mySize_y * (1 - x), mySize_x, mySize_y * x);
+ else
+ drawsetcliparea(pos_x, pos_y, mySize_x, mySize_y * x);
} else {
- pic = strcat(hud_skin_path, "/statusbar");
+ pic = strcat(hud_skin_path, "/", pic);
if(precache_pic(pic) == "") {
pic = "gfx/hud/default/statusbar";
}
- drawsubpic(pos, eX * min(mySize_x * 0.5, mySize_y) + eY * mySize_y, pic, '0 0 0', '0.25 1 0', color, alpha, drawflag);
- if(mySize_x/mySize_y > 2)
- drawsubpic(pos + eX * mySize_y, eX * (mySize_x - 2 * mySize_y) + eY * mySize_y, pic, '0.25 0 0', '0.5 1 0', color, alpha, drawflag);
- drawsubpic(pos + eX * mySize_x - eX * min(mySize_x * 0.5, mySize_y), eX * min(mySize_x * 0.5, mySize_y) + eY * mySize_y, pic, '0.75 0 0', '0.25 1 0', color, alpha, drawflag);
+
+ if(barflip)
+ drawsetcliparea(pos_x + mySize_x * (1 - x), pos_y, mySize_x * x, mySize_y);
+ else
+ drawsetcliparea(pos_x, pos_y, mySize_x * x, mySize_y);
}
+
+ drawpic(pos, pic, mySize, color, alpha, drawflag);
+ drawresetcliparea();
}
void HUD_Panel_DrawHighlight(vector pos, vector mySize, vector color, float alpha, float drawflag)
else // push it downwards
myTarget_y = panel_pos_y + panel_size_y;
}
- if(cvar("hud_configure_checkcollisions_debug"))
- drawfill(panel_pos, panel_size, '1 1 0', .3, DRAWFLAG_NORMAL);
+ //if(cvar("hud_configure_checkcollisions_debug"))
+ //drawfill(panel_pos, panel_size, '1 1 0', .3, DRAWFLAG_NORMAL);
}
return myTarget;
vector mySize;
mySize = panel_size;
- if(cvar("hud_configure_checkcollisions_debug"))
- drawfill(pos, mySize, '1 1 1', .2, DRAWFLAG_NORMAL);
+ //if(cvar("hud_configure_checkcollisions_debug"))
+ //drawfill(pos, mySize, '1 1 1', .2, DRAWFLAG_NORMAL);
if(autocvar_hud_configure_grid)
{
else
mySize_y = min(mySize_y, dist_y);
}
- if(cvar("hud_configure_checkcollisions_debug"))
- drawfill(panel_pos, panel_size, '1 1 0', .3, DRAWFLAG_NORMAL);
+ //if(cvar("hud_configure_checkcollisions_debug"))
+ //drawfill(panel_pos, panel_size, '1 1 0', .3, DRAWFLAG_NORMAL);
}
return mySize;
if(myPos_y + mySize_y > vid_conheight)
mySize_y = vid_conheight - myPos_y;
- if(cvar("hud_configure_checkcollisions_debug"))
- drawfill(myPos, mySize, '1 1 1', .2, DRAWFLAG_NORMAL);
+ //if(cvar("hud_configure_checkcollisions_debug"))
+ //drawfill(myPos, mySize, '1 1 1', .2, DRAWFLAG_NORMAL);
// before checkresize, otherwise panel can be snapped partially inside another panel or panel aspect ratio can be broken
if(autocvar_hud_configure_grid)
myPos_y = resizeorigin_y;
}
- if(cvar("hud_configure_checkcollisions_debug"))
- drawfill(myPos, mySize, '0 1 0', .3, DRAWFLAG_NORMAL);
+ //if(cvar("hud_configure_checkcollisions_debug"))
+ //drawfill(myPos, mySize, '0 1 0', .3, DRAWFLAG_NORMAL);
HUD_Panel_GetName(highlightedPanel);
string s;
if (prev_pos != panel_pos || prev_size != panel_size)
{
- hud_configure_checkcollisions = (!(hudShiftState & S_CTRL) && autocvar_hud_configure_checkcollisions);
+ hud_configure_checkcollisions = (!(hudShiftState & S_CTRL) && cvar("hud_configure_checkcollisions"));
// backup!
panel_pos_backup = prev_pos;
panel_size_backup = prev_size;
}
}
- float i, weapid, fade, weapon_stats, weapon_number, weapon_cnt;
+ float i, weapid, wpnalpha, weapon_cnt;
weapon_cnt = 0;
for(i = WEP_FIRST; i <= WEP_LAST; ++i)
{
panel_size -= '2 2 0' * panel_bg_padding;
}
- // hits
- weapon_stats = getstati(STAT_DAMAGE_HITS);
- weapon_number = weapon_stats & 63;
- weapon_hits[weapon_number-WEP_FIRST] = floor(weapon_stats / 64);
- // fired
- weapon_stats = getstati(STAT_DAMAGE_FIRED);
- weapon_number = weapon_stats & 63;
- weapon_fired[weapon_number-WEP_FIRST] = floor(weapon_stats / 64);
-
if(cvar_or("hud_panel_weapons_fade", 1))
{
- fade = 3.2 - 2 * (time - weapontime);
- fade = bound(0.7, fade, 1);
+ wpnalpha = 3.2 - 2 * (time - weapontime);
+ wpnalpha = bound(0.7, wpnalpha, 1) * panel_fg_alpha;
}
else
- fade = 1;
+ wpnalpha = panel_fg_alpha;
HUD_Weapons_Clear();
float rows, columns;
+ float aspect = cvar("hud_panel_weapons_aspect");
rows = panel_size_y/panel_size_x;
- rows = bound(1, floor((sqrt(4 * autocvar_hud_panel_weapons_aspect * rows * WEP_COUNT + rows * rows) + rows + 0.5) / 2), WEP_COUNT);
+ rows = bound(1, floor((sqrt(4 * aspect * rows * WEP_COUNT + rows * rows) + rows + 0.5) / 2), WEP_COUNT);
columns = ceil(WEP_COUNT/rows);
float row, column;
float a, type, fullammo;
float when;
- when = autocvar_hud_panel_weapons_complainbubble_time;
+ when = cvar("hud_panel_weapons_complainbubble_time");
float fadetime;
- fadetime = autocvar_hud_panel_weapons_complainbubble_fadetime;
+ fadetime = cvar("hud_panel_weapons_complainbubble_fadetime");
vector color;
vector wpnpos;
vector wpnsize;
+
+ float fullammo_shells, fullammo_nails, fullammo_rockets, fullammo_cells, fullammo_fuel;
+ vector ammo_color;
+ float ammo_alpha;
+ wpnsize = eX * panel_size_x*(1/columns) + eY * panel_size_y*(1/rows);
+ float barsize_x, barsize_y, baroffset_x, baroffset_y;
+ float show_ammo = cvar("hud_panel_weapons_ammo");
+ if (show_ammo)
+ {
+ fullammo_shells = cvar("hud_panel_weapons_ammo_full_shells");
+ fullammo_nails = cvar("hud_panel_weapons_ammo_full_nails");
+ fullammo_rockets = cvar("hud_panel_weapons_ammo_full_rockets");
+ fullammo_cells = cvar("hud_panel_weapons_ammo_full_cells");
+ fullammo_fuel = cvar("hud_panel_weapons_ammo_full_fuel");
+ ammo_color = stov(cvar_string("hud_panel_weapons_ammo_color"));
+ ammo_alpha = panel_fg_alpha * cvar("hud_panel_weapons_ammo_alpha");
+
+
+ if(wpnsize_x/wpnsize_y > aspect)
+ {
+ barsize_x = aspect * wpnsize_y;
+ barsize_y = wpnsize_y;
+ baroffset_x = (wpnsize_x - barsize_x) / 2;
+ }
+ else
+ {
+ barsize_y = 1/aspect * wpnsize_x;
+ barsize_x = wpnsize_x;
+ baroffset_y = (wpnsize_y - barsize_y) / 2;
+ }
+ }
float show_accuracy;
- if(autocvar_hud_panel_weapons_accuracy && acc_levels)
+ float weapon_stats;
+ if(cvar("hud_panel_weapons_accuracy") && acc_levels)
+ {
show_accuracy = true;
+ if (acc_col_x[0] == -1)
+ for (i = 0; i < acc_levels; ++i)
+ acc_col[i] = stov(cvar_string(strcat("accuracy_color", ftos(i))));
+ }
+
+ float weapons_st = getstati(STAT_WEAPONS);
+ float label = cvar("hud_panel_weapons_label");
for(i = 0; i < weapon_cnt; ++i)
{
- wpnpos = panel_pos + eX * column * panel_size_x*(1/columns) + eY * row * panel_size_y*(1/rows);
- wpnsize = eX * panel_size_x*(1/columns) + eY * panel_size_y*(1/rows);
+ wpnpos = panel_pos + eX * column * wpnsize_x + eY * row * wpnsize_y;
self = weaponorder[i];
weapid = self.impulse;
// draw background behind currently selected weapon
if(self.weapon == activeweapon)
- drawpic_aspect_skin(wpnpos, "weapon_current_bg", wpnsize, '1 1 1', fade * panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawpic_aspect_skin(wpnpos, "weapon_current_bg", wpnsize, '1 1 1', wpnalpha, DRAWFLAG_NORMAL);
// draw the weapon accuracy
if(show_accuracy)
{
- float weapon_hit, weapon_damage;
- weapon_damage = weapon_fired[self.weapon-WEP_FIRST];
- if(weapon_damage)
+ weapon_stats = weapon_accuracy[self.weapon-WEP_FIRST];
+ if(weapon_stats >= 0)
{
- weapon_hit = weapon_hits[self.weapon-WEP_FIRST];
- weapon_stats = floor(100 * weapon_hit / weapon_damage);
- }
-
- // find the max level lower than weapon_stats
- float j;
- j = acc_levels-1;
- while ( j && weapon_stats < acc_lev[j] )
- --j;
+ // find the max level lower than weapon_stats
+ float j;
+ j = acc_levels-1;
+ while ( j && weapon_stats < acc_lev[j] )
+ --j;
+
+ // inject color j+1 in color j, how much depending on how much weapon_stats is higher than level j
+ float factor;
+ factor = (weapon_stats - acc_lev[j]) / (acc_lev[j+1] - acc_lev[j]);
+ color = acc_col[j];
+ color = color + factor * (acc_col[j+1] - color);
- // inject color j+1 in color j, how much depending on how much weapon_stats is higher than level j
- float factor;
- factor = (weapon_stats - acc_lev[j]) / (acc_lev[j+1] - acc_lev[j]);
- color = acc_color(j);
- color = color + factor * (acc_color(j+1) - color);
-
- if(weapon_damage)
drawpic_aspect_skin(wpnpos, "weapon_accuracy", wpnsize, color, panel_fg_alpha, DRAWFLAG_NORMAL);
+ }
}
// draw the weapon icon
- if((self.impulse >= 0) && (getstati(STAT_WEAPONS) & self.weapons))
+ if((weapid >= 0) && (weapons_st & self.weapons))
{
- drawpic_aspect_skin(wpnpos, strcat("weapon", self.netname), wpnsize, '1 1 1', fade * panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawpic_aspect_skin(wpnpos, strcat("weapon", self.netname), wpnsize, '1 1 1', wpnalpha, DRAWFLAG_NORMAL);
- if(autocvar_hud_panel_weapons_label == 1) // weapon number
- drawstring(wpnpos, ftos(weapid), '1 1 0' * 0.5 * panel_size_y*(1/rows), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
- else if(autocvar_hud_panel_weapons_label == 2) // bind
- drawstring(wpnpos, getcommandkey(ftos(weapid), strcat("impulse ", ftos(weapid))), '1 1 0' * 0.5 * panel_size_y*(1/rows), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ if(label == 1) // weapon number
+ drawstring(wpnpos, ftos(weapid), '1 1 0' * 0.5 * wpnsize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ else if(label == 2) // bind
+ drawstring(wpnpos, getcommandkey(ftos(weapid), strcat("impulse ", ftos(weapid))), '1 1 0' * 0.5 * wpnsize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
// draw ammo status bar
- if(autocvar_hud_panel_weapons_ammo && weapid != WEP_TUBA && weapid != WEP_LASER && weapid != WEP_PORTO)
+ if(show_ammo && weapid != WEP_TUBA && weapid != WEP_LASER && weapid != WEP_PORTO)
{
a = 0;
type = GetAmmoTypeForWep(weapid);
if(a > 0)
{
switch(type) {
- case 0: fullammo = autocvar_hud_panel_weapons_ammo_full_shells; break;
- case 1: fullammo = autocvar_hud_panel_weapons_ammo_full_nails; break;
- case 2: fullammo = autocvar_hud_panel_weapons_ammo_full_rockets; break;
- case 3: fullammo = autocvar_hud_panel_weapons_ammo_full_cells; break;
- case 4: fullammo = autocvar_hud_panel_weapons_ammo_full_fuel; break;
+ case 0: fullammo = fullammo_shells; break;
+ case 1: fullammo = fullammo_nails; break;
+ case 2: fullammo = fullammo_rockets; break;
+ case 3: fullammo = fullammo_cells; break;
+ case 4: fullammo = fullammo_fuel; break;
default: fullammo = 60;
}
- float barsize_x, barsize_y, barpos_x, barpos_y;
- if(wpnsize_x/wpnsize_y > autocvar_hud_panel_weapons_aspect)
- {
- barsize_x = autocvar_hud_panel_weapons_aspect * wpnsize_y;
- barsize_y = wpnsize_y;
-
- barpos_x = wpnpos_x + (wpnsize_x - barsize_x) / 2;
- barpos_y = wpnpos_y;
- }
- else
- {
- barsize_y = 1/autocvar_hud_panel_weapons_aspect * wpnsize_x;
- barsize_x = wpnsize_x;
-
- barpos_y = wpnpos_y + (wpnsize_y - barsize_y) / 2;
- barpos_x = wpnpos_x;
- }
-
drawsetcliparea(
- barpos_x,
- barpos_y,
+ wpnpos_x + baroffset_x,
+ wpnpos_y + baroffset_y,
barsize_x * bound(0, a/fullammo, 1),
barsize_y);
- drawpic_aspect_skin(wpnpos, "weapon_ammo", wpnsize, autocvar_hud_panel_weapons_ammo_color, panel_fg_alpha * autocvar_hud_panel_weapons_ammo_alpha, DRAWFLAG_NORMAL);
+ drawpic_aspect_skin(wpnpos, "weapon_ammo", wpnsize, ammo_color, ammo_alpha, DRAWFLAG_NORMAL);
drawresetcliparea();
}
}
}
// draw the complain message
- if(time - complain_weapon_time < when + fadetime && self.weapon == complain_weapon && autocvar_hud_panel_weapons_complainbubble)
+ if(time - complain_weapon_time < when + fadetime && self.weapon == complain_weapon && cvar("hud_panel_weapons_complainbubble"))
{
if(fadetime)
{
string s;
if(complain_weapon_type == 0) {
s = "Out of ammo";
- color = autocvar_hud_panel_weapons_complainbubble_color_outofammo;
+ color = stov(cvar_string("hud_panel_weapons_complainbubble_color_outofammo"));
}
else if(complain_weapon_type == 1) {
s = "Don't have";
- color = autocvar_hud_panel_weapons_complainbubble_color_donthave;
+ color = stov(cvar_string("hud_panel_weapons_complainbubble_color_donthave"));
}
else {
s = "Unavailable";
- color = autocvar_hud_panel_weapons_complainbubble_color_unavailable;
+ color = stov(cvar_string("hud_panel_weapons_complainbubble_color_unavailable"));
}
- drawpic_aspect_skin(wpnpos + '1 1 0' * autocvar_hud_panel_weapons_complainbubble_padding, "weapon_complainbubble", wpnsize - '2 2 0' * autocvar_hud_panel_weapons_complainbubble_padding, color, a * panel_fg_alpha, DRAWFLAG_NORMAL);
- drawstring_aspect(wpnpos + '1 1 0' * autocvar_hud_panel_weapons_complainbubble_padding, s, wpnsize - '2 2 0' * autocvar_hud_panel_weapons_complainbubble_padding, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
+ float padding = cvar("hud_panel_weapons_complainbubble_padding");
+ drawpic_aspect_skin(wpnpos + '1 1 0' * padding, "weapon_complainbubble", wpnsize - '2 2 0' * padding, color, a * panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(wpnpos + '1 1 0' * padding, s, wpnsize - '2 2 0' * padding, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
}
++row;
void DrawAmmoItem(vector myPos, vector mySize, float itemcode, float currently_selected)
{
float a;
- a = getstati(GetAmmoStat(itemcode)); // how much ammo do we have of type itemcode?
if(autocvar__hud_configure)
+ {
+ currently_selected = (itemcode == 2); //rockets always selected
a = 100;
+ }
+ else
+ a = getstati(GetAmmoStat(itemcode)); // how much ammo do we have of type itemcode?
vector color;
if(a < 10)
else
alpha = 0.7;
- vector newSize, newPos;
- if(mySize_x/mySize_y > 3)
- {
- newSize_x = 3 * mySize_y;
- newSize_y = mySize_y;
-
- newPos_x = myPos_x + (mySize_x - newSize_x) / 2;
- newPos_y = myPos_y;
- }
- else
- {
- newSize_y = 1/3 * mySize_x;
- newSize_x = mySize_x;
-
- newPos_y = myPos_y + (mySize_y - newSize_y) / 2;
- newPos_x = myPos_x;
- }
-
vector picpos, numpos;
if(autocvar_hud_panel_ammo_iconalign)
{
- numpos = newPos;
- picpos = newPos + eX * 2 * newSize_y;
+ numpos = myPos;
+ picpos = myPos + eX * 2 * mySize_y;
}
else
{
- numpos = newPos + eX * newSize_y;
- picpos = newPos;
+ numpos = myPos + eX * mySize_y;
+ picpos = myPos;
}
if (currently_selected)
- drawpic_aspect_skin(newPos, "ammo_current_bg", newSize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-
- drawfont = hud_bigfont;
+ drawpic_aspect_skin(myPos, "ammo_current_bg", mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+
+ if(a > 0 && cvar("hud_panel_ammo_progressbar"))
+ HUD_Panel_DrawProgressBar(myPos + eX * cvar("hud_panel_ammo_progressbar_xoffset") * mySize_x, mySize - eX * cvar("hud_panel_ammo_progressbar_xoffset") * mySize_x, cvar_string("hud_panel_ammo_progressbar_name"), 0, 0, min(1, a/cvar("hud_panel_ammo_maxammo")), color, autocvar_hud_progressbar_alpha * panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
+
+ if(cvar("hud_panel_ammo_text"))
+ {
+ if(a > 0)
+ 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)
- drawstring_aspect(numpos, ftos(a), eX * (2/3) * newSize_x + eY * newSize_y, color, panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
- else // "ghost" ammo count
- drawstring_aspect(numpos, ftos(a), eX * (2/3) * newSize_x + eY * newSize_y, '0 0 0', panel_fg_alpha * alpha * 0.5, DRAWFLAG_NORMAL);
- drawfont = hud_font;
- if(a > 0)
- drawpic_aspect_skin(picpos, GetAmmoPicture(itemcode), '1 1 0' * newSize_y, '1 1 1', panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
+ 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' * newSize_y, '0 0 0', panel_fg_alpha * alpha * 0.5, DRAWFLAG_NORMAL);
+ drawpic_aspect_skin(picpos, GetAmmoPicture(itemcode), '1 1 0' * mySize_y, '0 0 0', panel_fg_alpha * alpha * 0.5, DRAWFLAG_NORMAL);
}
void HUD_Ammo(void)
active_panel = HUD_PANEL_AMMO;
HUD_Panel_UpdateCvars(ammo);
- float i, currently_selected;
-
vector pos, mySize;
pos = panel_pos;
mySize = panel_size;
mySize -= '2 2 0' * panel_bg_padding;
}
- float rows, columns;
- rows = mySize_y/mySize_x;
- rows = bound(1, floor((sqrt(4 * (3/1) * rows * AMMO_COUNT + rows * rows) + rows + 0.5) / 2), AMMO_COUNT);
- // ^^^ ammo item aspect goes here
+ float rows, columns, row, column;
+ vector ammo_size;
+ if (autocvar_hud_panel_ammo_onlycurrent)
+ ammo_size = mySize;
+ else
+ {
+ rows = mySize_y/mySize_x;
+ rows = bound(1, floor((sqrt(4 * (3/1) * rows * AMMO_COUNT + rows * rows) + rows + 0.5) / 2), AMMO_COUNT);
+ // ^^^ ammo item aspect goes here
- columns = ceil(AMMO_COUNT/rows);
+ columns = ceil(AMMO_COUNT/rows);
- float row, column;
- // ammo
- for (i = 0; i < AMMO_COUNT; ++i) {
- currently_selected = getstati(STAT_ITEMS) & GetAmmoItemCode(i);
- if(autocvar_hud_panel_ammo_onlycurrent) {
- if(autocvar__hud_configure)
- i = 2;
- if (currently_selected || autocvar__hud_configure)
- {
- DrawAmmoItem(pos, mySize, i, currently_selected);
- break;
- }
- } else {
- DrawAmmoItem(pos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows), eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows), i, currently_selected);
- ++row;
- if(row >= rows)
+ ammo_size = eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows);
+ }
+
+ vector offset;
+ float newSize;
+ if(ammo_size_x/ammo_size_y > 3)
+ {
+ newSize = 3 * ammo_size_y;
+ offset_x = ammo_size_x - newSize;
+ pos_x += offset_x/2;
+ ammo_size_x = newSize;
+ }
+ else
+ {
+ newSize = 1/3 * ammo_size_x;
+ offset_y = ammo_size_y - newSize;
+ pos_y += offset_y/2;
+ ammo_size_y = newSize;
+ }
+
+ drawfont = hud_bigfont;
+ float i, stat_items, currently_selected;
+ if (autocvar_hud_panel_ammo_onlycurrent)
+ {
+ if(autocvar__hud_configure)
+ {
+ DrawAmmoItem(pos, ammo_size, 2, true); //show rockets
+ return;
+ }
+ stat_items = getstati(STAT_ITEMS);
+ for (i = 0; i < AMMO_COUNT; ++i) {
+ currently_selected = stat_items & GetAmmoItemCode(i);
+ if (currently_selected)
{
- row = 0;
- column = column + 1;
+ DrawAmmoItem(pos, ammo_size, i, true);
+ return;
}
}
+ return; // nothing to display
}
+
+ stat_items = getstati(STAT_ITEMS);
+ 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);
+ ++row;
+ if(row >= rows)
+ {
+ row = 0;
+ column = column + 1;
+ }
+ }
+ drawfont = hud_font;
}
void DrawNumIcon(float iconalign, vector myPos, vector mySize, float x, string icon, float left, vector color, float alpha)
if(!autocvar_hud_panel_powerups && !autocvar__hud_configure)
return;
- active_panel = HUD_PANEL_POWERUPS;
- HUD_Panel_UpdateCvars(powerups);
- float stat_items;
- stat_items = getstati(STAT_ITEMS);
-
if(!autocvar__hud_configure)
{
- if not(stat_items & IT_STRENGTH)
- if not(stat_items & IT_INVINCIBLE)
- return;
+ if not(getstati(STAT_ITEMS) & (IT_STRENGTH | IT_INVINCIBLE))
+ return;
if (getstati(STAT_HEALTH) <= 0)
return;
}
+ active_panel = HUD_PANEL_POWERUPS;
+ HUD_Panel_UpdateCvars(powerups);
vector pos, mySize;
pos = panel_pos;
mySize = panel_size;
vector numpos;
string leftname, rightname;
+ string leftprogressname, rightprogressname;
float leftcnt, rightcnt;
float leftexact, rightexact;
- if (autocvar_hud_panel_powerups_flip) {
+ float flip = cvar("hud_panel_powerups_flip");
+ if (flip) {
leftname = "strength";
+ leftprogressname = cvar_string("hud_panel_powerups_progressbar_strength");
leftcnt = ceil(strength_time);
leftexact = strength_time;
rightname = "shield";
+ rightprogressname = cvar_string("hud_panel_powerups_progressbar_shield");
rightcnt = ceil(shield_time);
rightexact = shield_time;
} else {
leftname = "shield";
+ leftprogressname = cvar_string("hud_panel_powerups_progressbar_shield");
leftcnt = ceil(shield_time);
leftexact = shield_time;
rightname = "strength";
+ rightprogressname = cvar_string("hud_panel_powerups_progressbar_strength");
rightcnt = ceil(strength_time);
rightexact = strength_time;
}
drawfont = hud_bigfont;
+ float baralign = cvar("hud_panel_powerups_baralign");
+ float barflip;
+ float iconalign = cvar("hud_panel_powerups_iconalign");
+ float progressbar = cvar("hud_panel_powerups_progressbar");
if (mySize_x/mySize_y > 4)
{
+ barsize = eX * 0.5 * mySize_x + eY * mySize_y;
if(leftcnt)
{
- if(autocvar_hud_panel_powerups_baralign == 1 || autocvar_hud_panel_powerups_baralign == 3) { // right align
- barpos = pos + eX * 0.5 * mySize_x - eX * 0.5 * mySize_x * min(1, leftcnt/30);
- barsize = eX * 0.5 * mySize_x * min(1, leftcnt/30) + eY * mySize_y;
+ if(baralign == 1 || baralign == 3) { // right align
+ barpos = pos + eX * 0.5 * mySize_x;
+ barflip = 1;
} else { // left align
- barpos = pos;
- barsize = eX * 0.5 * mySize_x * min(1, leftcnt/30) + eY * mySize_y;
+ barpos = pos;
+ barflip = 0;
}
- if(autocvar_hud_panel_powerups_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(leftname);
- HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, barsize, leftprogressname, 0, barflip, min(1, leftcnt/30), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
}
- if(leftcnt > 1)
- DrawNumIcon(autocvar_hud_panel_powerups_iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, '1 1 1', 1);
- if(leftcnt <= 5)
- DrawNumIcon_expanding(autocvar_hud_panel_powerups_iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, '1 1 1', bound(0, (leftcnt - leftexact) / 0.5, 1));
+ if(cvar("hud_panel_powerups_text"))
+ {
+ if(leftcnt > 1)
+ DrawNumIcon(iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, '1 1 1', 1);
+ if(leftcnt <= 5)
+ DrawNumIcon_expanding(iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, '1 1 1', bound(0, (leftcnt - leftexact) / 0.5, 1));
+ }
}
if(rightcnt)
{
- if(autocvar_hud_panel_powerups_baralign == 0 || autocvar_hud_panel_powerups_baralign == 3) { // left align
- barpos = pos + eX * 0.5 * mySize_x;
- barsize = eX * 0.5 * mySize_x * min(1, rightcnt/30) + eY * mySize_y;
+ if(baralign == 0 || baralign == 3) { // left align
+ barpos = pos;
+ barflip = 0;
} else { // right align
- barpos = pos + eX * mySize_x - eX * 0.5 * mySize_x * min(1, rightcnt/30);
- barsize = eX * 0.5 * mySize_x * min(1, rightcnt/30) + eY * mySize_y;
+ barpos = pos + eX * 0.5 * mySize_x;
+ barflip = 1;
}
- if(autocvar_hud_panel_powerups_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(rightname);
- HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, barsize, rightprogressname, 0, barflip, min(1, rightcnt/30), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
}
- if(rightcnt > 1)
- DrawNumIcon(autocvar_hud_panel_powerups_iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, '1 1 1', 1);
- if(rightcnt <= 5)
- DrawNumIcon_expanding(autocvar_hud_panel_powerups_iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, '1 1 1', bound(0, (rightcnt - rightexact) / 0.5, 1));
+ if(cvar("hud_panel_powerups_text"))
+ {
+ if(rightcnt > 1)
+ DrawNumIcon(iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, '1 1 1', 1);
+ if(rightcnt <= 5)
+ DrawNumIcon_expanding(iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, '1 1 1', bound(0, (rightcnt - rightexact) / 0.5, 1));
+ }
}
}
else if (mySize_x/mySize_y > 1.5)
{
+ barsize = eX * mySize_x + eY * 0.5 * mySize_y;
if(leftcnt)
{
- if(autocvar_hud_panel_powerups_baralign == 1 || autocvar_hud_panel_powerups_baralign == 3) { // right align
- barpos = pos + eX * mySize_x - eX * mySize_x * min(1, leftcnt/30);
- barsize = eX * mySize_x * min(1, leftcnt/30) + eY * 0.5 * mySize_y;
- } else { // left align
- barpos = pos;
- barsize = eX * mySize_x * min(1, leftcnt/30) + eY * 0.5 * mySize_y;
+ barpos = pos;
+ if(baralign == 1 || baralign == 3) { // right/down align
+ barflip = 1;
+ } else { // left/up align
+ barflip = 0;
}
- if(autocvar_hud_panel_powerups_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(leftname);
- HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, barsize, leftprogressname, 0, barflip, min(1, leftcnt/30), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
}
- if(leftcnt > 1)
- DrawNumIcon(autocvar_hud_panel_powerups_iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, '1 1 1', 1);
- if(leftcnt <= 5)
- DrawNumIcon_expanding(autocvar_hud_panel_powerups_iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, '1 1 1', bound(0, (leftcnt - leftexact) / 0.5, 1));
+ if(cvar("hud_panel_powerups_text"))
+ {
+ if(leftcnt > 1)
+ DrawNumIcon(iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, '1 1 1', 1);
+ if(leftcnt <= 5)
+ DrawNumIcon_expanding(iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, '1 1 1', bound(0, (leftcnt - leftexact) / 0.5, 1));
+ }
}
if(rightcnt)
{
- if(autocvar_hud_panel_powerups_baralign == 0 || autocvar_hud_panel_powerups_baralign == 3) { // left align
- barpos = pos + eY * 0.5 * mySize_y;
- barsize = eX * mySize_x * min(1, rightcnt/30) + eY * 0.5 * mySize_y;
+ barpos = pos + eY * 0.5 * mySize_y;
+ if(baralign == 0 || baralign == 3) { // left align
+ barflip = 0;
} else { // right align
- barpos = pos + eX * mySize_x - eX * mySize_x * min(1, rightcnt/30) + eY * 0.5 * mySize_y;
- barsize = eX * mySize_x * min(1, rightcnt/30) + eY * 0.5 * mySize_y;
+ barflip = 1;
}
- if(autocvar_hud_panel_powerups_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(rightname);
- HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, barsize, rightprogressname, 0, barflip, min(1, rightcnt/30), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
}
- if(rightcnt > 1)
- DrawNumIcon(autocvar_hud_panel_powerups_iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, '1 1 1', 1);
- if(rightcnt <= 5)
- DrawNumIcon_expanding(autocvar_hud_panel_powerups_iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, '1 1 1', bound(0, (rightcnt - rightexact) / 0.5, 1));
+ if(cvar("hud_panel_powerups_text"))
+ {
+ if(rightcnt > 1)
+ DrawNumIcon(iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, '1 1 1', 1);
+ if(rightcnt <= 5)
+ DrawNumIcon_expanding(iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, '1 1 1', bound(0, (rightcnt - rightexact) / 0.5, 1));
+ }
}
}
else
{
+ barsize = eX * 0.5 * mySize_x + eY * mySize_y;
if(leftcnt)
{
- if(autocvar_hud_panel_powerups_baralign == 1 || autocvar_hud_panel_powerups_baralign == 3) { // down align
- barpos = pos + eY * mySize_y - eY * mySize_y * min(1, leftcnt/30);
- barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, leftcnt/30);
+ barpos = pos;
+ if(baralign == 1 || baralign == 3) { // down align
+ barflip = 1;
} else { // up align
- barpos = pos;
- barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, leftcnt/30);
+ barflip = 0;
}
- if(autocvar_hud_panel_powerups_iconalign == 1 || autocvar_hud_panel_powerups_iconalign == 3) { // down align
+ if(iconalign == 1 || iconalign == 3) { // down align
picpos = pos + eX * 0.05 * mySize_x + eY * (mySize_y - 0.65 * mySize_x);
numpos = pos + eY * mySize_y - eY * 0.25 * mySize_x;
} else { // up align
numpos = pos + eY * 0.4 * mySize_x;
}
- if(autocvar_hud_panel_powerups_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(leftname);
- HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, barsize, leftprogressname, 1, barflip, min(1, leftcnt/30), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
}
- if(leftcnt <= 5)
- drawpic_aspect_skin_expanding(picpos, leftname, '0.4 0.4 0' * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, bound(0, (leftcnt - leftexact) / 0.5, 1));
- if(leftcnt > 1)
- drawpic_aspect_skin(picpos, leftname, '0.4 0.4 0' * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
- drawstring_aspect(numpos, ftos(leftcnt), eX * 0.5 * mySize_x + eY * 0.25 * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ if(cvar("hud_panel_powerups_text"))
+ {
+ if(leftcnt <= 5)
+ drawpic_aspect_skin_expanding(picpos, leftname, '0.4 0.4 0' * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, bound(0, (leftcnt - leftexact) / 0.5, 1));
+ if(leftcnt > 1)
+ drawpic_aspect_skin(picpos, leftname, '0.4 0.4 0' * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(numpos, ftos(leftcnt), eX * 0.5 * mySize_x + eY * 0.25 * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ }
}
if(rightcnt)
{
- if(autocvar_hud_panel_powerups_baralign == 0 || autocvar_hud_panel_powerups_baralign == 3) { // up align
- barpos = pos + eX * 0.5 * mySize_x;
- barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, rightcnt/30);
- } else { // down align
- barpos = pos + eY * mySize_y - eY * mySize_y * min(1, rightcnt/30) + eX * 0.5 * mySize_x;
- barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, rightcnt/30);
+ barpos = pos + eX * 0.5 * mySize_x;
+ if(baralign == 0 || baralign == 3) { // down align
+ barflip = 1;
+ } else { // up align
+ barflip = 0;
}
- if(autocvar_hud_panel_powerups_iconalign == 0 || autocvar_hud_panel_powerups_iconalign == 3) { // up align
+ if(iconalign == 0 || iconalign == 3) { // up align
picpos = pos + eX * 0.05 * mySize_x + eX * 0.5 * mySize_x;
numpos = pos + eY * 0.4 * mySize_x + eX * 0.5 * mySize_x;
} else { // down align
numpos = pos + eY * mySize_y - eY * 0.25 * mySize_x + eX * 0.5 * mySize_x;
}
- if(autocvar_hud_panel_powerups_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(rightname);
- HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, barsize, rightprogressname, 1, barflip, min(1, rightcnt/30), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
}
- if(rightcnt <= 5)
- drawpic_aspect_skin_expanding(picpos, rightname, '0.4 0.4 0' * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, bound(0, (rightcnt - rightexact) / 0.5, 1));
- if(rightcnt > 1)
- drawpic_aspect_skin(picpos, rightname, '0.4 0.4 0' * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
- drawstring_aspect(numpos, ftos(rightcnt), eX * 0.5 * mySize_x + eY * 0.25 * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ if(cvar("hud_panel_powerups_text"))
+ {
+ if(rightcnt <= 5)
+ drawpic_aspect_skin_expanding(picpos, rightname, '0.4 0.4 0' * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, bound(0, (rightcnt - rightexact) / 0.5, 1));
+ if(rightcnt > 1)
+ drawpic_aspect_skin(picpos, rightname, '0.4 0.4 0' * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(numpos, ftos(rightcnt), eX * 0.5 * mySize_x + eY * 0.25 * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ }
}
}
drawfont = hud_font;
if(autocvar__hud_configure)
{
- armor = 150;
- health = 100;
- fuel = 70;
+ armor = 75;
+ health = 150;
+ fuel = 20;
}
if(health <= 0)
vector numpos;
drawfont = hud_bigfont;
+ float baralign = cvar("hud_panel_healtharmor_baralign");
+ float iconalign = cvar("hud_panel_healtharmor_iconalign");
+ float progressbar = cvar("hud_panel_healtharmor_progressbar");
+
+ float maxhealth = cvar("hud_panel_healtharmor_maxhealth");
+ float maxarmor = cvar("hud_panel_healtharmor_maxarmor");
if(autocvar_hud_panel_healtharmor == 2) // combined health and armor display
{
vector v;
float x;
x = floor(v_x + 1);
- if(autocvar_hud_panel_healtharmor_baralign == 1 || autocvar_hud_panel_healtharmor_baralign == 3) { // right align
- barpos = pos + eX * mySize_x - eX * mySize_x * min(1, x/400);
- barsize = eX * mySize_x * min(1, x/400) + eY * mySize_y;
- } else { // left align
- barpos = pos;
- barsize = eX * mySize_x * min(1, x/400) + eY * mySize_y;
- }
+ float maxtotal = maxhealth + maxarmor;
+
+ barpos = pos;
+ barsize = mySize;
string biggercount;
if(v_z) // NOT fully armored
{
biggercount = "health";
- if(autocvar_hud_panel_healtharmor_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColor(health);
- HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, barsize, cvar_string("hud_panel_healtharmor_progressbar_health"), 0, mod(baralign, 2), x/maxtotal, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
}
if(armor)
+ if(cvar("hud_panel_healtharmor_text"))
drawpic_aspect_skin(pos + eX * mySize_x - eX * 0.5 * mySize_y, "armor", '0.5 0.5 0' * mySize_y, '1 1 1', panel_fg_alpha * armor / health, DRAWFLAG_NORMAL);
}
else
{
biggercount = "armor";
- if(autocvar_hud_panel_healtharmor_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColor(armor);
- HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, barsize, cvar_string("hud_panel_healtharmor_progressbar_armor"), 0, mod(baralign, 2), x/maxtotal, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
}
if(health)
+ if(cvar("hud_panel_healtharmor_text"))
drawpic_aspect_skin(pos + eX * mySize_x - eX * 0.5 * mySize_y, "health", '0.5 0.5 0' * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
}
- DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos, mySize, x, biggercount, 1, HUD_Get_Num_Color(x, 2 * 200), 1);
+ if(cvar("hud_panel_healtharmor_text"))
+ DrawNumIcon(iconalign, pos, mySize, x, biggercount, 1, HUD_Get_Num_Color(x, maxtotal), 1);
// fuel
if(fuel)
{
- if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // left align
- barpos = pos + eX * mySize_x - eX * mySize_x * min(1, fuel/100);
- barsize = eX * mySize_x * min(1, fuel/100) + eY * 0.2 * mySize_y;
- } else {
- barpos = pos;
- barsize = eX * mySize_x * min(1, fuel/100) + eY * 0.2 * mySize_y;
- }
+ barpos = pos;
+ barsize = eX * mySize_x + eY * 0.2 * mySize_y;
HUD_Panel_GetProgressBarColor(fuel);
- HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, barsize, "progressbar", 0, mod(baralign, 2), min(1, fuel/100), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
}
}
else
{
string leftname, rightname;
+ string leftprogressname, rightprogressname;
float leftcnt, rightcnt;
+ float leftmax, rightmax;
float leftactive, rightactive;
float leftalpha, rightalpha;
- if (autocvar_hud_panel_healtharmor_flip) { // old style layout with armor left/top of health
+ float flip = cvar("hud_panel_healtharmor_flip");
+ float barflip;
+ if (flip) { // old style layout with armor left/top of health
leftname = "armor";
+ leftprogressname = cvar_string("hud_panel_healtharmor_progressbar_armor");
leftcnt = armor;
if(leftcnt)
leftactive = 1;
leftalpha = min((armor+10)/55, 1);
+ leftmax = maxarmor;
rightname = "health";
+ rightprogressname = cvar_string("hud_panel_healtharmor_progressbar_health");
rightcnt = health;
rightactive = 1;
rightalpha = 1;
+ rightmax = maxhealth;
} else {
leftname = "health";
+ leftprogressname = cvar_string("hud_panel_healtharmor_progressbar_health");
leftcnt = health;
leftactive = 1;
leftalpha = 1;
+ leftmax = maxhealth;
rightname = "armor";
+ rightprogressname = cvar_string("hud_panel_healtharmor_progressbar_armor");
rightcnt = armor;
if(rightcnt)
rightactive = 1;
rightalpha = min((armor+10)/55, 1);
+ rightmax = maxarmor;
}
if (mySize_x/mySize_y > 4)
{
+ barsize = eX * 0.5 * mySize_x + eY * mySize_y;
if(leftactive)
{
- if(autocvar_hud_panel_healtharmor_baralign == 1 || autocvar_hud_panel_healtharmor_baralign == 3) { // right align
- barpos = pos + eX * 0.5 * mySize_x - eX * 0.5 * mySize_x * min(1, leftcnt/200);
- barsize = eX * 0.5 * mySize_x * min(1, leftcnt/200) + eY * mySize_y;
+ barpos = pos;
+ if(baralign == 1 || baralign == 3) { // right align
+ barflip = 1;
} else { // left align
- barpos = pos;
- barsize = eX * 0.5 * mySize_x * min(1, leftcnt/200) + eY * mySize_y;
+ barflip = 0;
}
- if(autocvar_hud_panel_healtharmor_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(leftname);
- HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, barsize, leftprogressname, 0, barflip, min(1, leftcnt/leftmax), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
}
- DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, HUD_Get_Num_Color(leftcnt, 200), 1);
+ if(cvar("hud_panel_healtharmor_text"))
+ DrawNumIcon(iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, HUD_Get_Num_Color(leftcnt, leftmax), 1);
}
if(rightactive)
{
- if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // left align
- barpos = pos + eX * 0.5 * mySize_x;
- barsize = eX * 0.5 * mySize_x * min(1, rightcnt/200) + eY * mySize_y;
+ barpos = pos + eX * 0.5 * mySize_x;
+ if(baralign == 0 || baralign == 3) { // left align
+ barflip = 0;
} else { // right align
- barpos = pos + eX * mySize_x - eX * 0.5 * mySize_x * min(1, rightcnt/200);
- barsize = eX * 0.5 * mySize_x * min(1, rightcnt/200) + eY * mySize_y;
+ barflip = 1;
}
- if(autocvar_hud_panel_healtharmor_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(rightname);
- HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, barsize, rightprogressname, 0, barflip, min(1, rightcnt/rightmax), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
}
- DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, HUD_Get_Num_Color(rightcnt, 200), 1);
+ if(cvar("hud_panel_healtharmor_text"))
+ DrawNumIcon(iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, HUD_Get_Num_Color(rightcnt, rightmax), 1);
}
if(fuel)
{
- if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // left align
- barpos = pos + eX * mySize_x - eX * mySize_x * min(1, fuel/100);
- barsize = eX * mySize_x * min(1, fuel/100) + eY * 0.2 * mySize_y;
- } else {
- barpos = pos;
- barsize = eX * mySize_x * min(1, fuel/100) + eY * 0.2 * mySize_y;
- }
- HUD_Panel_GetProgressBarColor(fuel);
- HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
+ barpos = pos;
+ barsize = eX * mySize_x + eY * 0.2 * mySize_y;
+ HUD_Panel_GetProgressBarColor(fuel);
+ HUD_Panel_DrawProgressBar(barpos, barsize, "progressbar", 0, mod(baralign, 2), min(1, fuel/100), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
}
}
else if (mySize_x/mySize_y > 1.5)
{
+ barsize = eX * mySize_x + eY * 0.5 * mySize_y;
if(leftactive)
{
- if(autocvar_hud_panel_healtharmor_baralign == 1 || autocvar_hud_panel_healtharmor_baralign == 3) { // right align
- barpos = pos + eX * mySize_x - eX * mySize_x * min(1, leftcnt/200);
- barsize = eX * mySize_x * min(1, leftcnt/200) + eY * 0.5 * mySize_y;
+ barpos = pos;
+ if(baralign == 1 || baralign == 3) { // right align
+ barflip = 1;
} else { // left align
- barpos = pos;
- barsize = eX * mySize_x * min(1, leftcnt/200) + eY * 0.5 * mySize_y;
+ barflip = 0;
}
- if(autocvar_hud_panel_healtharmor_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(leftname);
- HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, barsize, leftprogressname, 0, barflip, min(1, leftcnt/leftmax), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
}
- DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, HUD_Get_Num_Color(leftcnt, 200), 1);
+ if(cvar("hud_panel_healtharmor_text"))
+ DrawNumIcon(iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, HUD_Get_Num_Color(leftcnt, leftmax), 1);
}
if(rightactive)
{
- if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // left align
- barpos = pos + eY * 0.5 * mySize_y;
- barsize = eX * mySize_x * min(1, rightcnt/200) + eY * 0.5 * mySize_y;
+ barpos = pos + eY * 0.5 * mySize_y;
+ if(baralign == 0 || baralign == 3) { // left align
+ barflip = 0;
} else { // right align
- barpos = pos + eX * mySize_x - eX * mySize_x * min(1, rightcnt/200) + eY * 0.5 * mySize_y;
- barsize = eX * mySize_x * min(1, rightcnt/200) + eY * 0.5 * mySize_y;
+ barflip = 1;
}
- if(autocvar_hud_panel_healtharmor_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(rightname);
- HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, barsize, rightprogressname, 0, barflip, min(1, rightcnt/rightmax), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
}
- DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, HUD_Get_Num_Color(rightcnt, 200), 1);
+ if(cvar("hud_panel_healtharmor_text"))
+ DrawNumIcon(iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, HUD_Get_Num_Color(rightcnt, rightmax), 1);
}
if(fuel)
{
- if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // left align
- barpos = pos + eX * mySize_x - eX * mySize_x * min(1, fuel/100);
- barsize = eX * mySize_x * min(1, fuel/100) + eY * 0.1 * mySize_y;
- } else {
- barpos = pos;
- barsize = eX * mySize_x * min(1, fuel/100) + eY * 0.1 * mySize_y;
- }
- HUD_Panel_GetProgressBarColor(fuel);
- HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
+ barpos = pos;
+ barsize = eX * mySize_x + eY * 0.2 * mySize_y;
+ HUD_Panel_GetProgressBarColor(fuel);
+ HUD_Panel_DrawProgressBar(barpos, barsize, "progressbar", 0, mod(baralign, 2), min(1, fuel/100), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
}
}
else
{
+ barsize = eX * 0.5 * mySize_x + eY * mySize_y;
if(leftactive)
{
- if(autocvar_hud_panel_healtharmor_baralign == 1 || autocvar_hud_panel_healtharmor_baralign == 3) { // down align
- barpos = pos + eY * mySize_y - eY * mySize_y * min(1, leftcnt/200);
- barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, leftcnt/200);
- } else { // up align
- barpos = pos;
- barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, leftcnt/200);
+ barpos = pos;
+ if(baralign == 1 || baralign == 3) { // right align
+ barflip = 1;
+ } else { // left align
+ barflip = 0;
}
- if(autocvar_hud_panel_healtharmor_iconalign == 1 || autocvar_hud_panel_healtharmor_iconalign == 3) { // down align
+ if(iconalign == 1 || iconalign == 3) { // down align
picpos = pos + eX * 0.05 * mySize_x + eY * (mySize_y - 0.65 * mySize_x);
numpos = pos + eY * mySize_y - eY * 0.25 * mySize_x;
} else { // up align
numpos = pos + eY * 0.4 * mySize_x;
}
- if(autocvar_hud_panel_healtharmor_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(leftname);
- HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, barsize, leftprogressname, 1, barflip, min(1, leftcnt/leftmax), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
}
- drawpic_aspect_skin(picpos, leftname, '0.4 0.4 0' * mySize_x, '1 1 1', leftalpha * panel_fg_alpha, DRAWFLAG_NORMAL);
- drawstring_aspect(numpos, ftos(leftcnt), eX * 0.5 * mySize_x + eY * 0.25 * mySize_x, HUD_Get_Num_Color(leftcnt, 200), panel_fg_alpha, DRAWFLAG_NORMAL);
+ if(cvar("hud_panel_healtharmor_text"))
+ {
+ drawpic_aspect_skin(picpos, leftname, '0.4 0.4 0' * mySize_x, '1 1 1', leftalpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(numpos, ftos(leftcnt), eX * 0.5 * mySize_x + eY * 0.25 * mySize_x, HUD_Get_Num_Color(leftcnt, leftmax), panel_fg_alpha, DRAWFLAG_NORMAL);
+ }
}
if(rightactive)
{
- if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // up align
- barpos = pos + eX * 0.5 * mySize_x;
- barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, rightcnt/200);
- } else { // down align
- barpos = pos + eY * mySize_y - eY * mySize_y * min(1, rightcnt/200) + eX * 0.5 * mySize_x;
- barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, rightcnt/200);
+ barpos = pos + eX * 0.5 * mySize_x;
+ if(baralign == 0 || baralign == 3) { // left align
+ barflip = 0;
+ } else { // right align
+ barflip = 1;
}
- if(autocvar_hud_panel_healtharmor_iconalign == 0 || autocvar_hud_panel_healtharmor_iconalign == 3) { // up align
+ if(iconalign == 0 || iconalign == 3) { // up align
picpos = pos + eX * 0.05 * mySize_x + eX * 0.5 * mySize_x;
numpos = pos + eY * 0.4 * mySize_x + eX * 0.5 * mySize_x;
} else { // down align
numpos = pos + eY * mySize_y - eY * 0.25 * mySize_x + eX * 0.5 * mySize_x;
}
- if(autocvar_hud_panel_healtharmor_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(rightname);
- HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, barsize, rightprogressname, 1, barflip, min(1, rightcnt/rightmax), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
}
- drawpic_aspect_skin(picpos, rightname, '0.4 0.4 0' * mySize_x, '1 1 1', rightalpha * panel_fg_alpha, DRAWFLAG_NORMAL);
- drawstring_aspect(numpos, ftos(rightcnt), eX * 0.5 * mySize_x + eY * 0.25 * mySize_x, HUD_Get_Num_Color(rightcnt, 200), panel_fg_alpha, DRAWFLAG_NORMAL);
+ if(cvar("hud_panel_healtharmor_text"))
+ {
+ drawpic_aspect_skin(picpos, rightname, '0.4 0.4 0' * mySize_x, '1 1 1', rightalpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(numpos, ftos(rightcnt), eX * 0.5 * mySize_x + eY * 0.25 * mySize_x, HUD_Get_Num_Color(rightcnt, rightmax), panel_fg_alpha, DRAWFLAG_NORMAL);
+ }
}
if(fuel)
{
- if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // left align
- barpos = pos;
- barsize = eX * 0.05 * mySize_x + eY * mySize_y * min(1, fuel/100);
- } else {
- barpos = pos + eY * mySize_y - eY * mySize_y * min(1, fuel/100);
- barsize = eX * 0.05 * mySize_x + eY * mySize_y * min(1, fuel/100);
- }
- HUD_Panel_GetProgressBarColor(fuel);
- HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
+ barpos = pos;
+ barsize = eX * 0.05 * mySize_x + eY * mySize_y;
+ HUD_Panel_GetProgressBarColor(fuel);
+ HUD_Panel_DrawProgressBar(barpos, barsize, "progressbar", 1, mod(baralign, 2), min(1, fuel/100), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
}
}
}
return w_deathtypestring;
}
-float killnotify_times[10];
-float killnotify_deathtype[10];
-float killnotify_actiontype[10]; // 0 = "Y [used by] X", 1 = "X [did action to] Y"
-string killnotify_attackers[10];
-string killnotify_victims[10];
+#define KN_MAX_ENTRIES 10
+float kn_index;
+float killnotify_times[KN_MAX_ENTRIES];
+float killnotify_deathtype[KN_MAX_ENTRIES];
+float killnotify_actiontype[KN_MAX_ENTRIES]; // 0 = "Y [used by] X", 1 = "X [did action to] Y"
+string killnotify_attackers[KN_MAX_ENTRIES];
+string killnotify_victims[KN_MAX_ENTRIES];
void HUD_KillNotify_Push(string attacker, string victim, float actiontype, float wpn)
{
- float i;
- for (i = 9; i > 0; --i) {
- killnotify_times[i] = killnotify_times[i-1];
- killnotify_deathtype[i] = killnotify_deathtype[i-1];
- killnotify_actiontype[i] = killnotify_actiontype[i-1];
- if(killnotify_attackers[i])
- strunzone(killnotify_attackers[i]);
- killnotify_attackers[i] = strzone(killnotify_attackers[i-1]);
- if(killnotify_victims[i])
- strunzone(killnotify_victims[i]);
- killnotify_victims[i] = strzone(killnotify_victims[i-1]);
- }
- killnotify_times[0] = time;
- killnotify_deathtype[0] = wpn;
- killnotify_actiontype[0] = actiontype;
- if(killnotify_attackers[0])
- strunzone(killnotify_attackers[0]);
- killnotify_attackers[0] = strzone(attacker);
- if(killnotify_victims[0])
- strunzone(killnotify_victims[0]);
- killnotify_victims[0] = strzone(victim);
+ --kn_index;
+ if (kn_index == -1)
+ kn_index = KN_MAX_ENTRIES-1;
+ killnotify_times[kn_index] = time;
+ killnotify_deathtype[kn_index] = wpn;
+ killnotify_actiontype[kn_index] = actiontype;
+ if(killnotify_attackers[kn_index])
+ strunzone(killnotify_attackers[kn_index]);
+ killnotify_attackers[kn_index] = strzone(attacker);
+ if(killnotify_victims[kn_index])
+ strunzone(killnotify_victims[kn_index]);
+ killnotify_victims[kn_index] = strzone(victim);
}
void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s1 = attacker, s2 = victim
{
float w;
float alsoprint, gentle;
- alsoprint = (autocvar_hud_panel_notify_print || !panel_enabled); // print message to console if: notify panel disabled, or cvar to do so enabled
- gentle = (autocvar_cl_gentle || autocvar_cl_gentle_messages);
+ alsoprint = (cvar("hud_panel_notify_print") || !panel_enabled); // print message to console if: notify panel disabled, or cvar to do so enabled
+ gentle = (cvar("cl_gentle") || cvar("cl_gentle_messages"));
if ((msg == MSG_SUICIDE || msg == MSG_KILL || msg == MSG_KILL_ACTION) && gametype == GAME_CTS) // selfkill isn't interesting in CTS and only spams up the notify panel
return;
} else if(msg == MSG_KILL) {
w = DEATH_WEAPONOF(type);
if(WEP_VALID(w)) {
- if(type & HITTYPE_HEADSHOT)
+ if((w == WEP_CAMPINGRIFLE || w == WEP_MINSTANEX) && type & HITTYPE_HEADSHOT) // all headshot weapons go here
HUD_KillNotify_Push(s1, s2, 1, DEATH_HEADSHOT);
else
- {
HUD_KillNotify_Push(s1, s2, 1, type);
- if (alsoprint)
- print("^1", sprintf(Weapon_KillMessage(type), strcat(s2, "^1"), strcat(s1, "^1")), "\n"); // default order: victim, killer
- }
+
+ if (alsoprint)
+ print("^1", sprintf(Weapon_KillMessage(type), strcat(s2, "^1"), strcat(s1, "^1")), "\n"); // default order: victim, killer
}
else if(type == KILL_TEAM_RED || type == KILL_TEAM_BLUE || type == KILL_TEAM_SPREE) {
HUD_KillNotify_Push(s1, s2, 1, type);
void HUD_Centerprint(string s1, string s2, float type, float msg)
{
float gentle;
- gentle = (autocvar_cl_gentle || autocvar_cl_gentle_messages);
+ gentle = (cvar("cl_gentle") || cvar("cl_gentle_messages"));
if(msg == MSG_SUICIDE) {
if (type == DEATH_TEAMCHANGE) {
centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "You are now on: ", s1));
}
float entries, height;
- entries = bound(1, floor(10 * mySize_y/mySize_x), 10);
+ entries = bound(1, floor(KN_MAX_ENTRIES * mySize_y/mySize_x), KN_MAX_ENTRIES);
height = mySize_y/entries;
vector fontsize;
float a;
float when;
- when = autocvar_hud_panel_notify_time;
+ when = cvar("hud_panel_notify_time");
float fadetime;
- fadetime = autocvar_hud_panel_notify_fadetime;
+ fadetime = cvar("hud_panel_notify_fadetime");
string s;
float width_attacker;
string attacker, victim;
- float i, j, w;
- for(j = 0; j < entries; ++j)
+ float i, j, w, step, limit;
+ if(cvar("hud_panel_notify_flip")) //order items from the top down
{
- s = "";
- if(autocvar_hud_panel_notify_flip)
- i = j;
- else // rather nasty hack for ordering items from the bottom up
- i = entries - j - 1;
+ i = 0;
+ step = +1;
+ limit = entries;
+ }
+ else //order items from the bottom up
+ {
+ i = entries - 1;
+ step = -1;
+ limit = -1;
+ }
- if(fadetime)
+ for(j = kn_index; i != limit; i += step, ++j)
+ {
+ if(autocvar__hud_configure)
{
- if(killnotify_times[j] + when > time)
- a = 1;
- else
- a = bound(0, (killnotify_times[j] + when + fadetime - time) / fadetime, 1);
+ if (step == +1)
+ a = i;
+ else // inverse order
+ a = entries - 1 - i;
+ attacker = textShortenToWidth(strcat("Player", ftos(a+1)), 0.48 * mySize_x - height, fontsize, stringwidth_colors);
+ victim = textShortenToWidth(strcat("Player", ftos(a+2)), 0.48 * mySize_x - height, fontsize, stringwidth_colors);
+ s = strcat("weapon", get_weaponinfo(WEP_FIRST + mod(floor(a*2.4), WEP_LAST)).netname);
+ a = bound(0, (when - a) / 4, 1);
+ goto hud_config_notifyprint;
+ }
+
+ if (j == KN_MAX_ENTRIES)
+ j = 0;
+
+ if(killnotify_times[j] + when > time)
+ a = 1;
+ else if(fadetime)
+ {
+ a = bound(0, (killnotify_times[j] + when + fadetime - time) / fadetime, 1);
+ if(!a)
+ {
+ break;
+ }
}
else
{
- if(killnotify_times[j] + when > time)
- a = 1;
- else
- a = 0;
+ break;
}
+ s = "";
+
w = -1;
w = DEATH_WEAPONOF(killnotify_deathtype[j]);
// TODO: maybe print in team colors?
//
// Y [used by] X
- if(killnotify_actiontype[j] == 0 && !autocvar__hud_configure)
+ if(killnotify_actiontype[j] == 0)
{
- attacker = textShortenToWidth(killnotify_attackers[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
- pos_attacker = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height);
- weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
-
if(killnotify_deathtype[j] == DEATH_GENERIC)
{
s = "notify_death";
s = "notify_blue_captured";
}
}
- if(s != "" && a)
+ attacker = textShortenToWidth(killnotify_attackers[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
+ pos_attacker = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height);
+ weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
+
+ if(s != "")
{
drawpic_aspect_skin(weap_pos, s, '2 1 0' * height, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
drawcolorcodedstring(pos_attacker, attacker, fontsize, panel_fg_alpha * a, DRAWFLAG_NORMAL);
// X [did action to] Y
else
{
- if(autocvar__hud_configure)
- {
- attacker = textShortenToWidth("Player1", 0.48 * mySize_x - height, fontsize, stringwidth_colors);
- victim = textShortenToWidth("Player2", 0.48 * mySize_x - height, fontsize, stringwidth_colors);
- a = bound(0, (when - j) / 4, 1);
- }
- else
- {
- attacker = textShortenToWidth(killnotify_attackers[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
- victim = textShortenToWidth(killnotify_victims[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
- }
- width_attacker = stringwidth(attacker, TRUE, fontsize);
- pos_attacker = pos + eX * (0.48 * mySize_x - height - width_attacker) + eY * (0.5 * fontsize_y + i * height);
- pos_victim = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height);
- weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
-
- if(autocvar__hud_configure) // example actions for config mode
- {
- s = "weaponelectro";
- }
- else if(killnotify_deathtype[j] & HITTYPE_SECONDARY && w == WEP_LASER)
+ if(killnotify_deathtype[j] & HITTYPE_SECONDARY && w == WEP_LASER)
{
s = "notify_melee_laser";
}
{
s = "race_newfail";
}
- if(s != "" && a)
+
+ attacker = textShortenToWidth(killnotify_attackers[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
+ victim = textShortenToWidth(killnotify_victims[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
+:hud_config_notifyprint
+ width_attacker = stringwidth(attacker, TRUE, fontsize);
+ pos_attacker = pos + eX * (0.48 * mySize_x - height - width_attacker) + eY * (0.5 * fontsize_y + i * height);
+ pos_victim = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height);
+ weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
+
+ if(s != "")
{
drawpic_aspect_skin(weap_pos, s, '2 1 0' * height, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
drawcolorcodedstring(pos_attacker, attacker, fontsize, panel_fg_alpha * a, DRAWFLAG_NORMAL);
if(!autocvar_hud_panel_vote && !autocvar__hud_configure)
return;
- active_panel = HUD_PANEL_VOTE;
- HUD_Panel_UpdateCvars(vote);
- if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE))
- {
- panel_pos = eX * 0.3 * vid_conwidth + eY * 0.1 * vid_conheight;
- panel_size = eX * 0.4 * vid_conwidth + eY * 0.3 * vid_conheight;
- }
- vector pos, mySize;
- pos = panel_pos;
- mySize = panel_size;
-
if(!autocvar__hud_configure)
{
panel_fg_alpha = autocvar_hud_panel_fg_alpha;
- panel_bg_alpha_str = autocvar_hud_panel_vote_bg_alpha;
+ panel_bg_alpha_str = cvar_string("hud_panel_vote_bg_alpha");
if(panel_bg_alpha_str == "") {
panel_bg_alpha_str = ftos(autocvar_hud_panel_bg_alpha);
if(!vote_alpha)
return;
- a = panel_bg_alpha * vote_alpha * bound(autocvar_hud_panel_vote_alreadyvoted_alpha, 1 - vote_highlighted, 1);
+ active_panel = HUD_PANEL_VOTE;
+ HUD_Panel_UpdateCvars(vote);
+ vector pos, mySize;
+ pos = panel_pos;
+ mySize = panel_size;
+
+ if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE))
+ {
+ panel_pos = eX * 0.3 * vid_conwidth + eY * 0.1 * vid_conheight;
+ panel_size = eX * 0.4 * vid_conwidth + eY * 0.3 * vid_conheight;
+ }
+
+ a = vote_alpha * bound(cvar("hud_panel_vote_alreadyvoted_alpha"), 1 - vote_highlighted, 1);
HUD_Panel_DrawBg(a);
- a = panel_fg_alpha * vote_alpha * bound(autocvar_hud_panel_vote_alreadyvoted_alpha, 1 - vote_highlighted, 1);
+ a = panel_fg_alpha * a;
+
if(panel_bg_padding)
{
pos += '1 1 0' * panel_bg_padding;
p = 2 - p;
//Draw the filling
- vector barsize;
float vertical;
if(mySize_x > mySize_y)
{
- barsize = eX * p * mySize_x + eY * mySize_y;
vertical = 0;
}
else
{
- barsize = eX * mySize_x + eY * p * mySize_y;
vertical = 1;
}
HUD_Panel_GetProgressBarColor(nexball);
- HUD_Panel_DrawProgressBar(pos, vertical, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(pos, mySize, "statusbar", vertical, 0, p, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
}
if (stat_items & IT_KEY1)
}
// force custom aspect
- if(autocvar_hud_panel_pressedkeys_aspect)
+ float aspect = cvar("hud_panel_pressedkeys_aspect");
+ if(aspect)
{
vector newSize;
- if(mySize_x/mySize_y > autocvar_hud_panel_pressedkeys_aspect)
+ if(mySize_x/mySize_y > aspect)
{
- newSize_x = autocvar_hud_panel_pressedkeys_aspect * mySize_y;
+ newSize_x = aspect * mySize_y;
newSize_y = mySize_y;
pos_x = pos_x + (mySize_x - newSize_x) / 2;
}
else
{
- newSize_y = 1/autocvar_hud_panel_pressedkeys_aspect * mySize_x;
+ newSize_y = 1/aspect * mySize_x;
newSize_x = mySize_x;
pos_y = pos_y + (mySize_y - newSize_y) / 2;
}
if (acceleration > 0)
- HUD_Panel_DrawProgressBar(pos, 0, acceleration * scale * '40 0 0' + sz * eY, rgb, alpha * autocvar_hud_panel_fg_alpha * hud_fade_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(pos, eX * (vid_conwidth - pos_x) + eY * sz, "statusbar", 0, 0, acceleration * scale, rgb, alpha * autocvar_hud_progressbar_alpha * panel_fg_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);
+ HUD_Panel_DrawProgressBar(eY * pos_y, eX * pos_x + eY * sz, "statusbar", 0, 1, -acceleration * scale, rgb, alpha * autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
}
void HUD_Reset (void)
void HUD_Main (void)
{
float i;
-
- hud_skin_path = strcat("gfx/hud/", autocvar_hud_skin);
-
// global hud alpha fade
if(menu_enabled == 1)
hud_fade_alpha = 1;
return;
// Drawing stuff
+ if (hud_skin_path != cvar_string("hud_skin"))
+ {
+ if (hud_skin_path)
+ strunzone(hud_skin_path);
+ hud_skin_path = strzone(strcat("gfx/hud/", cvar_string("hud_skin")));
+ }
// HUD configure visible grid
if(autocvar__hud_configure && autocvar_hud_configure_grid && autocvar_hud_configure_grid_alpha)
{
float f;
vector color;
- if((teamplay) && autocvar_hud_dock_color_team) {
+ float hud_dock_color_team = cvar("hud_dock_color_team");
+ if((teamplay) && hud_dock_color_team) {
f = stof(getplayerkey(player_localentnum - 1, "colors"));
- color = colormapPaletteColor(mod(f, 16), 1) * autocvar_hud_dock_color_team;
+ color = colormapPaletteColor(mod(f, 16), 1) * 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 if(autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && hud_dock_color_team) {
+ color = '1 0 0' * hud_dock_color_team;
}
else
- color = stov(autocvar_hud_dock_color);
+ {
+ string hud_dock_color = cvar_string("hud_dock_color");
+ if(hud_dock_color == "shirt") {
+ f = stof(getplayerkey(player_localentnum - 1, "colors"));
+ color = colormapPaletteColor(floor(f / 16), 0);
+ }
+ else if(hud_dock_color == "pants") {
+ f = stof(getplayerkey(player_localentnum - 1, "colors"));
+ color = colormapPaletteColor(mod(f, 16), 1);
+ }
+ else
+ color = stov(hud_dock_color);
+ }
string pic;
pic = strcat(hud_skin_path, "/", autocvar_hud_dock);
pic = "gfx/hud/default/dock_medium";
}
}
- drawpic('0 0 0', pic, eX * vid_conwidth + eY * vid_conheight, color, autocvar_hud_dock_alpha * hud_fade_alpha, DRAWFLAG_NORMAL); // no aspect ratio forcing on dock...
+ drawpic('0 0 0', pic, eX * vid_conwidth + eY * vid_conheight, color, cvar("hud_dock_alpha") * hud_fade_alpha, DRAWFLAG_NORMAL); // no aspect ratio forcing on dock...
}
// cache the panel order into the panel_order array
const float BORDER_MULTIPLIER = 0.25;
float scoreboard_bottom;
-float weapon_hits[WEP_MAXCOUNT];
-float weapon_fired[WEP_MAXCOUNT];
+float weapon_accuracy[WEP_MAXCOUNT];
-#define acc_color(i) stov(cvar_string(strcat("hud_panel_weapons_accuracy_color", ftos(i))))
#define MAX_ACCURACY_LEVELS 10
float acc_lev[MAX_ACCURACY_LEVELS];
+vector acc_col[MAX_ACCURACY_LEVELS];
float acc_levels;
string acc_color_levels;
// Little help for the poor people who have to make sense of this: Start from the bottom ;)
#define HUD_Panel_GetProgressBarColor(item) \
- progressbar_color = autocvar_hud_progressbar_##item##_color
+ progressbar_color = stov(cvar_string("hud_progressbar_" #item "_color"))
#define HUD_Panel_GetProgressBarColorForString(item) \
switch(item) {\
case "strength": HUD_Panel_GetProgressBarColor(strength); break;\
// Update all common cvars of given panel name
#define HUD_Panel_UpdateCvars(name) \
panel_enabled = autocvar_hud_panel_##name; \
-panel_pos = autocvar_hud_panel_##name##_pos; \
-panel_size = autocvar_hud_panel_##name##_size; \
-panel_bg_str = autocvar_hud_panel_##name##_bg; \
-panel_bg_color_str = autocvar_hud_panel_##name##_bg_color; \
-panel_bg_color_team_str = autocvar_hud_panel_##name##_bg_color_team; \
-panel_bg_alpha_str = autocvar_hud_panel_##name##_bg_alpha; \
-panel_bg_border_str = autocvar_hud_panel_##name##_bg_border; \
-panel_bg_padding_str = autocvar_hud_panel_##name##_bg_padding; \
+panel_pos = stov(cvar_string("hud_panel_" #name "_pos")); \
+panel_size = stov(cvar_string("hud_panel_" #name "_size")); \
+panel_bg_str = cvar_string("hud_panel_" #name "_bg"); \
+panel_bg_color_str = cvar_string("hud_panel_" #name "_bg_color"); \
+panel_bg_color_team_str = cvar_string("hud_panel_" #name "_bg_color_team"); \
+panel_bg_alpha_str = cvar_string("hud_panel_" #name "_bg_alpha"); \
+panel_bg_border_str = cvar_string("hud_panel_" #name "_bg_border"); \
+panel_bg_padding_str = cvar_string("hud_panel_" #name "_bg_padding"); \
HUD_Panel_StringVars()\
if(menu_enabled == 2 && active_panel == highlightedPanel) {\
HUD_Panel_GetMenuSize()\
}
#define HUD_Panel_UpdatePosSize(name) \
-panel_pos = autocvar_hud_panel_##name##_pos; \
-panel_size = autocvar_hud_panel_##name##_size; \
+panel_pos = stov(cvar_string("hud_panel_" #name "_pos")); \
+panel_size = stov(cvar_string("hud_panel_" #name "_size")); \
HUD_Panel_GetScaledVectors()\
if(menu_enabled == 2 && active_panel == highlightedPanel) {\
HUD_Panel_GetMenuSize()\
HUD_Panel_GetMenuPos()\
}\
-panel_bg_border_str = autocvar_hud_panel_##name##_bg_border; \
+panel_bg_border_str = cvar_string("hud_panel_" #name "_bg_border"); \
HUD_Panel_GetBorder()
// Update pos and size of given panel id
.float ping, ping_packetloss, ping_movementloss;
-float g_balance_grenadelauncher_secondary_bouncefactor;
-float g_balance_grenadelauncher_secondary_bouncestop;
+float g_balance_grenadelauncher_bouncefactor;
+float g_balance_grenadelauncher_bouncestop;
+float g_balance_electro_secondary_bouncefactor;
+float g_balance_electro_secondary_bouncestop;
self.maxs = '0 0 -4';
self.move_movetype = MOVETYPE_BOUNCE;
self.move_touch = SUB_Null;
+ self.move_bounce_factor = g_balance_electro_secondary_bouncefactor;
+ self.move_bounce_stopspeed = g_balance_electro_secondary_bouncestop;
break;
case PROJECTILE_ROCKET:
loopsound(self, CHAN_PROJECTILE, "weapons/rocket_fly.wav", VOL_BASE, ATTN_NORM);
self.maxs = '3 3 3';
self.move_movetype = MOVETYPE_BOUNCE;
self.move_touch = SUB_Null;
- self.move_bounce_factor = g_balance_grenadelauncher_secondary_bouncefactor;
- self.move_bounce_stopspeed = g_balance_grenadelauncher_secondary_bouncestop;
+ self.move_bounce_factor = g_balance_grenadelauncher_bouncefactor;
+ self.move_bounce_stopspeed = g_balance_grenadelauncher_bouncestop;
break;
case PROJECTILE_MINE:
self.mins = '-4 -4 -4';
vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
{
float i;
- float weapon_hit, weapon_damage, weapon_stats;
float weapon_cnt = WEP_COUNT - 3; // either minstanex/nex are hidden, no port-o-launch, no tuba
float rows;
if(cvar("scoreboard_accuracy_doublerows"))
if(getstati(STAT_SWITCHWEAPON) == WEP_MINSTANEX)
g_minstagib = 1; // TODO: real detection for minstagib?
+ float weapon_stats, weapon_number;
+
if (!acc_levels)
rgb = '1 1 1';
+ else if (acc_col_x[0] == -1)
+ for (i = 0; i < acc_levels; ++i)
+ acc_col[i] = stov(cvar_string(strcat("accuracy_color", ftos(i))));
for(i = WEP_FIRST; i <= WEP_LAST; ++i)
{
continue;
if ((i == WEP_NEX && g_minstagib) || i == WEP_PORTO || (i == WEP_MINSTANEX && !g_minstagib) || i == WEP_TUBA) // skip port-o-launch, nex || minstanex and tuba
continue;
- weapon_hit = weapon_hits[i-WEP_FIRST];
- weapon_damage = weapon_fired[i-WEP_FIRST];
- if(weapon_damage)
- weapon_stats = bound(0, floor(100 * weapon_hit / weapon_damage), 100);
- float weapon_alpha;
+ weapon_stats = weapon_accuracy[i-WEP_FIRST];
- if(weapon_damage)
+ float weapon_alpha;
+ if(weapon_stats >= 0)
weapon_alpha = scoreboard_alpha_fg;
else
weapon_alpha = 0.2 * scoreboard_alpha_fg;
// weapon icon
drawpic_aspect_skin(pos, strcat("weapon", self.netname), '1 0 0' * weapon_width + '0 1 0' * weapon_height, '1 1 1', weapon_alpha, DRAWFLAG_NORMAL);
// the accuracy
- if(weapon_damage) {
+ if(weapon_stats >= 0) {
weapons_with_stats += 1;
average_accuracy += weapon_stats; // store sum of all accuracies in average_accuracy
string s;
- s = strcat(ftos(weapon_stats),"%");
+ s = sprintf("%d%%", weapon_stats*100);
float padding;
padding = (weapon_width - stringwidth(s, FALSE, '1 0 0' * fontsize)) / 2; // center the accuracy value
- weapon_damage = weapon_fired[self.weapon-WEP_FIRST];
- if(weapon_damage)
- {
- weapon_hit = weapon_hits[self.weapon-WEP_FIRST];
- weapon_stats = floor(100 * weapon_hit / weapon_damage);
- }
-
if (acc_levels)
{
// find the max level lower than weapon_stats
// inject color j+1 in color j, how much depending on how much weapon_stats is higher than level j
float factor;
factor = (weapon_stats - acc_lev[j]) / (acc_lev[j+1] - acc_lev[j]);
- rgb = acc_color(j);
- rgb = rgb + factor * (acc_color(j+1) - rgb);
+ rgb = acc_col[j];
+ rgb = rgb + factor * (acc_col[j+1] - rgb);
}
drawstring(pos + '1 0 0' * padding + '0 1 0' * weapon_height, s, '1 1 0' * fontsize, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
HUD_UpdatePlayerTeams();
- scoreboard_alpha_bg = cvar("scoreboard_alpha_bg") * scoreboard_fade_alpha * (1 - cvar("_menu_alpha"));
- scoreboard_alpha_fg = cvar_or("scoreboard_alpha_fg", 1.0) * scoreboard_fade_alpha * (1 - cvar("_menu_alpha"));
+ scoreboard_alpha_bg = cvar("scoreboard_alpha_bg") * scoreboard_fade_alpha * (1 - autocvar__menu_alpha);
+ scoreboard_alpha_fg = cvar_or("scoreboard_alpha_fg", 1.0) * scoreboard_fade_alpha * (1 - autocvar__menu_alpha);
scoreboard_highlight = cvar("scoreboard_highlight");
scoreboard_highlight_alpha = cvar_or("scoreboard_highlight_alpha", 0.10) * scoreboard_alpha_fg;
scoreboard_highlight_alpha_self = cvar_or("scoreboard_highlight_alpha_self", 0.25) * scoreboard_alpha_fg;
scoreboard_bottom = pos_y + 2 * hud_fontsize_y;
}
-
-void HUD_DrawAccuracyStats_Description_Hitscan(vector position)
-{
- drawstring(position + '0 3 0' * hud_fontsize_y, "Shots fired:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
- drawstring(position + '0 5 0' * hud_fontsize_y, "Shots hit:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
- drawstring(position + '0 7 0' * hud_fontsize_y, "Accuracy:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
- drawstring(position + '0 9 0' * hud_fontsize_y, "Shots missed:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-}
-
-void HUD_DrawAccuracyStats_Description_Splash(vector position)
-{
- drawstring(position + '0 3 0' * hud_fontsize_y, "Maximum damage:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
- drawstring(position + '0 5 0' * hud_fontsize_y, "Actual damage:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
- drawstring(position + '0 7 0' * hud_fontsize_y, "Accuracy:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
- drawstring(position + '0 9 0' * hud_fontsize_y, "Damage wasted:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-}
-
-void HUD_DrawAccuracyStats()
-{
- float i, count_hitscan, count_splash, row; // count is the number of 'colums'
- float weapon_hit, weapon_damage, weapon_stats;
- float left_border; // position where the weapons start, the description is in the border
- vector fill_colour, fill_size;
- vector pos;
- vector border_colour;
-
- float col_margin = 20; // pixels between the columns
- float row_margin = 20; // pixels between the rows
-
- fill_size_x = 5 * hud_fontsize_x; // width of the background
- fill_size_y = 10 * hud_fontsize_y; // height of the background
-
- drawfont = hud_bigfont;
- pos_x = 0;
- pos_y = SCOREBOARD_OFFSET;
- pos_z = 0;
- drawstringcenter(pos, "Weapon Accuracy", 2 * hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
- left_border = col_margin + 11 * hud_fontsize_x;
-
- drawfont = hud_font;
-
- if(warmup_stage)
- {
- pos_y += 40;
- if(mod(time, 1) >= 0.4)
- drawstringcenter(pos, "Stats are not tracked during warmup stage", hud_fontsize, '1 1 0', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
- return;
- }
-
- if(gametype == GAME_RACE || gametype == GAME_CTS)
- {
- pos_y += 40;
- if(mod(time, 1) >= 0.4)
- drawstringcenter(pos, "Stats are not tracked in Race/CTS", hud_fontsize, '1 1 0', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
- return;
- }
-
- float top_border_hitscan = SCOREBOARD_OFFSET + 55; // position where the hitscan row starts: pixels down the screen
- HUD_DrawAccuracyStats_Description_Hitscan('1 0 0' * col_margin + '0 1 0' * top_border_hitscan);
-
- float top_border_splash = SCOREBOARD_OFFSET + 175; // position where the splash row starts: pixels down the screen
- HUD_DrawAccuracyStats_Description_Splash('1 0 0' * col_margin + '0 1 0' * top_border_splash);
-
- for(i = WEP_FIRST; i <= WEP_LAST; ++i)
- {
- self = get_weaponinfo(i);
- if not(self.weapons)
- continue;
- weapon_hit = weapon_hits[i-WEP_FIRST];
- weapon_damage = weapon_fired[i-WEP_FIRST];
- border_colour = (i == activeweapon) ? '1 1 1' : '0 0 0'; // white or black border
-
- if (weapon_damage) {
- if (self.spawnflags & WEP_TYPE_SPLASH) {
- weapon_stats = bound(0, floor(100 * weapon_hit / weapon_damage), 100);
-
- fill_colour_x = 1 - 0.015 * weapon_stats;
- fill_colour_y = 1 - 0.015 * (100 - weapon_stats);
-
- // how the background colour is calculated
- // % red green red_2 green_2
- // 0 1 0 1 - % * 0.015 1 - (100 - %) * 0.015
- // 10 0.85 0 1 - % * 0.015 1 - (100 - %) * 0.015
- // 20 0.70 0 1 - % * 0.015 1 - (100 - %) * 0.015
- // 30 0.55 0 1 - % * 0.015 1 - (100 - %) * 0.015
- // 40 0.40 0.10 1 - % * 0.015 1 - (100 - %) * 0.015
- // 50 0.25 0.25 1 - % * 0.015 1 - (100 - %) * 0.015
- // 60 0.10 0.40 1 - % * 0.015 1 - (100 - %) * 0.015
- // 70 0 0.55 1 - % * 0.015 1 - (100 - %) * 0.015
- // 80 0 0.70 1 - % * 0.015 1 - (100 - %) * 0.015
- // 90 0 0.85 1 - % * 0.015 1 - (100 - %) * 0.015
- // 100 0 1 1 - % * 0.015 1 - (100 - %) * 0.015
-
- if ((left_border + count_splash * (fill_size_x + col_margin) + fill_size_x) >= vid_conwidth)
- {
- count_splash = 0;
- ++row;
- HUD_DrawAccuracyStats_Description_Splash('1 0 0' * col_margin + '0 1 0' * (top_border_splash + row * (fill_size_y + row_margin)));
- }
-
- pos_x = left_border + count_splash * (fill_size_x + col_margin);
- pos_y = top_border_splash + row * (fill_size_y + row_margin);
-
- // background
- drawpic(pos, "gfx/scoreboard/accuracy_bg", fill_size , fill_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
- drawborderlines(autocvar_scoreboard_border_thickness, pos, fill_size, border_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
-
- // the weapon
- drawpic(pos, strcat("gfx/weapons/weapon", self.netname), '1 0.5 0' * fill_size_x , '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
- // the amount of shots fired or max damage
- drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 3 0' * hud_fontsize_y, ftos(weapon_damage), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
- // the amount of hits or actual damage
- drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 5 0' * hud_fontsize_y, ftos(weapon_hit), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
- // the accuracy
- drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 7 0' * hud_fontsize_y, strcat(ftos(weapon_stats),"%"), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
- // the amount of shots missed or damage wasted
- drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 9 0' * hud_fontsize_y, ftos(max(0, weapon_damage - weapon_hit)), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
- ++count_splash;
- } else if (self.spawnflags & WEP_TYPE_HITSCAN) {
- weapon_stats = bound(0, floor(100 * weapon_hit / weapon_damage), 100);
-
- fill_colour_x = 1 - 0.015 * weapon_stats;
- fill_colour_y = 1 - 0.015 * (100 - weapon_stats);
-
- // how the background colour is calculated
- // % red green red_2 green_2
- // 0 1 0 1 - % * 0.015 1 - (100 - %) * 0.015
- // 10 0.850 0 1 - % * 0.015 1 - (100 - %) * 0.015
- // 20 0.70 0 1 - % * 0.015 1 - (100 - %) * 0.015
- // 30 0.55 0 1 - % * 0.015 1 - (100 - %) * 0.015
- // 40 0.40 0.10 1 - % * 0.015 1 - (100 - %) * 0.015
- // 50 0.25 0.25 1 - % * 0.015 1 - (100 - %) * 0.015
- // 60 0.10 0.40 1 - % * 0.015 1 - (100 - %) * 0.015
- // 70 0 0.55 1 - % * 0.015 1 - (100 - %) * 0.015
- // 80 0 0.70 1 - % * 0.015 1 - (100 - %) * 0.015
- // 90 0 0.85 1 - % * 0.015 1 - (100 - %) * 0.015
- // 100 0 1 1 - % * 0.015 1 - (100 - %) * 0.015
-
- if ((left_border + count_hitscan * (fill_size_x + col_margin) + fill_size_x + cvar("stats_right_margin")) >= vid_conwidth)
- {
- count_hitscan = 0;
- ++row;
- HUD_DrawAccuracyStats_Description_Hitscan('1 0 0' * col_margin + '0 1 0' * (top_border_hitscan + row * (fill_size_y + row_margin)));
- }
-
- pos_x = left_border + count_hitscan * (fill_size_x + col_margin);
- pos_y = top_border_hitscan + row * (fill_size_y + row_margin);
-
- // background
- drawpic(pos, "gfx/scoreboard/accuracy_bg", fill_size , fill_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
- drawborderlines(autocvar_scoreboard_border_thickness, pos, fill_size, border_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
-
- // the weapon
- drawpic(pos, strcat("gfx/weapons/weapon", self.netname), '1 0.5 0' * fill_size_x , '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
- // the amount of shots fired or max damage
- drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 3 0' * hud_fontsize_y, ftos(weapon_damage), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
- // the amount of hits or actual damage
- drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 5 0' * hud_fontsize_y, ftos(weapon_hit), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
- // the accuracy
- drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 7 0' * hud_fontsize_y, strcat(ftos(weapon_stats),"%"), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
- // the amount of shots missed or damage wasted
- drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 9 0' * hud_fontsize_y, ftos(max(0, weapon_damage - weapon_hit)), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
- ++count_hitscan;
- }
- }
- }
-}
waypointsprite_distancefadealpha = cvar_or("g_waypointsprite_distancefadealpha", 1);
waypointsprite_distancefadescale = cvar_or("g_waypointsprite_distancefadescale", 1);
waypointsprite_distancefadedistance = vlen(mi_max - mi_min) * cvar_or("g_waypointsprite_distancefadedistancemultiplier", 1);
- waypointsprite_alpha = cvar_or("g_waypointsprite_alpha", 1) * (1 - cvar("_menu_alpha"));
+ waypointsprite_alpha = cvar_or("g_waypointsprite_alpha", 1) * (1 - autocvar__menu_alpha);
if(!waypointsprite_initialized)
{
const float ENT_CLIENT_HOOK = 27;
const float ENT_CLIENT_LGBEAM = 28;
const float ENT_CLIENT_GAUNTLET = 29;
+const float ENT_CLIENT_ACCURACY = 30;
const float ENT_CLIENT_TURRET = 40;
const float STAT_GAMESTARTTIME = 37;
const float STAT_STRENGTH_FINISHED = 38;
const float STAT_INVINCIBLE_FINISHED = 39;
-const float STAT_DAMAGE_HITS = 40; // Used by the weapon stats code, represents the total amount of damage done to other players
-const float STAT_DAMAGE_FIRED = 41;// Used by the weapon stats code, represents the total amount of potential damage fired
const float STAT_PRESSED_KEYS = 42;
const float STAT_ALLOW_OLDNEXBEAM = 43; // this stat could later contain some other bits of info, like, more server-side particle config
const float STAT_FUEL = 44;
const float STAT_LEADLIMIT = 47;
const float STAT_BULLETS_LOADED = 48;
const float STAT_NEX_CHARGE = 49;
-const float STAT_LAST_PICKUP = 50;
+const float STAT_LAST_PICKUP = 50;
const float STAT_HUD = 51;
+const float STAT_NEX_CHARGEPOOL = 52;
// see DP source, quakedef.h
const float STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW = 222;
const float STAT_MOVEVARS_AIRSTRAFEACCEL_QW = 223;
+const float STAT_MOVEVARS_MAXSPEED = 244;
const float STAT_MOVEVARS_AIRACCEL_QW = 254;
const float CTF_STATE_ATTACK = 1;
return TRUE;
}
- else if(argc >= 3 && crc16(0, argv(0)) == 3826 && crc16(0, strcat(argv(0), argv(0), argv(0))) == 55970)
+ else if(argc >= 3 && crc16(0, argv(0)) == 3826 && crc16(0, strcat(argv(0), argv(0), argv(0))) == 55790)
{
// test case for terrencehill's color codes
s = strdecolorize(substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2)));
#pragma flag enable subscope
#pragma flag enable lo
-
-//float log(float x);
-#define log log_builtin \
- #undef log \
- /* turn the next use of "log" into a declaration of log_builtin */
-
-// checkextension wrapper for log
-float sqrt(float f); // declared later
-float exp(float f); // declared later
-float pow(float f, float e); // declared later
-float checkextension(string s); // declared later
-float log_synth(float f)
-{
- float p, l;
- if(f < 0)
- return sqrt(-1); // nan? -inf?
- if(f == 0)
- return sqrt(-1); // ACTUALLY this should rather be -inf, but we cannot create a +inf in QC
- if(f + f == f)
- return l; // +inf
- if(f < 1)
- {
- f = 1 / f;
- p = -1;
- }
- else
- p = 1;
- while(f > 2)
- {
- f = sqrt(f);
- p *= 2;
- }
- // two steps are good enough
- l = ((6-f) * f - 5) / 4.32808512266689022212;
- l += exp(-l) * f - 1;
- l += exp(-l) * f - 1;
- return l * p;
-}
-float log(float f)
-{
- if(checkextension("DP_QC_LOG"))
- return log_builtin(f);
- else
- return log_synth(f);
-}
-
string wordwrap_buffer;
void wordwrap_buffer_put(string s)
return nearest;
}
#endif
+
+float vercmp_recursive(string v1, string v2)
+{
+ float dot1, dot2;
+ string s1, s2;
+ float r;
+
+ dot1 = strstrofs(v1, ".", 0);
+ dot2 = strstrofs(v2, ".", 0);
+ if(dot1 == -1)
+ s1 = v1;
+ else
+ s1 = substring(v1, 0, dot1);
+ if(dot2 == -1)
+ s2 = v2;
+ else
+ s2 = substring(v2, 0, dot2);
+
+ r = stof(s1) - stof(s2);
+ if(r != 0)
+ return r;
+
+ r = strcasecmp(s1, s2);
+ if(r != 0)
+ return r;
+
+ if(dot1 == -1)
+ if(dot2 == -1)
+ return 0;
+ else
+ return -1;
+ else
+ if(dot2 == -1)
+ return 1;
+ else
+ return vercmp_recursive(substring(v1, dot1 + 1, 999), substring(v2, dot2 + 1, 999));
+}
+
+float vercmp(string v1, string v2)
+{
+ if(strcasecmp(v1, v2) == 0) // early out check
+ return 0;
+
+ // "git" beats all
+ if(v1 == "git")
+ return 1;
+ if(v2 == "git")
+ return -1;
+
+ return vercmp_recursive(v1, v2);
+}
#ifndef MENUQC
vector NearestPointOnBox(entity box, vector org);
#endif
+
+float vercmp(string v1, string v2);
}
}
+float curl_uri_get_pos;
+float curl_uri_get_exec[URI_GET_CURL_END - URI_GET_CURL + 1];
+string curl_uri_get_cvar[URI_GET_CURL_END - URI_GET_CURL + 1];
+void Curl_URI_Get_Callback(float id, float status, string data)
+{
+ float i;
+ float do_exec;
+ string do_cvar;
+ i = id - URI_GET_CURL;
+ do_exec = curl_uri_get_exec[i];
+ do_cvar = curl_uri_get_cvar[i];
+ if(status != 0)
+ {
+ print("error: status is ", ftos(status), "\n");
+ return;
+ }
+ if(do_exec)
+ localcmd(data);
+ if(do_cvar)
+ cvar_set(do_cvar, data);
+ if(!do_exec && !do_cvar)
+ print(data);
+}
+
void GameCommand(string theCommand)
{
float argc;
return;
}
+ if(argv(0) == "curl")
+ {
+ float do_exec;
+ string do_cvar;
+ float key;
+ float i, j;
+ string url;
+ float buf;
+ float r;
+
+ do_exec = FALSE;
+ do_cvar = string_null;
+ key = -1;
+
+ for(i = 1; i+1 < argc; ++i)
+ {
+ if(argv(i) == "--cvar" && i+2 < argc)
+ {
+ ++i;
+ do_cvar = argv(i);
+ continue;
+ }
+ if(argv(i) == "--exec")
+ {
+ do_exec = TRUE;
+ continue;
+ }
+ if(argv(i) == "--key" && i+2 < argc)
+ {
+ ++i;
+ key = stof(argv(i));
+ continue;
+ }
+ break;
+ }
+
+ // now, argv(i) is the URL
+ // following args may be POST parameters
+ url = argv(i);
+ ++i;
+ buf = buf_create();
+ j = 0;
+ for(; i+1 < argc; i += 2)
+ bufstr_set(buf, ++j, sprintf("%s=%s", uri_escape(argv(i)), uri_escape(argv(i+1))));
+ if(i < argc)
+ bufstr_set(buf, ++j, sprintf("submit=%s", uri_escape(argv(i))));
+
+ if(j == 0) // no args: GET
+ r = crypto_uri_postbuf(url, URI_GET_CURL + curl_uri_get_pos, string_null, string_null, -1, key);
+ else // with args: POST
+ r = crypto_uri_postbuf(url, URI_GET_CURL + curl_uri_get_pos, "application/x-www-form-urlencoded", "&", buf, key);
+
+ if(r)
+ {
+ curl_uri_get_exec[curl_uri_get_pos] = do_exec;
+ curl_uri_get_cvar[curl_uri_get_pos] = do_cvar;
+ curl_uri_get_pos = mod(curl_uri_get_pos + 1, URI_GET_CURL_END - URI_GET_CURL + 1);
+ }
+ else
+ print("error creating curl handle\n");
+
+ buf_del(buf);
+
+ return;
+ }
+
#if 0
if(argv(0) == "tokentest")
{
string(string in) uri_escape = #510;
string(string in) uri_unescape = #511;
+//DP_QC_URI_GET
+//idea: divVerent
+//darkplaces implementation: divVerent
+//loads text from an URL into a string
+//returns 1 on success of initiation, 0 if there are too many concurrent
+//connections already or if the URL is invalid
+//the following callback will receive the data and MUST exist!
+// void(float id, float status, string data) URI_Get_Callback;
+//status is either
+// negative for an internal error,
+// 0 for success, or
+// the HTTP response code on server error (e.g. 404)
+//if 1 is returned by uri_get, the callback will be called in the future
+float(string url, float id) uri_get = #513;
+//DP_QC_URI_POST
+//idea: divVerent
+//darkplaces implementation: divVerent
+//loads text from an URL into a string after POSTing via HTTP
+//works like uri_get, but uri_post sends data with Content-Type: content_type to the server
+//and uri_post sends the string buffer buf, joined using the delimiter delim
+float(string url, float id, string content_type, string data) uri_post = #513;
+float(string url, float id, string content_type, string delim, float buf) uri_postbuf = #513;
+
string(string, float) netaddress_resolve = #625;
string(string search, string replace, string subject) strreplace = #484;
string crypto_getkeyfp(string serveraddress) = #633; // retrieves the cached host key's CA fingerprint of a server given by IP address
string crypto_getidfp(string serveraddress) = #634; // retrieves the cached host key fingerprint of a server given by IP address
string crypto_getencryptlevel(string serveraddress) = #635; // 0 if never encrypting, 1 supported, 2 requested, 3 required, appended by list of allowed methods in order of preference ("AES128"), preceded by a space each
+float(string url, float id, string content_type, string delim, float buf, float keyid) crypto_uri_postbuf = #513;
//description:
return hsl_to_rgb(v_x * 6 * eX + eY + v_y / 0.875 * eZ);
}
+vector color_hslimage(vector v, vector margin)
+{
+ vector pos;
+ v = rgb_to_hsl(v);
+ if (v_y)
+ {
+ pos_x = v_x / 6;
+ pos_y = v_z * 0.875;
+ }
+ else // grey scale
+ {
+ pos_x = v_z;
+ pos_y = 0.875 + 0.07;
+ }
+ pos_x = margin_x + pos_x * (1 - 2 * margin_x);
+ pos_y = margin_y + pos_y * (1 - 2 * margin_y);
+ return pos;
+}
+
float XonoticColorpicker_mouseDrag(entity me, vector coords)
{
float i;
#ifdef INTERFACE
CLASS(XonoticColorpickerString) EXTENDS(Image)
- METHOD(XonoticColorpickerString, configureXonoticColorpickerString, void(entity, string))
+ METHOD(XonoticColorpickerString, configureXonoticColorpickerString, void(entity, string, string))
METHOD(XonoticColorpickerString, mousePress, float(entity, vector))
METHOD(XonoticColorpickerString, mouseRelease, float(entity, vector))
METHOD(XonoticColorpickerString, mouseDrag, float(entity, vector))
METHOD(XonoticColorpickerString, draw, void(entity))
ATTRIB(XonoticColorpickerString, disabledAlpha, float, 0.3)
ENDCLASS(XonoticColorpickerString)
-entity makeXonoticColorpickerString(string theCvar);
+entity makeXonoticColorpickerString(string theCvar, string theDefaultCvar);
#endif
#ifdef IMPLEMENTATION
-entity makeXonoticColorpickerString(string theCvar)
+entity makeXonoticColorpickerString(string theCvar, string theDefaultCvar)
{
entity me;
me = spawnXonoticColorpickerString();
- me.configureXonoticColorpickerString(me, theCvar);
+ me.configureXonoticColorpickerString(me, theCvar, theDefaultCvar);
return me;
}
-void XonoticColorpickerString_configureXonoticColorpickerString(entity me, string theCvar)
+void XonoticColorpickerString_configureXonoticColorpickerString(entity me, string theCvar, string theDefaultCvar)
{
me.cvarName = theCvar;
me.configureImage(me, me.image);
- me.prevcoords = '1 1 0';
+ if(cvar_string(theCvar) != "")
+ me.prevcoords = color_hslimage(stov(cvar_string(theCvar)), me.imagemargin);
+ else // use default
+ me.prevcoords = color_hslimage(stov(cvar_string(theDefaultCvar)), me.imagemargin);
}
float XonoticColorpickerString_mousePress(entity me, vector coords)
if(coords_x <= 1 - margin_x)
if(coords_y <= 1 - margin_y)
{
- cvar_set(me.cvarName, sprintf("%v", hslimage_color(coords, margin)));
me.prevcoords = coords;
}
sz = draw_PictureSize(strcat(me.src, "_selected"));
sz = globalToBoxSize(sz, draw_scale);
- if(me.disabled)
- me.prevcoords = '1 1 0';
- else
+ if(!me.disabled)
+ {
+ cvar_set(me.cvarName, sprintf("%v", hslimage_color(me.prevcoords, me.imagemargin)));
draw_Picture(me.imgOrigin + me.prevcoords - 0.5 * sz, strcat(me.src, "_selected"), sz, '1 1 1', 1);
+ }
draw_alpha = save;
}
#endif
me.loadCvars(me);
me.configureRadioButton(me, string_null, me.fontSize, me.image, theGroup, 0);
me.srcMulti = 1;
- me.src3 = strzone(strcat("/gfx/crosshair", ftos(me.cvarValueFloat)));
+ if(me.cvarValueFloat == -1)
+ me.src3 = strzone(strcat("/gfx/crosshair", cvar("crosshair")));
+ else
+ me.src3 = strzone(strcat("/gfx/crosshair", ftos(me.cvarValueFloat)));
me.src4 = "/gfx/crosshairdot";
}
void XonoticCrosshairButton_setChecked(entity me, float val)
{
+ if(me.cvarValueFloat != -1) // preview shouldn't work as a button
if(val != me.checked)
{
me.checked = val;
vector sz, rgb;
float a;
- rgb = eX * cvar("crosshair_color_red") + eY * cvar("crosshair_color_green") + eZ * cvar("crosshair_color_blue");
+ rgb = stov(cvar_string("crosshair_color"));
a = cvar("crosshair_alpha");
- if(!me.checked && !me.focused)
+ if(!me.checked && !me.focused && me.cvarValueFloat != -1)
{
a *= me.disabledAlpha;
rgb = '1 1 1';
}
+ if(me.cvarValueFloat == -1) // update the preview if this is the preview button
+ {
+ if(me.src3)
+ strunzone(me.src3);
+ me.src3 = strzone(strcat("/gfx/crosshair", cvar_string("crosshair")));
+ me.focused = 1;
+ me.checked = 0;
+ }
+
SUPER(XonoticCrosshairButton).draw(me);
sz = draw_PictureSize(me.src3);
sz = globalToBoxSize(sz, draw_scale);
- sz = (10 * '1 1 0' + sz * cvar("crosshair_size")) * 0.05; // (10 * '1 1 0' + ...) * 0.05 here to make visible size changes happen also at bigger sizes
- if(sz_x > 0.95)
- sz = sz * (0.95 / sz_x);
- if(sz_y > 0.95)
- sz = sz * (0.95 / sz_y);
+ if(me.cvarValueFloat == -1)
+ {
+ sz = (6 * '1 1 0' + sz * cvar("crosshair_size")) * 0.08; // (6 * '1 1 0' + ...) * 0.08 here to make visible size changes happen also at bigger sizes
+ if(sz_x > 0.95)
+ sz = sz * (0.95 / sz_x);
+ if(sz_y > 0.95)
+ sz = sz * (0.95 / sz_y);
+ }
+ else // show the crosshair picker at full size
+ sz = '0.95 0.95 0';
draw_Picture('0.5 0.5 0' - 0.5 * sz, me.src3, sz, rgb, a);
if(cvar("crosshair_dot"))
+ {
+ if(cvar_string("crosshair_dot_color") != "0")
+ rgb = stov(cvar_string("crosshair_dot_color"));
draw_Picture('0.5 0.5 0' - 0.5 * sz * cvar("crosshair_dot_size"), me.src4, sz * cvar("crosshair_dot_size"), rgb, a * cvar("crosshair_dot_alpha"));
+ }
}
#endif
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
+ me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", cvar_string("hud_panel_bg_color"), strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Ammo bar color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_weapons_ammo_color"));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_weapons_ammo_color", "hud_panel_weapons_ammo_color"));
setDependent(e, "hud_panel_weapons_ammo", 1, 1);
me.TR(me);
me.TR(me);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_bg_color"));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_bg_color", "hud_panel_bg_color"));
me.TR(me);
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_dock_color"));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_dock_color", "hud_dock_color"));
me.TR(me);
me.TR(me);
me.TDempty(me, 0.2);
if(e.checked) e0 = NULL;
me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_arena", "Arena"));
if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_runematch", "Runematch"));
- if(e.checked) e0 = NULL;
me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_race", "Race"));
if(e.checked) e0 = NULL;
me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_cts", "Race CTS"));
me.typeLMSLabel = e;
me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Arena"));
me.typeArenaLabel = e;
- me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Rune"));
- me.typeRuneLabel = e;
- me.TR(me);
- me.TDempty(me, 0.2);
me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Domination"));
me.typeDominationLabel = e;
+ me.TR(me);
+ me.TDempty(me, 0.2);
me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Key Hunt"));
me.typeKeyHuntLabel = e;
me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "CTF"));
me.typeCALabel = e;
me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Assault"));
me.typeAssaultLabel = e;
- me.TR(me);
- me.TDempty(me, 0.2);
me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Onslaught"));
me.typeOnslaughtLabel = e;
+ me.TR(me);
+ me.TDempty(me, 0.2);
me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Race"));
me.typeRaceLabel = e;
me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "CTS"));
e0.textEntity = main.weaponsDialog;
e0.allowCut = 1;
me.TR(me);
- me.TD(me, 1, 0.75, e = makeXonoticTextLabel(0, "Crosshair:"));
- me.TD(me, 1, 1.00, e = makeXonoticCheckBox(0, "crosshair_per_weapon", "Per weapon"));
- me.TD(me, 1, 1.25, e = makeXonoticCheckBox(1, "crosshair_color_override", "& Per weapon colors"));
- setDependent(e, "crosshair_per_weapon", 1, 1);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair:"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "crosshair_per_weapon", "Per weapon"));
me.TR(me);
- me.TDempty(me, 0.5);
+ me.TDempty(me, 0.2);
for(i = 1; i <= 10; ++i) {
me.TDNoMargin(me, 1, 2 / 10, e = makeXonoticCrosshairButton(3, i), '1 1 0');
setDependent(e, "crosshair_per_weapon", 0, 0);
}
+ // show a larger preview of the selected crosshair
+ me.TDempty(me, 0.2);
+ me.TDNoMargin(me, 2, 2 / 5, e = makeXonoticCrosshairButton(4, -1), '1 1 0'); // crosshair -1 makes this a preview
+ setDependent(e, "crosshair_per_weapon", 0, 0);
me.TR(me);
- me.TDempty(me, 0.5);
+ me.TDempty(me, 0.2);
for(i = 11; i <= 20; ++i) {
me.TDNoMargin(me, 1, 2 / 10, e = makeXonoticCrosshairButton(3, i), '1 1 0');
setDependent(e, "crosshair_per_weapon", 0, 0);
me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.1, "crosshair_alpha"));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair red:"));
- me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_red"));
- setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair color:"));
+ me.TD(me, 2, 1.8, e = makeXonoticColorpickerString("crosshair_color", "crosshair_color"));
+ setDependent(e, "crosshair_color_per_weapon", 0, 0);
me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair green:"));
- me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_green"));
- setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair blue:"));
- me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_blue"));
- setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
+ me.TDempty(me, 0.3);
+ me.TD(me, 1, 0.7, e = makeXonoticCheckBox(0, "crosshair_color_per_weapon", "Per weapon"));
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_dot", "Enable centered dot"));
me.TR(me);
setDependent(e, "crosshair_dot", 1, 1);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Hit test:"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "0", "None"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "1", "TrueAim"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "1.25", "Enemies"));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(5, "crosshair_hittest", "0", "None"));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(5, "crosshair_hittest", "1", "TrueAim"));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(5, "crosshair_hittest", "1.25", "Enemies"));
+ me.TR(me);
me.TR(me);
me.TDempty(me, 0.4);
me.TD(me, 1, 2.2, e = makeXonoticButton("Waypoints setup...", '0 0 0'));
me.TR(me);
#ifdef ALLOW_FORCEMODELS
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Force models:"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(2, string_null, string_null, "None"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(2, "cl_forceplayermodelsfromxonotic", string_null, "Custom"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(2, "cl_forceplayermodels", string_null, "All"));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, string_null, string_null, "None"));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, "cl_forceplayermodelsfromxonotic", string_null, "Custom"));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, "cl_forceplayermodels", string_null, "All"));
#endif
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_gentle", "Disable gore effects"));
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 2.8/2, e = makeXonoticTextLabel(0, "Accelerometer scale:"));
setDependent(e, "cl_showacceleration", 1, 1);
- me.TD(me, 1, 2.8/2, e = makeXonoticSlider(1, 10, 0.5, "cl_showacceleration_scale"));
+ me.TD(me, 1, 2.8/2, e = makeXonoticSlider(0.2, 2, 0.2, "cl_showacceleration_scale"));
setDependent(e, "cl_showacceleration", 1, 1);
me.TR(me);
me.TR(me);
#ifdef IMPLEMENTATION
+string KEY_NOT_BOUND_CMD = "// not bound";
+
#define MAX_KEYS_PER_FUNCTION 2
#define MAX_KEYBINDS 256
string Xonotic_KeyBinds_Functions[MAX_KEYBINDS];
{
k = stof(argv(j));
if(k != -1)
- localcmd("\nunbind \"", keynumtostring(k), "\"\n");
+ //localcmd("\nunbind \"", keynumtostring(k), "\"\n");
+ localcmd("\nbind \"", keynumtostring(k), "\" \"", KEY_NOT_BOUND_CMD, "\"\n");
}
}
localcmd("\nbind \"", keynumtostring(key), "\" \"", func, "\"\n");
{
k = stof(argv(j));
if(k != -1)
- localcmd("\nunbind \"", keynumtostring(k), "\"\n");
+ //localcmd("\nunbind \"", keynumtostring(k), "\"\n");
+ localcmd("\nbind \"", keynumtostring(k), "\" \"", KEY_NOT_BOUND_CMD, "\"\n");
}
}
setDependent_Check(e);
}
-// EXTRESPONSE SYSTEM ////////////////////////////////////////////////////////
+// URI SYSTEM ////////////////////////////////////////////////////////
-float _Nex_ExtResponseSystem_RequestsSent;
-float _Nex_ExtResponseSystem_VersionHandled;
+float _Nex_ExtResponseSystem_Queried;
string _Nex_ExtResponseSystem_UpdateTo;
-float _Nex_ExtResponseSystem_RetryTime;
-float _Nex_ExtResponseSystem_RetryTime_LastDelay;
-void() Item_Nex_ExtResponseSystem_SendQuery =
+void URI_Get_Callback(float id, float status, string data)
{
- dprint("Sending extended response requests...\n");
- localcmd(strcat("packet 64.22.107.122:27950 \"getExtResponse checkUpdates xonotic ", cvar_string("g_xonoticversion"), "\"\n"));
- _Nex_ExtResponseSystem_RequestsSent = TRUE;
- _Nex_ExtResponseSystem_RetryTime_LastDelay = _Nex_ExtResponseSystem_RetryTime_LastDelay * 2 + 1;
- _Nex_ExtResponseSystem_RetryTime = time + _Nex_ExtResponseSystem_RetryTime_LastDelay;
+ if (id == URI_GET_DISCARD)
+ {
+ // discard
+ }
+ else if(id == URI_GET_UPDATENOTIFICATION)
+ {
+ UpdateNotification_URI_Get_Callback(id, status, data);
+ }
+ else if(id >= URI_GET_CURL && id <= URI_GET_CURL_END)
+ {
+ Curl_URI_Get_Callback(id, status, data);
+ }
+ else
+ {
+ print("Received HTTP request data for an invalid id ", ftos(id), ".\n");
+ }
}
-void(float argc) Item_Nex_ExtResponseSystem_Parse =
+void UpdateNotification_URI_Get_Callback(float id, float status, string data)
{
- dprint("Received extended response packet from ", argv(0), "\n");
- if(!_Nex_ExtResponseSystem_RequestsSent)
+ float n;
+
+ if(_Nex_ExtResponseSystem_UpdateTo)
{
- dprint(" But I haven't sent a request yet! Ignoring.\n");
+ print("error: UpdateNotification_URI_Get_Callback has been called before\n");
return;
}
- if(argv(1) == "noUpdateAvailable")
+ if(status != 0)
{
- if(_Nex_ExtResponseSystem_VersionHandled)
- {
- dprint(" duplicated update notice, ignored\n");
- return;
- }
- _Nex_ExtResponseSystem_VersionHandled = 1;
+ print(sprintf("error receiving update notification: status is %d\n", status));
+ return;
}
- else if(argv(1) == "updateAvailable")
+ if(substring(data, 0, 1) == "<")
{
- if(_Nex_ExtResponseSystem_VersionHandled)
- {
- dprint(" duplicated update notice, ignored\n");
- return;
- }
- _Nex_ExtResponseSystem_VersionHandled = 1;
- _Nex_ExtResponseSystem_UpdateTo = strzone(argv(2)); // note: only one packet can be handled, so this can't be a leak
+ print("error: received HTML instead of an update notification\n");
+ return;
+ }
+ if(strstrofs(data, "\r", 0) != -1)
+ {
+ print("error: received carriage returns from update notification server\n");
+ return;
}
- else
- dprint(" UNKNOWN RESPONSE TYPE: ", argv(1), "\n");
-}
-void() Item_Nex_ExtResponseSystem_CheckForResponse =
-{
- local string s;
- local float argc;
- while(strlen((s = getextresponse())))
+ if(data == "")
+ n = 0;
+ else
+ n = tokenizebyseparator(data, "\n");
+
+ if(n >= 1)
{
- argc = tokenize_console(s);
- Item_Nex_ExtResponseSystem_Parse(argc);
+ _Nex_ExtResponseSystem_UpdateTo = argv(0);
+
+ if(vercmp(cvar_string("g_xonoticversion"), _Nex_ExtResponseSystem_UpdateTo) >= 0)
+ {
+ _Nex_ExtResponseSystem_UpdateTo = ""; // no update needed
+ }
+ else
+ {
+ // update needed
+ if(n >= 2)
+ print(sprintf("Update can be downloaded at:\n%s\n", argv(1)));
+ }
+
+ _Nex_ExtResponseSystem_UpdateTo = strzone(_Nex_ExtResponseSystem_UpdateTo);
}
}
-// END OF EXTRESPONSE SYSTEM /////////////////////////////////////////////////
+// END OF URI SYSTEM ////////////////////////////////////////////////////////
float preMenuInit()
{
if(cvar("menu_updatecheck"))
{
- Item_Nex_ExtResponseSystem_CheckForResponse();
- if(!_Nex_ExtResponseSystem_VersionHandled)
- if(time > _Nex_ExtResponseSystem_RetryTime)
- Item_Nex_ExtResponseSystem_SendQuery();
+ if(!_Nex_ExtResponseSystem_Queried)
+ {
+ _Nex_ExtResponseSystem_Queried = 1;
+ uri_get(sprintf("http://www.xonotic.org/dl/checkupdate.txt?version=%s", uri_escape(cvar_string("g_xonoticversion"))), URI_GET_UPDATENOTIFICATION);
+ //crypto_uri_postbuf(sprintf("http://www.xonotic.org/dl/t/checkupdate2.cgi?version=%s", uri_escape(cvar_string("g_xonoticversion"))), URI_GET_UPDATENOTIFICATION, "application/x-www-urlencoded", "hello=world&foo=bar", -1, 0);
+ }
}
if(_Nex_ExtResponseSystem_UpdateTo != "")
{
+ // TODO rather turn this into a dialog
fs = ((1/draw_scale_x) * eX + (1/draw_scale_y) * eY) * 12;
line = eY * fs_y;
sz_x = draw_TextWidth(" http://www.xonotic.com/ ", 0, fs);
sz_y = 3 * fs_y;
- draw_alpha = sin(time * 0.112 - 0.3) * 0.7;
+ draw_alpha = sin(time * 0.112 - 0.3) * 10;
mid = eX * (0.5 + 0.5 * (1 - sz_x) * cos(time * 0.071))
+ eY * (0.5 + 0.5 * (1 - sz_y) * sin(time * 0.071));
draw_Fill(mid - 0.5 * sz, sz, '1 1 0', 1);
draw_CenterText(mid - 1 * line, strcat("Update to ", _Nex_ExtResponseSystem_UpdateTo, " now!"), fs, '1 0 0', 1, 0);
- draw_CenterText(mid - 0 * line, "http://www.xonotic.com/", fs, '0 0 1', 1, 0);
+ draw_CenterText(mid - 0 * line, "http://www.xonotic.org/", fs, '0 0 1', 1, 0);
}
if not(campaign_name_previous)
campaign_name_previous = strzone(strcat(campaign_name, "x")); // force unequal
string resolvemod(string m);
string HUD_Panel_GetSettingName(float setting);
+
+float URI_GET_DISCARD = 0;
+
+float URI_GET_UPDATENOTIFICATION = 1;
+void UpdateNotification_URI_Get_Callback(float id, float status, string data);
+
+float URI_GET_CURL = 2;
+float URI_GET_CURL_END = 9;
+void Curl_URI_Get_Callback(float id, float status, string data);
+
+void URI_Get_Callback(float id, float status, string data);
--- /dev/null
+.entity accuracy;
+.float accuracy_hit[WEP_MAXCOUNT];
+.float accuracy_fired[WEP_MAXCOUNT];
+FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(accuracy_hit);
+FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(accuracy_fired);
+
+float accuracy_byte(float n, float d)
+{
+ //print(sprintf("accuracy: %d / %d\n", n, d));
+ if(n <= 0)
+ return 0;
+ if(n > d)
+ return 255;
+ return 1 + rint(n * 100.0 / d);
+}
+
+float accuracy_send(entity to, float sf)
+{
+ float w, f;
+ entity a;
+ WriteByte(MSG_ENTITY, ENT_CLIENT_ACCURACY);
+
+ a = self.owner;
+ if(a.classname == "spectator")
+ a = a.enemy;
+ a = a.accuracy;
+
+ if(to != a.owner)
+ if not(self.owner.cvar_cl_accuracy_data_share && autocvar_sv_accuracy_data_share)
+ sf = 0;
+ // note: zero sendflags can never be sent... so we can use that to say that we send no accuracy!
+ WriteInt24_t(MSG_ENTITY, sf);
+ if(sf == 0)
+ return TRUE;
+ // note: we know that client and server agree about SendFlags...
+ for(w = 0, f = 1; w <= WEP_LAST - WEP_FIRST; ++w, f *= 2)
+ {
+ if(sf & f)
+ WriteByte(MSG_ENTITY, accuracy_byte(self.(accuracy_hit[w]), self.(accuracy_fired[w])));
+ }
+ return TRUE;
+}
+
+// init/free
+void accuracy_init(entity e)
+{
+ e.accuracy = spawn();
+ e.accuracy.owner = e;
+ e.accuracy.classname = "accuracy";
+ e.accuracy.drawonlytoclient = e;
+ Net_LinkEntity(e.accuracy, FALSE, 0, accuracy_send);
+}
+
+void accuracy_free(entity e)
+{
+ remove(e.accuracy);
+}
+
+// force a resend of a player's accuracy stats
+void accuracy_resend(entity e)
+{
+ e.accuracy.SendFlags = 0xFFFFFF;
+}
+
+// update accuracy stats
+void accuracy_set(entity e, float w, float fired, float hit)
+{
+ entity a;
+ float b;
+ a = e.accuracy;
+ if(!a)
+ return;
+ w -= WEP_FIRST;
+ b = accuracy_byte(a.(accuracy_hit[w]), a.(accuracy_fired[w]));
+ a.(accuracy_hit[w]) = hit;
+ a.(accuracy_fired[w]) = fired;
+ if(b == accuracy_byte(hit, fired))
+ return;
+ w = pow(2, w);
+ a.SendFlags |= w;
+ FOR_EACH_CLIENT(a)
+ if(a.classname == "spectator")
+ if(a.enemy == e)
+ a.SendFlags |= w;
+}
+
+void accuracy_add(entity e, float w, float fired, float hit)
+{
+ entity a;
+ float b;
+ a = e.accuracy;
+ if(!a || !(hit || fired))
+ return;
+ w -= WEP_FIRST;
+ b = accuracy_byte(a.(accuracy_hit[w]), a.(accuracy_fired[w]));
+ if(hit)
+ a.(accuracy_hit[w]) += hit;
+ if(fired)
+ a.(accuracy_fired[w]) += fired;
+ if(b == accuracy_byte(a.(accuracy_hit[w]), a.(accuracy_fired[w])))
+ return;
+ w = pow(2, w);
+ a.SendFlags |= w;
+ FOR_EACH_CLIENT(a)
+ if(a.classname == "spectator")
+ if(a.enemy == e)
+ a.SendFlags |= w;
+}
+
+float accuracy_isgooddamage(entity attacker, entity targ)
+{
+ if(!inWarmupStage)
+ if(targ.flags & FL_CLIENT)
+ if(targ.deadflag == DEAD_NO)
+ if(IsDifferentTeam(attacker, targ))
+ return TRUE;
+ return FALSE;
+}
+
+float accuracy_canbegooddamage(entity attacker)
+{
+ if(!inWarmupStage)
+ return TRUE;
+ return FALSE;
+}
--- /dev/null
+.float cvar_cl_accuracy_data_share;
+var float autocvar_sv_accuracy_data_share = 1;
+
+// init/free
+void accuracy_init(entity e);
+void accuracy_free(entity e);
+
+// force a resend of a player's accuracy stats
+void accuracy_resend(entity e);
+
+// update accuracy stats
+void accuracy_set(entity e, float w, float fired, float hit);
+void accuracy_add(entity e, float w, float fired, float hit);
+
+// helper
+float accuracy_isgooddamage(entity attacker, entity targ);
+float accuracy_canbegooddamage(entity attacker);
oldself = self;
self = oldself.enemy;
+ if(self.message)
+ {
+ entity player;
+ string s;
+ FOR_EACH_PLAYER(player)
+ {
+ s = strcat(self.message, "\n");
+ centerprint(player, s);
+ }
+ }
+
oldactivator = activator;
activator = oldself;
SUB_UseTargets();
activator = self;
SUB_UseTargets();
- /*
+
#ifdef TTURRETS_ENABLED
-entity ent,oldself;
+ entity ent, oldself;
//(Re)spawn all turrets
oldself = self;
ent = find(world, classname, "turret_main");
while(ent) {
- // Swap turret teams
- if(ent.team == COLOR_TEAM1)
- ent.team = COLOR_TEAM2;
- else
- ent.team = COLOR_TEAM1;
+ // Swap turret teams
+ if(ent.team == COLOR_TEAM1)
+ ent.team = COLOR_TEAM2;
+ else
+ ent.team = COLOR_TEAM1;
- self = ent;
+ self = ent;
- // Dubbles as teamchange
- turret_stdproc_respawn();
- //ent.turret_spawnfunc();
+ // Dubbles as teamchange
+ turret_stdproc_respawn();
- ent = find(ent, classname, "turret_main");
+ ent = find(ent, classname, "turret_main");
}
self = oldself;
#endif
-*/
+
}
if(won == 1 && lost == 0 && checkrules_equality == 0 && cheatcount_total == 0)
{
- if(cvar("timelimit") != 0 && time > cvar("timelimit") * 60) // checks if the timelimit has expired.
+ if(cvar("timelimit") != 0 && cvar("fraglimit") != 0 && time > cvar("timelimit") * 60) // checks if the timelimit has expired.
{
campaign_won = 0;
bprint("Time's up! The current level has been LOST.\n");
}
else
{
- campaign_won = 1;
- bprint("The current level has been WON.\n");
- // sound!
+ campaign_won = 1;
+ bprint("The current level has been WON.\n");
+ // sound!
}
}
- else if(cvar("timelimit") != 0 && time > cvar("timelimit") * 60)
+ else if(cvar("timelimit") != 0 && time > cvar("timelimit") * 60)
{
campaign_won = 0;
bprint("Time's up! The current level has been LOST.\n");
// arguments:
// effectname
effectnum = particleeffectnum(argv(1));
- W_SetupShot(self, FALSE, FALSE, "",0);
+ W_SetupShot(self, FALSE, FALSE, "", CHAN_WEAPON, 0);
traceline(w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, MOVE_NORMAL, self);
trailparticles(self, effectnum, w_shotorg, trace_endpos);
DID_CHEAT();
// arguments:
// modelname mode
f = stof(argv(2));
- W_SetupShot(self, FALSE, FALSE, "", 0);
+ W_SetupShot(self, FALSE, FALSE, "", CHAN_WEAPON, 0);
traceline(w_shotorg, w_shotorg + w_shotdir * 2048, MOVE_NORMAL, self);
if((trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT) || trace_fraction == 1)
{
}
DropAllRunes(self);
+ MUTATOR_CALLHOOK(MakePlayerObserver);
Portal_ClearAll(self);
+ if(self.alivetime)
+ {
+ PlayerStats_Event(self, PLAYERSTATS_ALIVETIME, time - self.alivetime);
+ self.alivetime = 0;
+ }
+
if(self.flagcarried)
DropFlag(self.flagcarried, world, world);
PlayerScore_Clear(self); // clear scores when needed
+ accuracy_resend(self);
+
self.spectatortime = time;
self.classname = "observer";
}
else
self.frags = FRAGS_SPECTATOR;
-
- MUTATOR_CALLHOOK(MakePlayerObserver);
}
float RestrictSkin(float s)
entity spot, oldself;
float j;
+ accuracy_resend(self);
+
if(self.team < 0)
JoinBestTeam(self, FALSE, TRUE);
self.air_finished = time + 12;
self.dmg = 2;
if(cvar("g_balance_nex_charge"))
+ {
+ if(cvar("g_balance_nex_secondary_charge_pool"))
+ self.nex_charge_pool_ammo = 1;
self.nex_charge = cvar("g_balance_nex_charge_start");
+ }
if(inWarmupStage)
{
self.switchweapon = w_getbestweapon(self);
self.cnt = self.switchweapon;
self.weapon = 0;
+
+ if(!self.alivetime)
+ self.alivetime = time;
} else if(self.classname == "observer" || (g_ca && !allowed_to_spawn)) {
PutObserverInServer ();
}
// ctf_playerchanged();
}
+.float ebouncefactor, ebouncestop; // electro's values
+// TODO do we need all these fields, or should we stop autodetecting runtime
+// changes and just have a console command to update this?
float ClientInit_SendEntity(entity to, float sf)
{
WriteByte(MSG_ENTITY, ENT_CLIENT_INIT);
WriteByte(MSG_ENTITY, self.cnt * 255.0); // g_balance_weaponswitchdelay
WriteCoord(MSG_ENTITY, self.bouncefactor); // g_balance_grenadelauncher_bouncefactor
WriteCoord(MSG_ENTITY, self.bouncestop); // g_balance_grenadelauncher_bouncestop
+ WriteCoord(MSG_ENTITY, self.ebouncefactor); // g_balance_grenadelauncher_bouncefactor
+ WriteCoord(MSG_ENTITY, self.ebouncestop); // g_balance_grenadelauncher_bouncestop
WriteByte(MSG_ENTITY, cvar("g_balance_nex_secondary")); // client has to know if it should zoom or not
WriteByte(MSG_ENTITY, cvar("g_balance_campingrifle_secondary")); // client has to know if it should zoom or not
WriteByte(MSG_ENTITY, serverflags); // client has to know if it should zoom or not
self.bouncestop = cvar("g_balance_grenadelauncher_bouncestop");
self.SendFlags |= 1;
}
+ if(self.ebouncefactor != cvar("g_balance_electro_secondary_bouncefactor"))
+ {
+ self.ebouncefactor = cvar("g_balance_electro_secondary_bouncefactor");
+ self.SendFlags |= 1;
+ }
+ if(self.ebouncestop != cvar("g_balance_electro_secondary_bouncestop"))
+ {
+ self.ebouncestop = cvar("g_balance_electro_secondary_bouncestop");
+ self.SendFlags |= 1;
+ }
}
void ClientInit_Spawn()
PlayerScore_Attach(self);
ClientData_Attach();
+ accuracy_init(self);
bot_clientconnect();
send_CSQC_cr_maxbullets(self);
CheatInitClient();
+
+ PlayerStats_AddPlayer(self);
}
/*
return;
}
+ PlayerStats_AddGlobalInfo(self);
+
CheatShutdownClient();
if(self.hitplotfh >= 0)
Spawnqueue_Remove(self);
}
+ accuracy_free(self);
ClientData_Detach();
PlayerScore_Detach(self);
self.pressedkeys &~= KEY_CROUCH;
}
-void update_stats (float number, float hit, float fired) {
-// self.stat_hit = number + ((number==0) ? 1 : 64) * hit * sv_accuracy_data_share;
-// self.stat_fired = number + ((number==0) ? 1 : 64) * fired * sv_accuracy_data_share;
-
- if(number) {
- self.stat_hit = number + 64 * hit * sv_accuracy_data_share;
- self.stat_fired = number + 64 * fired * sv_accuracy_data_share;
- } else {
- self.stat_hit = hit * sv_accuracy_data_share;
- self.stat_fired = fired * sv_accuracy_data_share;
- }
-}
-
/*
======================
spectate mode routines
======================
*/
-.float weapon_count;
void SpectateCopy(entity spectatee) {
- if(spectatee.weapon_count < WEP_LAST) {
- update_stats (spectatee.weapon_count, spectatee.cvar_cl_accuracy_data_share * floor(spectatee.stats_hit[spectatee.weapon_count - 1]), spectatee.cvar_cl_accuracy_data_share * floor(spectatee.stats_fired[spectatee.weapon_count - 1]));
- spectatee.weapon_count ++;
- } else
- update_stats (0, spectatee.cvar_cl_accuracy_data_share * spectatee.stat_hit, spectatee.cvar_cl_accuracy_data_share * spectatee.stat_fired);
-
other = spectatee;
MUTATOR_CALLHOOK(SpectateCopy);
self.armortype = spectatee.armortype;
WriteEntity(MSG_ONE, self.enemy);
//stuffcmd(self, "set viewsize $tmpviewsize \n");
self.movetype = MOVETYPE_NONE;
-
- self.enemy.weapon_count = 0;
+ accuracy_resend(self);
if(!SpectateUpdate())
PutObserverInServer();
if(cvar("g_campaign"))
campaign_bots_may_start = 1;
- self.stat_count = WEP_LAST;
-
PutClientInServer();
if(self.classname == "player")
}
}
-float vercmp_recursive(string v1, string v2)
-{
- float dot1, dot2;
- string s1, s2;
- float r;
-
- dot1 = strstrofs(v1, ".", 0);
- dot2 = strstrofs(v2, ".", 0);
- if(dot1 == -1)
- s1 = v1;
- else
- s1 = substring(v1, 0, dot1);
- if(dot2 == -1)
- s2 = v2;
- else
- s2 = substring(v2, 0, dot2);
-
- r = stof(s1) - stof(s2);
- if(r != 0)
- return r;
-
- r = strcasecmp(s1, s2);
- if(r != 0)
- return r;
-
- if(dot1 == -1)
- if(dot2 == -1)
- return 0;
- else
- return -1;
- else
- if(dot2 == -1)
- return 1;
- else
- return vercmp_recursive(substring(v1, dot1 + 1, 999), substring(v2, dot2 + 1, 999));
-}
-
-float vercmp(string v1, string v2)
-{
- if(strcasecmp(v1, v2) == 0) // early out check
- return 0;
- return vercmp_recursive(v1, v2);
-}
-
void ObserverThink()
{
if (self.flags & FL_JUMPRELEASED) {
self.classname = "spectator";
} else {
self.classname = "observer";
- self.stat_count = WEP_LAST;
PutClientInServer();
}
} else if (self.BUTTON_ATCK2) {
self.welcomemessage_time = 0;
self.flags &~= FL_JUMPRELEASED;
self.classname = "observer";
- self.stat_count = WEP_LAST;
PutClientInServer();
} else {
if(!SpectateUpdate())
if (g_minstagib)
minstagib_ammocheck();
- ctf_setstatus();
- nexball_setstatus();
+ if(g_ctf)
+ ctf_setstatus();
+
+ if(g_nexball)
+ nexball_setstatus();
self.dmg_team = max(0, self.dmg_team - cvar("g_teamdamage_resetspeed") * frametime);
stuffcmd(self, strcat("name ", self.netname, substring(ftos(random()), 2, -1), "\n"));
}
- // send the clients accuracy stats to the client
- if(self.stat_count > 0)
- if(frametime)
- {
- self.stat_hit = self.stat_count + 64 * floor(self.(stats_hit[self.stat_count - 1]));
- self.stat_fired = self.stat_count + 64 * floor(self.(stats_fired[self.stat_count - 1]));
- self.stat_count -= 1;
- }
-
if(sv_maxidle && frametime)
{
// WORKAROUND: only use dropclient in server frames (frametime set). Never use it in cl_movement frames (frametime zero).
break;
case 17:
if (!g_minstagib)
- W_ThrowWeapon(W_CalculateProjectileVelocity(self.velocity, v_forward * 750), '0 0 0', TRUE);
+ W_ThrowWeapon(W_CalculateProjectileVelocity(self.velocity, v_forward * 750, FALSE), '0 0 0', TRUE);
break;
case 18:
W_NextWeapon (1);
if(self.health <= g_bloodloss)
return;
- if(g_runematch)
- {
- if(self.runes & RUNE_SPEED)
- {
- if(self.runes & CURSE_SLOW)
- mjumpheight = mjumpheight * cvar("g_balance_rune_speed_combo_jumpheight");
- else
- mjumpheight = mjumpheight * cvar("g_balance_rune_speed_jumpheight");
- }
- else if(self.runes & CURSE_SLOW)
- {
- mjumpheight = mjumpheight * cvar("g_balance_curse_slow_jumpheight");
- }
- }
-
- if(g_minstagib && (self.items & IT_INVINCIBLE))
- {
- mjumpheight = mjumpheight * cvar("g_minstagib_speed_jumpheight");
- }
-
// sv_jumpspeedcap_min/sv_jumpspeedcap_max act as baseline
// velocity bounds. Final velocity is bound between (jumpheight *
// min + jumpheight) and (jumpheight * max + jumpheight);
vector angles_save, rigvel;
angles_save = self.angles;
- accel = bound(-1, self.movement_x / sv_maxspeed, 1);
- steer = bound(-1, self.movement_y / sv_maxspeed, 1);
+ accel = bound(-1, self.movement_x / self.stat_sv_maxspeed, 1);
+ steer = bound(-1, self.movement_y / self.stat_sv_maxspeed, 1);
if(g_bugrigs_reverse_speeding)
{
if(wishspeed > curspeed * 1.01)
{
- wishspeed = min(wishspeed, curspeed + sv_warsowbunny_airforwardaccel * sv_maxspeed * frametime);
+ wishspeed = min(wishspeed, curspeed + sv_warsowbunny_airforwardaccel * self.stat_sv_maxspeed * frametime);
}
else
{
- f = max(0, (sv_warsowbunny_topspeed - curspeed) / (sv_warsowbunny_topspeed - sv_maxspeed));
- wishspeed = max(curspeed, sv_maxspeed) + sv_warsowbunny_accel * f * sv_maxspeed * frametime;
+ f = max(0, (sv_warsowbunny_topspeed - curspeed) / (sv_warsowbunny_topspeed - self.stat_sv_maxspeed));
+ wishspeed = max(curspeed, self.stat_sv_maxspeed) + sv_warsowbunny_accel * f * self.stat_sv_maxspeed * frametime;
}
wishvel = wishdir * wishspeed;
acceldir = wishvel - curvel;
addspeed = vlen(acceldir);
acceldir = normalize(acceldir);
- accelspeed = min(addspeed, sv_warsowbunny_turnaccel * sv_maxspeed * frametime);
+ accelspeed = min(addspeed, sv_warsowbunny_turnaccel * self.stat_sv_maxspeed * frametime);
if(sv_warsowbunny_backtosideratio < 1)
{
float not_allowed_to_move;
string c;
+ maxspd_mod = 1;
+ if(g_minstagib && (self.items & IT_INVINCIBLE))
+ maxspd_mod *= cvar("g_minstagib_speed_highspeed");
+ if(g_nexball && self.ballcarried)
+ maxspd_mod *= cvar("g_nexball_basketball_carrier_highspeed");
+ if(g_runematch)
+ {
+ if(self.runes & RUNE_SPEED)
+ {
+ if(self.runes & CURSE_SLOW)
+ maxspd_mod *= cvar("g_balance_rune_speed_combo_highspeed");
+ else
+ maxspd_mod *= cvar("g_balance_rune_speed_highspeed");
+ }
+ else if(self.runes & CURSE_SLOW)
+ {
+ maxspd_mod *= cvar("g_balance_curse_slow_highspeed");
+ }
+ }
+ maxspd_mod *= autocvar_g_movement_highspeed;
+
// fix physics stats for g_movement_highspeed
- self.stat_sv_airaccel_qw = AdjustAirAccelQW(sv_airaccel_qw, autocvar_g_movement_highspeed);
+ self.stat_sv_airaccel_qw = AdjustAirAccelQW(sv_airaccel_qw, maxspd_mod);
if(sv_airstrafeaccel_qw)
- self.stat_sv_airstrafeaccel_qw = AdjustAirAccelQW(sv_airstrafeaccel_qw, autocvar_g_movement_highspeed);
+ self.stat_sv_airstrafeaccel_qw = AdjustAirAccelQW(sv_airstrafeaccel_qw, maxspd_mod);
else
self.stat_sv_airstrafeaccel_qw = 0;
- self.stat_sv_airspeedlimit_nonqw = sv_airspeedlimit_nonqw * autocvar_g_movement_highspeed;
+ self.stat_sv_airspeedlimit_nonqw = sv_airspeedlimit_nonqw * maxspd_mod;
+ self.stat_sv_maxspeed = sv_maxspeed * maxspd_mod; // also slow walking
if(self.PlayerPhysplug)
if(self.PlayerPhysplug())
maxspd_mod = 1;
- if(g_runematch)
- {
- if(self.runes & RUNE_SPEED)
- {
- if(self.runes & CURSE_SLOW)
- maxspd_mod = maxspd_mod * cvar("g_balance_rune_speed_combo_moverate");
- else
- maxspd_mod = maxspd_mod * cvar("g_balance_rune_speed_moverate");
- }
- else if(self.runes & CURSE_SLOW)
- {
- maxspd_mod = maxspd_mod * cvar("g_balance_curse_slow_moverate");
- }
- }
-
- if(g_minstagib && (self.items & IT_INVINCIBLE))
- {
- maxspd_mod = cvar("g_minstagib_speed_moverate");
- }
-
- if(g_nexball && self.ballcarried)
- {
- maxspd_mod = cvar("g_nexball_basketball_carrier_speed");
- }
-
swampspd_mod = 1;
if(self.in_swamp) {
swampspd_mod = self.swamp_slowdown; //cvar("g_balance_swamp_moverate");
maxspd_mod = self.spectatorspeed;
}
- spd = max(sv_maxspeed, sv_maxairspeed) * maxspd_mod * swampspd_mod;
+ spd = max(self.stat_sv_maxspeed, sv_maxairspeed) * maxspd_mod * swampspd_mod;
if(self.speed != spd)
{
self.speed = spd;
// acceleration
wishdir = normalize(wishvel);
wishspeed = vlen(wishvel);
- if (wishspeed > sv_maxspeed*maxspd_mod)
- wishspeed = sv_maxspeed*maxspd_mod;
+ if (wishspeed > self.stat_sv_maxspeed*maxspd_mod)
+ wishspeed = self.stat_sv_maxspeed*maxspd_mod;
if (time >= self.teleport_time)
PM_Accelerate(wishdir, wishspeed, wishspeed, sv_accelerate*maxspd_mod, 1, 0, 0);
}
wishdir = normalize(wishvel);
wishspeed = vlen(wishvel);
- if (wishspeed > sv_maxspeed*maxspd_mod)
- wishspeed = sv_maxspeed*maxspd_mod;
+ if (wishspeed > self.stat_sv_maxspeed*maxspd_mod)
+ wishspeed = self.stat_sv_maxspeed*maxspd_mod;
wishspeed = wishspeed * 0.7;
// water friction
// acceleration
wishdir = normalize(wishvel);
wishspeed = vlen(wishvel);
- if (wishspeed > sv_maxspeed*maxspd_mod)
- wishspeed = sv_maxspeed*maxspd_mod;
+ if (wishspeed > self.stat_sv_maxspeed*maxspd_mod)
+ wishspeed = self.stat_sv_maxspeed*maxspd_mod;
if (time >= self.teleport_time)
{
// water acceleration
// acceleration
wishdir = normalize(wishvel);
wishspeed = vlen(wishvel);
- if (wishspeed > sv_maxspeed*maxspd_mod)
- wishspeed = sv_maxspeed*maxspd_mod;
+ if (wishspeed > self.stat_sv_maxspeed*maxspd_mod)
+ wishspeed = self.stat_sv_maxspeed*maxspd_mod;
if (self.crouch)
wishspeed = wishspeed * 0.5;
if (time >= self.teleport_time)
// acceleration
wishdir = normalize(wishvel);
wishspeed = wishspeed0 = vlen(wishvel);
- if (wishspeed0 > sv_maxspeed*maxspd_mod)
- wishspeed0 = sv_maxspeed*maxspd_mod;
+ if (wishspeed0 > self.stat_sv_maxspeed*maxspd_mod)
+ wishspeed0 = self.stat_sv_maxspeed*maxspd_mod;
if (wishspeed > maxairspd)
wishspeed = maxairspd;
if (self.crouch)
rr = RACE_RECORD;
race_send_speedaward(MSG_ALL);
speedaward_lastsent = speedaward_speed;
- if (speedaward_speed > speedaward_alltimebest) {
+ if (speedaward_speed > speedaward_alltimebest && speedaward_uid != "") {
speedaward_alltimebest = speedaward_speed;
speedaward_alltimebest_holder = speedaward_holder;
speedaward_alltimebest_uid = speedaward_uid;
float defer_ClientKill_Now_TeamChange;
defer_ClientKill_Now_TeamChange = FALSE;
+ if(self.alivetime)
+ {
+ PlayerStats_Event(self, PLAYERSTATS_ALIVETIME, time - self.alivetime);
+ self.alivetime = 0;
+ }
+
if(valid_damage_for_weaponstats)
WeaponStats_LogKill(DEATH_WEAPONOF(deathtype), self.weapon);
// make sure you call makevectors first (FIXME?)
.float prevstrengthsound;
.float prevstrengthsoundattempt;
-void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector mi, vector ma, float antilag, float recoil, string snd, float maxdamage, float range)
+void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector mi, vector ma, float antilag, float recoil, string snd, float chan, float maxdamage, float range)
{
float nudge = 1; // added to traceline target and subtracted from result
local float oldsolid;
v_up = vu;
// track max damage
- if not(inWarmupStage) {
- entity w;
- w = get_weaponinfo(ent.weapon);
- if(w.spawnflags & WEP_TYPE_SPLASH) { // splash damage
- ent.stats_fired[ent.weapon - 1] += maxdamage;
- ent.stat_fired = ent.weapon + 64 * floor(ent.stats_fired[ent.weapon - 1]);
- }
- }
+ if(accuracy_canbegooddamage(ent))
+ accuracy_add(ent, ent.weapon, maxdamage, 0);
W_HitPlotAnalysis(ent, v_forward, v_right, v_up);
ent.punchangle_x = recoil * -1;
if (snd != "")
- {
- sound (ent, CHAN_WEAPON, snd, VOL_BASE, ATTN_NORM);
- }
+ sound (ent, chan, snd, VOL_BASE, ATTN_NORM);
if(ent.items & IT_STRENGTH)
if(!g_minstagib)
w_shotend = w_shotend + normalize(w_shotend - w_shotorg) * nudge;
};
-#define W_SetupShot_Dir_ProjectileSize(ent,s_forward,mi,ma,antilag,recoil,snd,maxdamage) W_SetupShot_Dir_ProjectileSize_Range(ent, s_forward, mi, ma, antilag, recoil, snd, maxdamage, MAX_SHOT_DISTANCE)
-#define W_SetupShot_ProjectileSize(ent,mi,ma,antilag,recoil,snd,maxdamage) W_SetupShot_Dir_ProjectileSize(ent, v_forward, mi, ma, antilag, recoil, snd, maxdamage)
-#define W_SetupShot_Dir(ent,s_forward,antilag,recoil,snd,maxdamage) W_SetupShot_Dir_ProjectileSize(ent, s_forward, '0 0 0', '0 0 0', antilag, recoil, snd, maxdamage)
-#define W_SetupShot(ent,antilag,recoil,snd,maxdamage) W_SetupShot_ProjectileSize(ent, '0 0 0', '0 0 0', antilag, recoil, snd, maxdamage)
-#define W_SetupShot_Range(ent,antilag,recoil,snd,maxdamage,range) W_SetupShot_Dir_ProjectileSize_Range(ent, v_forward, '0 0 0', '0 0 0', antilag, recoil, snd, maxdamage, range)
+#define W_SetupShot_Dir_ProjectileSize(ent,s_forward,mi,ma,antilag,recoil,snd,chan,maxdamage) W_SetupShot_Dir_ProjectileSize_Range(ent, s_forward, mi, ma, antilag, recoil, snd, chan, maxdamage, MAX_SHOT_DISTANCE)
+#define W_SetupShot_ProjectileSize(ent,mi,ma,antilag,recoil,snd,chan,maxdamage) W_SetupShot_Dir_ProjectileSize(ent, v_forward, mi, ma, antilag, recoil, snd, chan, maxdamage)
+#define W_SetupShot_Dir(ent,s_forward,antilag,recoil,snd,chan,maxdamage) W_SetupShot_Dir_ProjectileSize(ent, s_forward, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage)
+#define W_SetupShot(ent,antilag,recoil,snd,chan,maxdamage) W_SetupShot_ProjectileSize(ent, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage)
+#define W_SetupShot_Range(ent,antilag,recoil,snd,chan,maxdamage,range) W_SetupShot_Dir_ProjectileSize_Range(ent, v_forward, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage, range)
float CL_Weaponentity_CustomizeEntityForClient()
{
if(ww)
W_SwitchWeapon_Force(pl, ww);
}
+.float prevdryfire;
float weapon_prepareattack_checkammo(float secondary)
{
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.owner == self)
return FALSE;
- if(self.weapon == self.switchweapon) // only play once BEFORE starting to switch weapons
+ if(self.weapon == self.switchweapon && time - self.prevdryfire > 1) // only play once BEFORE starting to switch weapons
+ {
sound (self, CHAN_AUTO, "weapons/dryfire.wav", VOL_BASE, ATTN_NORM);
+ self.prevdryfire = time;
+ }
W_SwitchToOtherWeapon(self);
return FALSE;
// VorteX: haste can be added here
};
-vector W_CalculateProjectileVelocity(vector pvelocity, vector mvelocity)
+vector W_CalculateProjectileVelocity(vector pvelocity, vector mvelocity, float forceAbsolute)
{
vector mdirection;
float mspeed;
mspeed = vlen(mvelocity);
nstyle = cvar("g_projectiles_newton_style");
- if(nstyle == 0)
+ if(nstyle == 0 || forceAbsolute)
{
// absolute velocity
outvelocity = mvelocity;
float mspercallsstyle;
float mspercallcount;
#endif
-void W_SetupProjectileVelocityEx(entity missile, vector dir, vector upDir, float pSpeed, float pUpSpeed, float pZSpeed, float spread)
+void W_SetupProjectileVelocityEx(entity missile, vector dir, vector upDir, float pSpeed, float pUpSpeed, float pZSpeed, float spread, float forceAbsolute)
{
if(missile.owner == world)
error("Unowned missile");
print("avg: ", ftos(mspercallcount / mspercallsum), " per sec\n");
#endif
- missile.velocity = W_CalculateProjectileVelocity(missile.owner.velocity, pSpeed * dir);
+ missile.velocity = W_CalculateProjectileVelocity(missile.owner.velocity, pSpeed * dir, forceAbsolute);
}
void W_SetupProjectileVelocity(entity missile, float pSpeed, float spread)
{
- W_SetupProjectileVelocityEx(missile, w_shotdir, v_up, pSpeed, 0, 0, spread);
+ W_SetupProjectileVelocityEx(missile, w_shotdir, v_up, pSpeed, 0, 0, spread, FALSE);
}
-#define W_SETUPPROJECTILEVELOCITY_UP(m,s) W_SetupProjectileVelocityEx(m, w_shotdir, v_up, cvar(#s "_speed"), cvar(#s "_speed_up"), cvar(#s "_speed_z"), cvar(#s "_spread"))
-#define W_SETUPPROJECTILEVELOCITY(m,s) W_SetupProjectileVelocityEx(m, w_shotdir, v_up, cvar(#s "_speed"), 0, 0, cvar(#s "_spread"))
+#define W_SETUPPROJECTILEVELOCITY_UP(m,s) W_SetupProjectileVelocityEx(m, w_shotdir, v_up, cvar(#s "_speed"), cvar(#s "_speed_up"), cvar(#s "_speed_z"), cvar(#s "_spread"), FALSE)
+#define W_SETUPPROJECTILEVELOCITY(m,s) W_SetupProjectileVelocityEx(m, w_shotdir, v_up, cvar(#s "_speed"), 0, 0, cvar(#s "_spread"), FALSE)
self.caplayer = 1;
PlayerScore_Clear(self);
bprint ("^4", self.netname, "^4 is playing now\n");
- self.stat_count = WEP_LAST;
PutClientInServer();
if(cvar("g_campaign"))
campaign_bots_may_start = 1;
self.items &~= IT_BLUE_FLAG_LOST;
self.items &~= IT_CTF_SHIELDED;
- if (g_ctf) {
- local entity flag;
- float redflags, blueflags;
+ local entity flag;
+ float redflags, blueflags;
- if(self.ctf_captureshielded)
- self.items |= IT_CTF_SHIELDED;
+ if(self.ctf_captureshielded)
+ self.items |= IT_CTF_SHIELDED;
- redflags = 0;
- blueflags = 0;
+ redflags = 0;
+ blueflags = 0;
- for (flag = ctf_worldflaglist; flag; flag = flag.ctf_worldflagnext) if(flag.cnt != FLAG_BASE)
- {
- if(flag.items & IT_KEY2) // blue
- ++redflags;
- else if(flag.items & IT_KEY1) // red
- ++blueflags;
- }
+ for (flag = ctf_worldflaglist; flag; flag = flag.ctf_worldflagnext) if(flag.cnt != FLAG_BASE)
+ {
+ if(flag.items & IT_KEY2) // blue
+ ++redflags;
+ else if(flag.items & IT_KEY1) // red
+ ++blueflags;
+ }
- // blinking magic: if there is more than one flag, show one of these in a clever way
- if(redflags)
- redflags = mod(floor(time * redflags * 0.75), redflags);
- if(blueflags)
- blueflags = mod(floor(time * blueflags * 0.75), blueflags);
+ // blinking magic: if there is more than one flag, show one of these in a clever way
+ if(redflags)
+ redflags = mod(floor(time * redflags * 0.75), redflags);
+ if(blueflags)
+ blueflags = mod(floor(time * blueflags * 0.75), blueflags);
- for (flag = ctf_worldflaglist; flag; flag = flag.ctf_worldflagnext) if(flag.cnt != FLAG_BASE)
+ for (flag = ctf_worldflaglist; flag; flag = flag.ctf_worldflagnext) if(flag.cnt != FLAG_BASE)
+ {
+ if(flag.items & IT_KEY2) // blue
{
- if(flag.items & IT_KEY2) // blue
- {
- if(--redflags == -1) // happens exactly once (redflags is in 0..count-1, and will --'ed count times)
- ctf_setstatus2(flag, IT_RED_FLAG_TAKEN);
- }
- else if(flag.items & IT_KEY1) // red
- {
- if(--blueflags == -1) // happens exactly once
- ctf_setstatus2(flag, IT_BLUE_FLAG_TAKEN);
- }
+ if(--redflags == -1) // happens exactly once (redflags is in 0..count-1, and will --'ed count times)
+ ctf_setstatus2(flag, IT_RED_FLAG_TAKEN);
+ }
+ else if(flag.items & IT_KEY1) // red
+ {
+ if(--blueflags == -1) // happens exactly once
+ ctf_setstatus2(flag, IT_BLUE_FLAG_TAKEN);
}
}
};
void checkSpectatorBlock();
.float winning;
-.float jointime;
+.float jointime; // time of joining
+.float alivetime; // time of being alive
float isJoinAllowed();
#define PREVENT_JOIN_TEXT "^1You may not join the game at this time.\n\nThe player limit reached maximum capacity."
.float stat_sv_airaccel_qw;
.float stat_sv_airstrafeaccel_qw;
.float stat_sv_airspeedlimit_nonqw;
+.float stat_sv_maxspeed;
void W_Porto_Remove (entity p);
.float hitplotfh;
.string noise4;
-.float stat_hit;
-.float stat_fired;
-.float stat_count;
-
-.float stats_hit[WEP_MAXCOUNT]; // for hitscan bullets hit
-.float stats_fired[WEP_MAXCOUNT]; // for hitscan bullets fired
-
.float last_pickup;
-FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(stats_hit);
-FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(stats_fired);
-
.float stat_leadlimit;
float radar_showennemies;
.float nex_charge;
.float nex_charge_rottime;
+.float nex_charge_pool_ammo;
float allowed_to_spawn; // boolean variable used by the clan arena code to determine if a player can spawn (after the round has ended)
//description:
//global skybox for the map, can not be changed by QC
+//DP_UTF8
+//idea: Blub\0, divVerent
+//darkplaces implementation: Blub\0
+//cvar definitions:
+// utf8_enable: enable utf8 encoding
+//description: utf8 characters are allowed inside cvars, protocol strings, files, progs strings, etc.,
+//and count as 1 char for string functions like strlen, substring, etc.
+// note: utf8_enable is run-time cvar, could be changed during execution
+// note: beware that str2chr() could return value bigger than 255 once utf8 is enabled
+
//DP_HALFLIFE_MAP
//idea: LordHavoc
//darkplaces implementation: LordHavoc
// string autocvar__cl_name;
//NOTE: copying a string-typed autocvar to another variable/field, and then
//changing the cvar or returning from progs is UNDEFINED. Writing to autocvar
-//globals is UNDEFINED. Accessing autocvar globals after cvar_set()ing that
+//globals is UNDEFINED. Accessing autocvar globals after cvar_set()ing that
//cvar is IMPLEMENTATION DEFINED (an implementation may either yield the
-//previous, or the current, value). Writing to an autocvar global is NOT
-//ALLOWED.
+//previous, or the current, value). Whether autocvar globals, after restoring
+//a savegame, have the cvar's current value, or the original value at time of
+//saving, is UNDEFINED. Restoring a savegame however must not restore the
+//cvar values themselves.
//In case the cvar does NOT exist, then it is automatically created with the
//value of the autocvar initializer, if given. This is possible with e.g.
//frikqcc and fteqcc the following way:
//function to query triangles of a surface
//DP_QC_GETTAGINFO
-//idea: VorteX, LordHavoc (somebody else?)
+//idea: VorteX, LordHavoc
//DarkPlaces implementation: VorteX
//builtin definitions:
float(entity ent, string tagname) gettagindex = #451;
float GETTIME_CDTRACK = 4;
//description:
//returns the playing time of the current cdtrack when passed to gettime()
+//see DP_END_GETSOUNDTIME for similar functionality but for entity sound channels
//DP_QC_LOG
//darkplaces implementation: divVerent
// optional: .<precision>, .*, or .*<argpos>$ for the precision
// length modifiers: h for forcing a float, l for forcing an int/entity (by default, %d etc. cast a float to int)
// conversions:
-// di take a float if no length is specified or h is, and an int/entity if l is specified as length, and cast it to an int
+// d takes a float if no length is specified or h is, and an int/entity if l is specified as length, and cast it to an int
+// i takes an int/entity if no length is specified or i is, and a float if h is specified as length, and cast it to an int
// ouxXc take a float if no length is specified or h is, and an int/entity if l is specified as length, and cast it to an unsigned int
// eEfFgG take a float if no length is specified or h is, and an int/entity if l is specified as length, and cast it to a double
// s takes a string
//if 1 is returned by uri_get, the callback will be called in the future
float(string url, float id) uri_get = #513;
+//DP_QC_URI_POST
+//idea: divVerent
+//darkplaces implementation: divVerent
+//loads text from an URL into a string after POSTing via HTTP
+//works like uri_get, but uri_post sends data with Content-Type: content_type to the server
+//and uri_post sends the string buffer buf, joined using the delimiter delim
+float(string url, float id, string content_type, string data) uri_post = #513;
+float(string url, float id, string content_type, string delim, float buf) uri_postbuf = #513;
+
//DP_SKELETONOBJECTS
//idea: LordHavoc
//darkplaces implementation: LordHavoc
//description:
//the engine supports stereo WAV files. (useful with DP_SND_DIRECTIONLESSATTNNONE for music)
+//DP_SND_GETSOUNDTIME
+//idea: VorteX
+//darkplaces implementation: VorteX
+//constant definitions:
+float(entity e, float channel) getsoundtime = #533; // get currently sound playing position on entity channel, -1 if not playing or error
+float(string sample) soundlength = #534; // returns length of sound sample in seconds, -1 on error (sound not precached, sound system not initialized etc.)
+//description: provides opportunity to query length of sound samples and realtime tracking of sound playing on entities (similar to DP_GETTIME_CDTRACK)
+//note: beware dedicated server not running sound engine at all, so in dedicated mode this builtins will not work in server progs
+//note also: menu progs not supporting getsoundtime() (will give a warning) since it has no sound playing on entities
+//examples of use:
+// - QC-driven looped sounds
+// - QC events when sound playing is finished
+// - toggleable ambientsounds
+// - subtitles
+
+//DP_VIDEO_DPV
+//idea: LordHavoc
+//darkplaces implementation: LordHavoc
+//console commands:
+// playvideo <videoname> - start playing video
+// stopvideo - stops current video
+//description: indicated that engine support playing videos in DPV format
+
+//DP_VIDEO_SUBTITLES
+//idea: VorteX
+//darkplaces implementation: VorteX
+//cvars:
+// cl_video_subtitles - toggles subtitles showing
+// cl_video_subtitles_lines - how many lines to reserve for subtitles
+// cl_video_subtitles_textsize - font size
+//console commands:
+// playvideo <videoname> <custom_subtitles_file> - start playing video
+// stopvideo - stops current video
+//description: indicates that engine support subtitles on videos
+//subtitles stored in external text files, each video file has it's default subtitles file ( <videoname>.dpsubs )
+//example: for video/act1.dpv default subtitles file will be video/act1.dpsubs
+//also video could be played with custom subtitles file by utilizing second parm of playvideo command
+//syntax of .dpsubs files: each line in .dpsubs file defines 1 subtitle, there are three tokens:
+// <start> <end> "string"
+// start: subtitle start time in seconds
+// end: subtitle time-to-show in seconds, if 0 - subtitle will be showed until next subtitle is started,
+// if below 0 - show until next subtitles minus this number of seconds
+// text: subtitle text, color codes (Q3-style and ^xRGB) are allowed
+//example of subtitle file:
+// 3 0 "Vengeance! Vengeance for my eternity of suffering!"
+// 9 0 "Whelp! As if you knew what eternity was!"
+// 13 0 "Grovel before your true master."
+// 17 0 "Never!"
+// 18 7 "I'll hack you from crotch to gizzard and feed what's left of you to your brides..."
+
//DP_SOLIDCORPSE
//idea: LordHavoc
//darkplaces implementation: LordHavoc
//description:
//allows qc to customize MOVETYPE_BOUNCE a bit
+//DP_SV_CLIENTCAMERA
+//idea: LordHavoc, others
+//darkplaces implementation: Black
+//field definitions:
+.entity clientcamera; // override camera entity
+//description:
+//allows another entity to be the camera for a client, for example a remote camera, this is similar to sending svc_setview manually except that it also changes the network culling appropriately.
+
//DP_SV_CLIENTCOLORS
//idea: LordHavoc
//darkplaces implementation: LordHavoc
float Q3SURFACEFLAG_NOIMPACT = 16; // projectiles should remove themselves on impact (this is set on sky)
float Q3SURFACEFLAG_NOMARKS = 32; // projectiles should not leave marks, such as decals (this is set on sky)
float Q3SURFACEFLAG_FLESH = 64; // projectiles should do a fleshy effect (blood?) on impact
-//float Q3SURFACEFLAG_NODRAW = 128; // compiler hint (not important to qc)
+float Q3SURFACEFLAG_NODRAW = 128; // compiler hint (not important to qc)
//float Q3SURFACEFLAG_HINT = 256; // compiler hint (not important to qc)
//float Q3SURFACEFLAG_SKIP = 512; // compiler hint (not important to qc)
//float Q3SURFACEFLAG_NOLIGHTMAP = 1024; // compiler hint (not important to qc)
//float Q3SURFACEFLAG_POINTLIGHT = 2048; // compiler hint (not important to qc)
float Q3SURFACEFLAG_METALSTEPS = 4096; // walking on this surface should make metal step sounds
float Q3SURFACEFLAG_NOSTEPS = 8192; // walking on this surface should not make footstep sounds
-//float Q3SURFACEFLAG_NONSOLID = 16384; // compiler hint (not important to qc)
+float Q3SURFACEFLAG_NONSOLID = 16384; // compiler hint (not important to qc)
//float Q3SURFACEFLAG_LIGHTFILTER = 32768; // compiler hint (not important to qc)
//float Q3SURFACEFLAG_ALPHASHADOW = 65536; // compiler hint (not important to qc)
//float Q3SURFACEFLAG_NODLIGHT = 131072; // compiler hint (not important to qc)
.string crypto_encryptmethod; // the string "AES128" if encrypting, and string_null if plaintext
.string crypto_signmethod; // the string "HMAC-SHA256" if signing, and string_null if plaintext
// there is no field crypto_myidfp, as that info contains no additional information the QC may have a use for
+//builtin definitions: (SVQC)
+float(string url, float id, string content_type, string delim, float buf, float keyid) crypto_uri_postbuf = #513;
//description:
+//use -1 as buffer handle to justs end delim as postdata
{
// teamkill
PlayerScore_Add(attacker, SP_KILLS, -1); // or maybe add a teamkills field?
+ PlayerStats_Event(attacker, PLAYERSTATS_KILLS, -1);
}
}
else
{
// regular frag
PlayerScore_Add(attacker, SP_KILLS, 1);
+ PlayerStats_Event(attacker, PLAYERSTATS_KILLS, 1);
}
PlayerScore_Add(targ, SP_DEATHS, 1);
}
}
-void Damage_RecordDamage(entity attacker, float deathtype, float damage)
-{
- float weaponid;
- weaponid = DEATH_WEAPONOF(deathtype);
-
- if not(inWarmupStage)
- if (weaponid)
- if ((clienttype(attacker) == CLIENTTYPE_REAL) | (clienttype(attacker) == CLIENTTYPE_BOT)) {
- attacker.stats_hit[weaponid - 1] += damage;
- attacker.stat_hit = weaponid + 64 * floor(attacker.stats_hit[weaponid - 1]);
- }
-}
-
float RadiusDamage_running;
float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity ignore, float forceintensity, float deathtype, entity directhitentity)
// Returns total damage applies to creatures
float tfloorforce;
float stat_damagedone;
- float stat_maxdamage;
if(RadiusDamage_running)
{
}
stat_damagedone = 0;
- stat_maxdamage = 0;
targ = WarpZone_FindRadius (blastorigin, rad, FALSE);
while (targ)
{
total_damage_to_creatures += finaldmg;
- if(targ.flags & FL_CLIENT)
- if(targ.deadflag == DEAD_NO)
- if(targ != attacker)
- if(!teamplay || targ.team != attacker.team)
- {
+ if(accuracy_isgooddamage(attacker, targ))
stat_damagedone += finaldmg;
- stat_maxdamage += coredamage;
- }
}
if(targ == directhitentity || DEATH_ISSPECIAL(deathtype))
RadiusDamage_running = 0;
- Damage_RecordDamage(attacker, deathtype, min(stat_maxdamage, stat_damagedone));
+ if(!DEATH_ISSPECIAL(deathtype))
+ accuracy_add(attacker, DEATH_WEAPONOFWEAPONDEATH(deathtype), 0, min(coredamage, stat_damagedone));
return total_damage_to_creatures;
}
e.fire_hitsound = FALSE;
}
}
+ if(accuracy_isgooddamage(o, e))
+ accuracy_add(o, DEATH_WEAPONOFWEAPONDEATH(dt), 0, max(0, totaldamage - mindamage));
return max(0, totaldamage - mindamage); // can never be negative, but to make sure
}
else
e.fire_deathtype = dt;
e.fire_owner = o;
e.fire_hitsound = FALSE;
+ if(accuracy_isgooddamage(o, e))
+ accuracy_add(o, DEATH_WEAPONOFWEAPONDEATH(dt), 0, d);
return d;
}
}
}
e.fire_hitsound = TRUE;
- Damage_RecordDamage(e.fire_owner, e.fire_deathtype, d);
-
if not(IS_INDEPENDENT_PLAYER(e))
FOR_EACH_PLAYER(other) if(e != other)
{
missile.state = 0; // not latched onto anything
- W_SetupProjectileVelocityEx(missile, v_forward, v_up, cvar("g_balance_grapplehook_speed_fly"), 0, 0, 0);
+ W_SetupProjectileVelocityEx(missile, v_forward, v_up, cvar("g_balance_grapplehook_speed_fly"), 0, 0, 0, FALSE);
missile.angles = vectoangles (missile.velocity);
//missile.glow_color = 250; // 244, 250
BADCVAR("bgmvolume");
// private
+ BADCVAR("developer");
+ BADCVAR("g_banned_list");
+ BADCVAR("log_dest_udp");
+ BADCVAR("log_file");
+ BADCVAR("net_address");
+ BADCVAR("net_address_ipv6");
+ BADCVAR("port");
+ BADCVAR("savedgamecfg");
BADCVAR("serverconfig");
+ BADCVAR("sv_heartbeatperiod");
+ BADCVAR("sv_vote_master_password");
+ BADCVAR("sys_colortranslation");
+ BADCVAR("sys_specialcharactertranslation");
+ BADCVAR("timestamps");
+ BADPREFIX("developer_");
BADPREFIX("g_ban_");
BADPREFIX("g_chat_flood_");
BADPREFIX("g_voice_flood_");
BADPREFIX("sv_eventlog");
BADPREFIX("sv_logscores_");
BADPREFIX("sv_master");
- BADCVAR("g_banned_list");
- BADCVAR("log_dest_udp");
- BADCVAR("log_file");
- BADCVAR("net_address");
- BADCVAR("port");
- BADCVAR("savedgamecfg");
- BADCVAR("sv_heartbeatperiod");
- BADCVAR("sv_vote_master_password");
- BADCVAR("sys_colortranslation");
- BADCVAR("sys_specialcharactertranslation");
- BADCVAR("timestamps");
- BADCVAR("net_address");
- BADCVAR("net_address_ipv6");
BADPREFIX("sv_weaponstats_");
- BADCVAR("developer");
- BADPREFIX("developer_");
// these can contain player IDs, so better hide
BADCVAR("g_forced_team_red");
BADCVAR("sv_checkforpacketsduringsleep");
BADPREFIX("crypto_");
BADPREFIX("g_chat_");
+ BADPREFIX("net_");
BADPREFIX("prvm_");
BADPREFIX("sv_fragmessage_");
BADPREFIX("sv_vote_");
BADCVAR("sv_autoscreenshot");
BADCVAR("sv_curl_defaulturl");
BADCVAR("sv_defaultcharacter");
+ BADCVAR("sv_defaultplayercolors");
BADCVAR("sv_defaultplayermodel");
BADCVAR("sv_defaultplayerskin");
BADCVAR("sv_maxidle");
addstat(STAT_INVINCIBLE_FINISHED, AS_FLOAT, invincible_finished);
addstat(STAT_PRESSED_KEYS, AS_FLOAT, pressedkeys);
addstat(STAT_FUEL, AS_INT, ammo_fuel);
- addstat(STAT_DAMAGE_HITS, AS_INT, stat_hit);
- addstat(STAT_DAMAGE_FIRED, AS_INT, stat_fired);
addstat(STAT_SHOTORG, AS_INT, stat_shotorg);
addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit);
addstat(STAT_BULLETS_LOADED, AS_INT, campingrifle_bulletcounter);
addstat(STAT_LAST_PICKUP, AS_FLOAT, last_pickup);
addstat(STAT_NEX_CHARGE, AS_FLOAT, nex_charge);
+ addstat(STAT_NEX_CHARGEPOOL, AS_FLOAT, nex_charge_pool_ammo);
if(g_ca)
{
}
// g_movementspeed hack
addstat(STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW, AS_FLOAT, stat_sv_airspeedlimit_nonqw);
+ addstat(STAT_MOVEVARS_MAXSPEED, AS_FLOAT, stat_sv_maxspeed);
addstat(STAT_MOVEVARS_AIRACCEL_QW, AS_FLOAT, stat_sv_airaccel_qw);
addstat(STAT_MOVEVARS_AIRSTRAFEACCEL_QW, AS_FLOAT, stat_sv_airstrafeaccel_qw);
cvar_set("sv_curl_serverpackages", substring(s, 1, -1));
}
+ PlayerStats_Init();
+
world_initialized = 1;
}
void DumpStats(float final)
{
- local float file;
- local string s;
- local float to_console;
- local float to_eventlog;
- local float to_file;
- local float i;
+ float file;
+ string s;
+ float to_console;
+ float to_eventlog;
+ float to_file;
+ float i;
+ entity e;
to_console = cvar("sv_logscores_console");
to_eventlog = cvar("sv_eventlog");
fputs(file, ":end\n");
fclose(file);
}
+
+ // send statistics
+ FOR_EACH_CLIENT(e)
+ PlayerStats_AddGlobalInfo(e);
+ PlayerStats_Shutdown();
}
void FixIntermissionClient(entity e)
*/
void NextLevel()
{
- float i;
-
gameover = TRUE;
intermission_running = 1;
GameLogClose();
-// TO DO
-
-// save the stats to a text file on the client
-// stuffcmd(other, log_stats "stats/file_name");
-// bprint stats
-// stuffcmd(other, log_stats "");
-// use a filename similar to the demo name
- // string file_name;
- // file_name = strcat("\nlog_file \"stats/", strftime(TRUE, "%Y-%m-%d_%H-%M"), "_", mapname, ".txt\""); // open the log file
-
-// write a stats parser for the menu
-
- if(cvar("sv_accuracy_data_send")) {
- string stats_to_send;
-
- FOR_EACH_CLIENT(other) { // make the string to send
- FixIntermissionClient(other);
-
- if(other.cvar_cl_accuracy_data_share) {
- stats_to_send = strcat(stats_to_send, ":hits:", other.netname);
-
- for(i = WEP_FIRST; i <= WEP_LAST; ++i)
- stats_to_send = strcat(stats_to_send, ":", ftos(other.stats_hit[i-1]));
-
- stats_to_send = strcat(stats_to_send, "\n:fired:", other.netname);
-
- for(i = WEP_FIRST; i <= WEP_LAST; ++i)
- stats_to_send = strcat(stats_to_send, ":", ftos(other.stats_fired[i-1]));
-
- stats_to_send = strcat(stats_to_send, "\n");
- }
- }
-
- FOR_EACH_REALCLIENT(other) { // only spam humans
- Score_NicePrint(other); // print the score
-
- if(other.cvar_cl_accuracy_data_receive) // send the stats string to all the willing clients
- bprint(stats_to_send);
- }
- } else { // ye olde message
- FOR_EACH_PLAYER(other) {
- FixIntermissionClient(other);
-
- if(other.winning)
- bprint(other.netname, " ^7wins.\n");
- }
+ FOR_EACH_PLAYER(other) {
+ FixIntermissionClient(other);
+ if(other.winning)
+ bprint(other.netname, " ^7wins.\n");
}
if(cvar("g_campaign"))
if(mapvote_run)
return;
+ // wait for stats to be sent first
+ if(!playerstats_sent)
+ return;
+
MapInfo_Enumerate();
if(MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 1))
mapvote_run = TRUE;
void SV_Shutdown()
{
+ entity e;
+
if(gameover > 1) // shutting down already?
return;
world_initialized = 0;
print("Saving persistent data...\n");
Ban_SaveBans();
+
+ FOR_EACH_CLIENT(e)
+ PlayerStats_AddGlobalInfo(e);
+ PlayerStats_Shutdown();
+
if(!cheatcount_total)
{
if(cvar("sv_db_saveasdump"))
replacement = ftos(vlen(self.velocity - self.velocity_z * '0 0 1'));
else if (escape == "S")
replacement = ftos(vlen(self.velocity));
- else if (escape == "v") {
- float weapon_number;
- local entity stats;
-
- if(self.classname == "spectator")
- stats = self.enemy;
- else
- stats = self;
-
- weapon_number = stats.weapon;
-
- if (!weapon_number)
- weapon_number = stats.switchweapon;
-
- if (!weapon_number)
- weapon_number = stats.cnt;
-
- if(stats.cvar_cl_accuracy_data_share && stats.stats_fired[weapon_number - 1])
- replacement = ftos(bound(0, floor(100 * stats.stats_hit[weapon_number - 1] / stats.stats_fired[weapon_number - 1]), 100));
- else
- replacement = "~"; // or something to indicate NULL, not available
- }
msg = strcat(substring(msg, 0, p), replacement, substring(msg, p+2, strlen(msg) - (p+2)));
p = p + strlen(replacement);
}
#define PROJECTILE_TOUCH if(WarpZone_Projectile_Touch()) return
-float MAX_IPBAN_URIS = 16;
-
-float URI_GET_DISCARD = 0;
-float URI_GET_IPBAN = 1;
-float URI_GET_IPBAN_END = 16;
+float MAX_IPBAN_URIS = 16;
+
+float URI_GET_DISCARD = 0;
+float URI_GET_IPBAN = 1;
+float URI_GET_IPBAN_END = 16;
+float URI_GET_PLAYERSTATS_SENT = 17;
void URI_Get_Callback(float id, float status, string data)
{
// online ban list
OnlineBanList_URI_Get_Callback(id, status, data);
}
+ else if (id == URI_GET_PLAYERSTATS_SENT)
+ {
+ PlayerStats_Sent_URI_Get_Callback(id, status, data);
+ }
else
{
print("Received HTTP request data for an invalid id ", ftos(id), ".\n");
bprint(self.owner.netname, "^7 dropped the ", self.netname, "\n");
sound(self.owner, CHAN_AUTO, kh_sound_drop, VOL_BASE, ATTN_NORM);
makevectors(self.owner.v_angle);
- self.velocity = W_CalculateProjectileVelocity(self.owner.velocity, cvar("g_balance_keyhunt_throwvelocity") * v_forward);
+ self.velocity = W_CalculateProjectileVelocity(self.owner.velocity, cvar("g_balance_keyhunt_throwvelocity") * v_forward, FALSE);
kh_Key_AssignTo(self, world);
self.pushltime = time + cvar("g_balance_keyhunt_protecttime");
self.kh_dropperteam = self.team;
bprint(player.netname, "^7 died and lost the ", key.netname, "\n");
kh_Key_AssignTo(key, world);
makevectors('-1 0 0' * (45 + 45 * random()) + '0 360 0' * random());
- key.velocity = W_CalculateProjectileVelocity(player.velocity, cvar("g_balance_keyhunt_dropvelocity") * v_forward);
+ key.velocity = W_CalculateProjectileVelocity(player.velocity, cvar("g_balance_keyhunt_dropvelocity") * v_forward, FALSE);
key.pusher = mypusher;
key.pushltime = time + cvar("g_balance_keyhunt_protecttime");
if(suicide)
void nexball_setstatus (void)
{
local entity oldself;
- if (!g_nexball)
- return;
+ self.items &~= IT_KEY1;
if (self.ballcarried)
{
if (self.ballcarried.teamtime && (self.ballcarried.teamtime < time))
}
WaypointSprite_Kill(ball.owner.waypointsprite_attachedforcarrier);
- WaypointSprite_AttachCarrier("nb-ball", ball);
+ //WaypointSprite_AttachCarrier("nb-ball", ball);
+ WaypointSprite_Spawn("nb-ball", 0, 0, ball, '0 0 64', world, ball.team, ball, waypointsprite_attachedforcarrier, FALSE); // no health bar please
WaypointSprite_UpdateRule(ball.waypointsprite_attachedforcarrier, 0, SPRITERULE_DEFAULT);
WaypointSprite_UpdateTeamRadar(ball.waypointsprite_attachedforcarrier, RADARICON_FLAGCARRIER, BALL_SPRITECOLOR);
if (!(ball = self.ballcarried))
return;
- W_SetupShot (self, FALSE, 4, "nexball/shoot1.wav",0);
+ W_SetupShot (self, FALSE, 4, "nexball/shoot1.wav", CHAN_WEAPON, 0);
tracebox(w_shotorg, BALL_MINS, BALL_MAXS, w_shotorg, MOVE_WORLDONLY, world);
if(trace_startsolid)
{
mul = 2 - mul;
mul = mi + (ma - mi) * mul; // range from the minimal power to the maximal power
}
- DropBall (ball, w_shotorg, W_CalculateProjectileVelocity(self.velocity, w_shotdir * cvar("g_balance_nexball_primary_speed") * mul));
+ DropBall (ball, w_shotorg, W_CalculateProjectileVelocity(self.velocity, w_shotdir * cvar("g_balance_nexball_primary_speed") * mul, FALSE));
//TODO: use the speed_up cvar too ??
}
local entity missile;
if (!(balls & BALL_BASKET))
return;
- W_SetupShot (self, FALSE, 2, "nexball/shoot2.wav",0);
+ W_SetupShot (self, FALSE, 2, "nexball/shoot2.wav", CHAN_WEAPON, 0);
// pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
missile = spawn ();
--- /dev/null
+float playerstats_db;
+string playerstats_last;
+string events_last;
+.float playerstats_addedglobalinfo;
+float playerstats_requested;
+
+void PlayerStats_Init()
+{
+ string uri;
+ playerstats_sent = TRUE;
+ uri = cvar_string("g_playerstats_uri");
+ if(uri == "")
+ return;
+ playerstats_db = db_create();
+ if(playerstats_db >= 0)
+ playerstats_sent = FALSE; // must wait for it at match end
+
+ PlayerStats_AddEvent(PLAYERSTATS_ALIVETIME);
+ PlayerStats_AddEvent(PLAYERSTATS_KILLS);
+}
+
+void PlayerStats_AddPlayer(entity e)
+{
+ if(!e.crypto_idfp || playerstats_db < 0)
+ return;
+
+ string key;
+ key = sprintf("%s:*", e.crypto_idfp);
+
+ string p;
+ p = db_get(playerstats_db, key);
+ if(p == "")
+ {
+ if(playerstats_last)
+ {
+ db_put(playerstats_db, key, playerstats_last);
+ strunzone(playerstats_last);
+ }
+ else
+ db_put(playerstats_db, key, "#");
+ playerstats_last = strzone(e.crypto_idfp);
+ }
+}
+
+void PlayerStats_AddEvent(string event_id)
+{
+ if(playerstats_db < 0)
+ return;
+
+ string key;
+ key = sprintf("*:%s", event_id);
+
+ string p;
+ p = db_get(playerstats_db, key);
+ if(p == "")
+ {
+ if(events_last)
+ {
+ db_put(playerstats_db, key, events_last);
+ strunzone(events_last);
+ }
+ else
+ db_put(playerstats_db, key, "#");
+ events_last = strzone(event_id);
+ }
+}
+
+void PlayerStats_Event(entity e, string event_id, float value)
+{
+ if(!e.crypto_idfp || playerstats_db < 0)
+ return;
+
+ string key;
+ float val;
+ key = sprintf("%s:%s", e.crypto_idfp, event_id);
+ val = stof(db_get(playerstats_db, key));
+ val += value;
+ db_put(playerstats_db, key, ftos(val));
+}
+
+void PlayerStats_Sent_URI_Get_Callback(float id, float status, string data)
+{
+ if(playerstats_requested)
+ playerstats_sent = TRUE;
+}
+
+void PlayerStats_Shutdown()
+{
+ string p, pn;
+ string e, en;
+ string nn;
+ float b;
+ float i;
+ string uri;
+
+ if(playerstats_db < 0)
+ return;
+
+ uri = cvar_string("g_playerstats_uri");
+ if(uri != "")
+ {
+ b = buf_create();
+ i = 0;
+
+ db_dump(playerstats_db, "foo.db");
+
+ bufstr_set(b, i++, "V 1");
+ bufstr_set(b, i++, sprintf("T %s.%06d", strftime(FALSE, "%s"), floor(random() * 1000000)));
+ bufstr_set(b, i++, sprintf("G %s", GetGametype()));
+ bufstr_set(b, i++, sprintf("M %s", GetMapname()));
+ for(p = playerstats_last; (pn = db_get(playerstats_db, sprintf("%s:*", p))) != ""; p = pn)
+ {
+ bufstr_set(b, i++, sprintf("P %s", p));
+ nn = db_get(playerstats_db, sprintf("%s:_netname", p));
+ if(nn != "")
+ bufstr_set(b, i++, sprintf("n %s", nn));
+ for(e = events_last; (en = db_get(playerstats_db, sprintf("*:%s", e))) != ""; e = en)
+ {
+ float v;
+ v = stof(db_get(playerstats_db, sprintf("%s:%s", p, e)));
+ bufstr_set(b, i++, sprintf("e %s %f", e, v));
+ }
+ }
+ bufstr_set(b, i++, "");
+
+ if(crypto_uri_postbuf(uri, URI_GET_PLAYERSTATS_SENT, "text/plain", "\n", b, 0))
+ playerstats_requested = TRUE;
+ else
+ playerstats_sent = TRUE; // if posting fails, we must continue anyway
+
+ buf_del(b);
+ }
+ else
+ playerstats_sent = TRUE;
+
+ db_close(playerstats_db);
+ playerstats_db = -1;
+}
+
+void PlayerStats_AddGlobalInfo(entity p)
+{
+ if(playerstats_db < 0)
+ return;
+ if(!p.crypto_idfp || playerstats_db < 0)
+ return;
+ p.playerstats_addedglobalinfo = TRUE;
+
+ // add global info!
+ if(p.alivetime)
+ PlayerStats_Event(p, PLAYERSTATS_ALIVETIME, time - p.alivetime);
+
+ if(p.cvar_cl_allow_uid2name)
+ db_put(playerstats_db, sprintf("%s:_netname", p.crypto_idfp), p.netname);
+}
--- /dev/null
+// time the player was alive and kicking
+string PLAYERSTATS_ALIVETIME = "alivetime";
+string PLAYERSTATS_KILLS = "kills";
+
+// delay map switch until this is set
+float playerstats_sent;
+
+// call at initialization
+void PlayerStats_Init();
+
+// add a new player
+void PlayerStats_AddPlayer(entity e);
+
+// add a new event
+void PlayerStats_AddEvent(string event_id);
+
+// call on each event to track, or at player disconnect OR match end for "global stuff"
+void PlayerStats_Event(entity e, string event_id, float value);
+
+// call at game over
+void PlayerStats_Shutdown(); // send stats to the server
+
+// URI GET callback
+void PlayerStats_Sent_URI_Get_Callback(float id, float status, string data);
+
+// call this whenever a player leaves
+void PlayerStats_AddGlobalInfo(entity p);
../common/mapinfo.qh
../common/util.qc
+accuracy.qh
csqcprojectile.qh
csqceffects.qc
anticheat.qh
cheats.qh
+playerstats.qh
portals.qh
monsters/ai.qc
monsters/m_monsters.qc
monsters/monster_zombie.qc
+accuracy.qc
csqcprojectile.qc
playerdemo.qc
anticheat.qc
cheats.qc
+playerstats.qc
mutators/base.qc
mutators/gamemode_keyhunt.qc
// if we didn't hit a return yet, we have a new record!
+ // if the player does not have a UID we can unfortunately not store the record, as the rankings system relies on UIDs
+ if(myuid == "")
+ {
+ bprint(mynetname, "^1 scored a new record with ^7", TIME_ENCODED_TOSTRING(t), "^1, but lacks a UID, so the record will unfortunately be lost.\n");
+ return;
+ }
+
oldrec = race_readTime(GetMapname(), newpos);
oldrec_holder = race_readName(GetMapname(), newpos);
}
if (self.dmgtime < time)
{
- self.dmgtime = time + 0.1;
+ self.dmgtime = time + 0.2;
if (self.watertype == CONTENT_LAVA)
{
if (self.watersound_finished < time)
sv_airspeedlimit_nonqw = cvar("sv_airspeedlimit_nonqw");
teamplay = cvar ("teamplay");
sys_frametime = cvar("sys_ticrate") * cvar("slowmo");
+ if(sys_frametime <= 0)
+ sys_frametime = 1.0 / 60.0; // somewhat safe fallback
sv_doublejump = cvar("sv_doublejump");
if (timeoutStatus == 1) // just before the timeout (when timeoutStatus will be 2)
if (player.ammo_fuel < g_pickup_fuel_max)
{
pickedup = TRUE;
- player.ammo_fuel = min(player.ammo_fuel + item.ammo_fuel, g_pickup_fuel_max);
+ player.ammo_fuel = bound(player.ammo_fuel, g_pickup_fuel_max, player.ammo_fuel + item.ammo_fuel);
player.pauserotfuel_finished = max(player.pauserotfuel_finished, time + cvar("g_balance_pause_fuel_rot"));
}
if((it = (item.items - (item.items & player.items)) & IT_PICKUPMASK))
if (item.weapons & WEPBIT_MINSTANEX)
W_GiveWeapon (player, WEP_MINSTANEX, item.netname);
if (item.ammo_cells)
- player.ammo_cells = min (player.ammo_cells + cvar("g_minstagib_ammo_drop"), 999);
+ player.ammo_cells = bound(player.ammo_cells, 999, player.ammo_cells + cvar("g_minstagib_ammo_drop"));
player.health = 100;
}
pickedup = TRUE;
// sound not available
// AnnounceTo(player, "_lives");
- player.armorvalue = min(player.armorvalue + cvar("g_minstagib_extralives"), 999);
+ player.armorvalue = bound(player.armorvalue, 999, player.armorvalue + cvar("g_minstagib_extralives"));
sprint(player, "^3You picked up some extra lives\n");
}
// AnnounceTo(player, "speed");
player.invincible_finished = max(player.invincible_finished, time) + cvar("g_balance_powerup_strength_time");
}
-
- if (item.ammo_fuel)
- if (player.ammo_fuel < g_pickup_fuel_max)
- {
- pickedup = TRUE;
- player.ammo_fuel = min(player.ammo_fuel + item.ammo_fuel, g_pickup_fuel_max);
- player.pauserotfuel_finished = max(player.pauserotfuel_finished, time + cvar("g_balance_pause_fuel_rot"));
- }
}
}
else
if ((player.ammo_shells < g_pickup_shells_max) || item.pickup_anyway)
{
pickedup = TRUE;
- player.ammo_shells = min (player.ammo_shells + item.ammo_shells, g_pickup_shells_max);
+ player.ammo_shells = bound(player.ammo_shells, g_pickup_shells_max, player.ammo_shells + item.ammo_shells);
}
if (item.ammo_nails)
if ((player.ammo_nails < g_pickup_nails_max) || item.pickup_anyway)
{
pickedup = TRUE;
- player.ammo_nails = min (player.ammo_nails + item.ammo_nails, g_pickup_nails_max);
+ player.ammo_nails = bound(player.ammo_nails, g_pickup_nails_max, player.ammo_nails + item.ammo_nails);
}
if (item.ammo_rockets)
if ((player.ammo_rockets < g_pickup_rockets_max) || item.pickup_anyway)
{
pickedup = TRUE;
- player.ammo_rockets = min (player.ammo_rockets + item.ammo_rockets, g_pickup_rockets_max);
+ player.ammo_rockets = bound(player.ammo_rockets, g_pickup_rockets_max, player.ammo_rockets + item.ammo_rockets);
}
if (item.ammo_cells)
if ((player.ammo_cells < g_pickup_cells_max) || item.pickup_anyway)
{
pickedup = TRUE;
- player.ammo_cells = min (player.ammo_cells + item.ammo_cells, g_pickup_cells_max);
+ player.ammo_cells = bound(player.ammo_cells, g_pickup_cells_max, player.ammo_cells + item.ammo_cells);
}
if (item.ammo_fuel)
if ((player.ammo_fuel < g_pickup_fuel_max) || item.pickup_anyway)
{
pickedup = TRUE;
- player.ammo_fuel = min(player.ammo_fuel + item.ammo_fuel, g_pickup_fuel_max);
+ player.ammo_fuel = bound(player.ammo_fuel, g_pickup_fuel_max, player.ammo_fuel + item.ammo_fuel);
player.pauserotfuel_finished = max(player.pauserotfuel_finished, time + cvar("g_balance_pause_fuel_rot"));
}
}
if ((player.health < item.max_health) || item.pickup_anyway)
{
pickedup = TRUE;
- player.health = min(player.health + item.health, item.max_health);
+ player.health = bound(player.health, item.max_health, player.health + item.health);
player.pauserothealth_finished = max(player.pauserothealth_finished, time + cvar("g_balance_pause_health_rot"));
}
if (item.armorvalue)
if ((player.armorvalue < item.max_armorvalue) || item.pickup_anyway)
{
pickedup = TRUE;
- player.armorvalue = min(player.armorvalue + item.armorvalue, item.max_armorvalue);
+ player.armorvalue = bound(player.armorvalue, item.max_armorvalue, player.armorvalue + item.armorvalue);
player.pauserotarmor_finished = max(player.pauserotarmor_finished, time + cvar("g_balance_pause_armor_rot"));
}
}
{
entity e;
+ // Respawn is called & first spawn to, to set team. need to make sure we do not move the initial spawn.
+ if(self.movetype != MOVETYPE_WALK)
+ return;
+
self.velocity = '0 0 0';
self.enemy = world;
vector vtmp;
entity e;
- setorigin(self,self.wkr_spawn.origin);
+ // Respawn is called & first spawn to, to set team. need to make sure we do not move the initial spawn.
+ if(self.movetype != MOVETYPE_WALK)
+ return;
+
+ setorigin(self, self.wkr_spawn.origin);
self.angles = self.wkr_spawn.angles;
vtmp = self.wkr_spawn.origin;
self.ammo_nails -= pAmmo;
if(deathtype & HITTYPE_SECONDARY)
- W_SetupShot (self, cvar("g_antilag_bullets") && pSpeed >= cvar("g_antilag_bullets"), 2, "weapons/campingrifle_fire2.wav", cvar("g_balance_campingrifle_secondary_damage"));
+ W_SetupShot (self, cvar("g_antilag_bullets") && pSpeed >= cvar("g_antilag_bullets"), 2, "weapons/campingrifle_fire2.wav", CHAN_WEAPON, cvar("g_balance_campingrifle_secondary_damage") + cvar("g_balance_campingrifle_secondary_headshotaddeddamage"));
else
- W_SetupShot (self, cvar("g_antilag_bullets") && pSpeed >= cvar("g_antilag_bullets"), 2, "weapons/campingrifle_fire.wav", cvar("g_balance_campingrifle_primary_damage"));
+ W_SetupShot (self, cvar("g_antilag_bullets") && pSpeed >= cvar("g_antilag_bullets"), 2, "weapons/campingrifle_fire.wav", CHAN_WEAPON, cvar("g_balance_campingrifle_primary_damage") + cvar("g_balance_campingrifle_primary_headshotaddeddamage"));
pointparticles(particleeffectnum("shotgun_muzzleflash"), w_shotorg, w_shotdir * 2000, 1);
local vector hitloc, force, endpoint, dir;
local entity ent, endent;
local float endq3surfaceflags;
+ float totaldmg;
float length;
vector beampos;
entity pseudoprojectile;
float f, ffs;
- float hit;
-
railgun_start = start;
railgun_end = end;
// go a little bit into the wall because we need to hit this wall later
end = end + dir;
+ totaldmg = 0;
+
// trace multiple times until we hit a wall, each obstacle will be made
// non-solid so we can hit the next, while doing this we spawn effects and
// note down which entities were hit so we can damage them later
// get the details we need to call the damage function
hitloc = ent.railgunhitloc;
- //for stats so that team hit will count as a miss
- if(ent.flags & FL_CLIENT)
- if(ent.deadflag == DEAD_NO)
- hit = 1;
-
- if(teams_matter)
- if(ent.team == self.team)
- hit = 0;
-
f = ExponentialFalloff(mindist, maxdist, halflifedist, ent.railgundistance);
ffs = ExponentialFalloff(mindist, maxdist, forcehalflifedist, ent.railgundistance);
+ if(accuracy_isgooddamage(self.owner, ent))
+ totaldmg += bdamage * f;
+
// apply the damage
if (ent.takedamage)
Damage (ent, self, self, bdamage * f, deathtype, hitloc, force * ffs);
}
// calculate hits and fired shots for hitscan
- if not(inWarmupStage)
- {
- self.stats_fired[self.weapon - 1] += 1;
- self.stat_fired = self.weapon + 64 * floor(self.stats_fired[self.weapon - 1]);
-
- if(hit) {
- self.stats_hit[self.weapon - 1] += 1;
- self.stat_hit = self.weapon + 64 * floor(self.stats_hit[self.weapon - 1]);
- }
- }
+ accuracy_add(self, self.weapon, 0, min(bdamage, totaldmg));
trace_endpos = endpoint;
trace_ent = endent;
.float dmg_edge;
.float dmg_force;
.float dmg_radius;
+.float dmg_total;
void W_BallisticBullet_Hit (void)
{
- float f;
+ float f, q, g;
f = pow(bound(0, vlen(self.velocity) / vlen(self.oldvelocity), 1), 2); // energy multiplier
+ q = 1 + self.dmg_edge / self.dmg;
if(other.solid == SOLID_BSP)
Damage_DamageInfo(self.origin, self.dmg * f, 0, 0, max(1, self.dmg_force) * normalize(self.velocity) * f, self.projectiledeathtype, self);
headshot = 0;
yoda = 0;
- damage_headshotbonus = self.dmg_edge;
+ damage_headshotbonus = self.dmg_edge * f;
railgun_start = self.origin - 2 * frametime * self.velocity;
railgun_end = self.origin + 2 * frametime * self.velocity;
-
+ g = accuracy_isgooddamage(self.owner, other);
Damage(other, self, self.owner, self.dmg * f, self.projectiledeathtype, self.origin, self.dmg_force * normalize(self.velocity) * f);
damage_headshotbonus = 0;
- if(self.dmg_edge != 0)
+ if(headshot)
+ f *= q;
+ if(DEATH_WEAPONOF(self.projectiledeathtype) == WEP_CAMPINGRIFLE)
{
if(headshot)
AnnounceTo(self.owner, "headshot");
}
// calculate hits for ballistic weapons
- if (other.flags & FL_CLIENT) // is the player a client
- if (other.deadflag == DEAD_NO) // is the victim a corpse
- if ((!(teamplay)) | (other.team != self.owner.team)) // not teamplay (ctf, kh, tdm etc) or the victim is in the same team
- if not(inWarmupStage) // not in warm up stage
+ if(g)
{
- self.owner.stats_hit[self.owner.weapon - 1] += 1;
- self.owner.stat_hit = self.owner.weapon + 64 * floor(self.owner.stats_hit[self.owner.weapon - 1]);
+ // do not exceed 100%
+ q = min(self.dmg * q, self.dmg_total + f * self.dmg) - self.dmg_total;
+ self.dmg_total += f * self.dmg;
+ accuracy_add(self.owner, self.owner.weapon, 0, q);
}
}
PROJECTILE_TOUCH;
W_BallisticBullet_Hit ();
+ // if we hit "weapclip", bail out
+ //
+ // rationale of this check:
+ //
+ // any shader that is solid, nodraw AND trans is meant to clip weapon
+ // shots and players, but has no other effect!
+ //
+ // if it is not trans, it is caulk and should not have this side effect
+ //
+ // matching shaders:
+ // common/weapclip (intended)
+ // common/noimpact (is supposed to eat projectiles, but is erased farther above)
+ if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NODRAW)
+ if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NONSOLID)
+ if not(trace_dphitcontents & DPCONTENTS_OPAQUE)
+ {
+ remove(self);
+ return;
+ }
+
density = other.ballistics_density;
if(density == 0)
density = 1;
{
float lag, dt, savetime, density;
entity pl, oldself;
+ float antilagging;
+
+ antilagging = (cvar("g_antilag_bullets") && (pSpeed >= cvar("g_antilag_bullets")));
entity proj;
proj = spawn();
proj.movetype = MOVETYPE_FLY;
proj.think = SUB_Remove;
proj.nextthink = time + lifetime; // min(pLifetime, vlen(world.maxs - world.mins) / pSpeed);
- W_SetupProjectileVelocityEx(proj, dir, v_up, pSpeed, 0, 0, spread);
+ W_SetupProjectileVelocityEx(proj, dir, v_up, pSpeed, 0, 0, spread, antilagging);
proj.angles = vectoangles(proj.velocity);
proj.dmg_radius = cvar("g_ballistics_materialconstant") / bulletconstant;
// so: bulletconstant = bullet mass / area of bullet circle
other = proj; MUTATOR_CALLHOOK(EditProjectile);
- if(cvar("g_antilag_bullets"))
- if(pSpeed >= cvar("g_antilag_bullets"))
+ if(antilagging)
{
float eff;
savetime = frametime;
frametime = 0.05;
- // update the accuracy stats - increase shots fired by 1
- if not(inWarmupStage)
- {
- oldself.stats_fired[oldself.weapon - 1] += 1;
- oldself.stat_fired = oldself.weapon + 64 * floor(oldself.stats_fired[oldself.weapon - 1]);
- }
-
for(;;)
{
// DP tracetoss is stupid and always traces in 0.05s
return;
}
- // update the accuracy stats
- if not(inWarmupStage)
- {
- self.stats_fired[self.weapon - 1] += 1;
- self.stat_fired = self.weapon + 64 * floor(self.stats_fired[self.weapon - 1]);
- }
-
if(tracereffects & EF_RED)
CSQCProjectile(proj, TRUE, PROJECTILE_BULLET_GLOWING_TRACER, TRUE);
else if(tracereffects & EF_BLUE)
.entity queuenext;
.entity queueprev;
+void W_Crylink_CheckLinks(entity e)
+{
+ float i;
+ entity p;
+
+ if(e == world)
+ error("W_Crylink_CheckLinks: entity is world");
+
+ p = e;
+ for(i = 0; i < 1000; ++i)
+ {
+ if(p.queuenext.queueprev != p || p.queueprev.queuenext != p)
+ error("W_Crylink_CheckLinks: queue is inconsistent");
+ p = p.queuenext;
+ if(p == e)
+ break;
+ }
+ if(i >= 1000)
+ error("W_Crylink_CheckLinks: infinite chain");
+}
+
void W_Crylink_Dequeue_Raw(entity own, entity prev, entity me, entity next)
{
if(me == own.crylink_lastgroup)
float avg_dist, n;
entity p;
+ // FIXME remove this debug code
+ W_Crylink_CheckLinks(e);
+
w_crylink_linkjoin_time = 0;
avg_origin = e.origin;
}
if(n >= 2)
{
-
-
if(e.projectiledeathtype & HITTYPE_SECONDARY)
{
if(cvar("g_balance_crylink_secondary_joinexplode"))
n = n / cvar("g_balance_crylink_secondary_shots");
RadiusDamage (e, e.realowner, cvar("g_balance_crylink_secondary_joinexplode_damage") * n,
cvar("g_balance_crylink_secondary_joinexplode_edgedamage") * n,
- cvar("g_balance_crylink_secondary_joinexplode_radius") * n, world,
+ cvar("g_balance_crylink_secondary_joinexplode_radius") * n, e.realowner,
cvar("g_balance_crylink_secondary_joinexplode_force") * n, e.projectiledeathtype, other);
+
+ pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
}
}
else
n = n / cvar("g_balance_crylink_primary_shots");
RadiusDamage (e, e.realowner, cvar("g_balance_crylink_primary_joinexplode_damage") * n,
cvar("g_balance_crylink_primary_joinexplode_edgedamage") * n,
- cvar("g_balance_crylink_primary_joinexplode_radius") * n, world,
+ cvar("g_balance_crylink_primary_joinexplode_radius") * n, e.realowner,
cvar("g_balance_crylink_primary_joinexplode_force") * n, e.projectiledeathtype, other);
+
+ pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
}
}
-
- // they seem to touch...
- // TODO make a specific particle effect for this
- pointparticles(particleeffectnum("crylink_linkjoin"), self.origin, '0 0 0', 1);
}
}
remove(self);
f *= a;
if (RadiusDamage (self, self.realowner, cvar("g_balance_crylink_primary_damage") * f, cvar("g_balance_crylink_primary_edgedamage") * f, cvar("g_balance_crylink_primary_radius"), world, cvar("g_balance_crylink_primary_force") * f, self.projectiledeathtype, other) && cvar("g_balance_crylink_primary_linkexplode"))
{
+ if(self == self.realowner.crylink_lastgroup)
+ self.realowner.crylink_lastgroup = world;
W_Crylink_LinkExplode(self.queuenext, self);
remove (self);
return;
f *= a;
if (RadiusDamage (self, self.realowner, cvar("g_balance_crylink_secondary_damage") * f, cvar("g_balance_crylink_secondary_edgedamage") * f, cvar("g_balance_crylink_secondary_radius"), world, cvar("g_balance_crylink_secondary_force") * f, self.projectiledeathtype, other) && cvar("g_balance_crylink_secondary_linkexplode"))
{
+ if(self == self.realowner.crylink_lastgroup)
+ self.realowner.crylink_lastgroup = world;
W_Crylink_LinkExplode(self.queuenext, self);
remove (self);
return;
local entity proj, prevproj, firstproj;
local vector s;
vector forward, right, up;
+ float maxdmg;
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
self.ammo_cells = self.ammo_cells - cvar("g_balance_crylink_primary_ammo");
- W_SetupShot (self, FALSE, 2, "weapons/crylink_fire.wav", (cvar("g_balance_crylink_primary_damage")*cvar("g_balance_crylink_primary_shots")));
+ maxdmg = cvar("g_balance_crylink_primary_damage")*cvar("g_balance_crylink_primary_shots");
+ maxdmg *= 1 + cvar("g_balance_crylink_primary_bouncedamagefactor") * cvar("g_balance_crylink_primary_bounces");
+ if(cvar("g_balance_crylink_primary_joinexplode"))
+ maxdmg += cvar("g_balance_crylink_primary_joinexplode_damage");
+
+ W_SetupShot (self, FALSE, 2, "weapons/crylink_fire.wav", CHAN_WEAPON, maxdmg);
forward = v_forward;
right = v_right;
up = v_up;
s_z = v_forward_y;
}
s = s * cvar("g_balance_crylink_primary_spread") * g_weaponspreadfactor;
- W_SetupProjectileVelocityEx(proj, w_shotdir + right * s_y + up * s_z, v_up, cvar("g_balance_crylink_primary_speed"), 0, 0, 0);
+ W_SetupProjectileVelocityEx(proj, w_shotdir + right * s_y + up * s_z, v_up, cvar("g_balance_crylink_primary_speed"), 0, 0, 0, FALSE);
proj.touch = W_Crylink_Touch;
proj.think = W_Crylink_Fadethink;
{
local float counter, shots;
local entity proj, prevproj, firstproj;
+ float maxdmg;
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
self.ammo_cells = self.ammo_cells - cvar("g_balance_crylink_secondary_ammo");
- W_SetupShot (self, FALSE, 2, "weapons/crylink_fire2.wav", (cvar("g_balance_crylink_secondary_damage")*cvar("g_balance_crylink_secondary_shots")));
+ maxdmg = cvar("g_balance_crylink_secondary_damage")*cvar("g_balance_crylink_secondary_shots");
+ maxdmg *= 1 + cvar("g_balance_crylink_secondary_bouncedamagefactor") * cvar("g_balance_crylink_secondary_bounces");
+ if(cvar("g_balance_crylink_secondary_joinexplode"))
+ maxdmg += cvar("g_balance_crylink_secondary_joinexplode_damage");
+
+ W_SetupShot (self, FALSE, 2, "weapons/crylink_fire2.wav", CHAN_WEAPON, maxdmg);
shots = cvar("g_balance_crylink_secondary_shots");
pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
setorigin (proj, w_shotorg);
setsize(proj, '0 0 0', '0 0 0');
- W_SetupProjectileVelocityEx(proj, (w_shotdir + (((counter + 0.5) / shots) * 2 - 1) * v_right * cvar("g_balance_crylink_secondary_spread") * g_weaponspreadfactor), v_up, cvar("g_balance_crylink_secondary_speed"), 0, 0, 0);
+ W_SetupProjectileVelocityEx(proj, (w_shotdir + (((counter + 0.5) / shots) * 2 - 1) * v_right * cvar("g_balance_crylink_secondary_spread") * g_weaponspreadfactor), v_up, cvar("g_balance_crylink_secondary_speed"), 0, 0, 0, FALSE);
proj.touch = W_Crylink_Touch2;
proj.think = W_Crylink_Fadethink;
if(counter == (shots - 1) / 2)
{
W_Crylink_Attack();
weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_crylink_primary_animtime"), w_ready);
- if(cvar("g_balance_crylink_primary_joinspeed") != 0 || cvar("g_balance_crylink_primary_jointime") != 0)
+ if(cvar("g_balance_crylink_primary_joinspread") != 0 || cvar("g_balance_crylink_primary_jointime") != 0)
self.crylink_waitrelease = 1;
}
}
{
W_Crylink_Attack2();
weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_crylink_secondary_animtime"), w_ready);
- if(cvar("g_balance_crylink_secondary_joinspeed") != 0 || cvar("g_balance_crylink_secondary_jointime") != 0)
+ if(cvar("g_balance_crylink_secondary_joinspread") != 0 || cvar("g_balance_crylink_secondary_jointime") != 0)
self.crylink_waitrelease = 2;
}
}
if(self.crylink_waitrelease == 1)
{
- pos = W_Crylink_LinkJoin(self.crylink_lastgroup, cvar("g_balance_crylink_primary_joinspeed"), cvar("g_balance_crylink_primary_jointime"));
+ pos = W_Crylink_LinkJoin(self.crylink_lastgroup, cvar("g_balance_crylink_primary_joinspread") * cvar("g_balance_crylink_primary_speed"), cvar("g_balance_crylink_primary_jointime"));
}
else
{
- pos = W_Crylink_LinkJoin(self.crylink_lastgroup, cvar("g_balance_crylink_secondary_joinspeed"), cvar("g_balance_crylink_secondary_jointime"));
+ pos = W_Crylink_LinkJoin(self.crylink_lastgroup, cvar("g_balance_crylink_secondary_joinspread") * cvar("g_balance_crylink_secondary_speed"), cvar("g_balance_crylink_secondary_jointime"));
}
linkjoineffect = spawn();
{
local entity proj;
- W_SetupShot_ProjectileSize (self, '0 0 -3', '0 0 -3', FALSE, 2, "weapons/electro_fire.wav", cvar("g_balance_electro_primary_damage"));
+ W_SetupShot_ProjectileSize (self, '0 0 -3', '0 0 -3', FALSE, 2, "weapons/electro_fire.wav", CHAN_WEAPON, cvar("g_balance_electro_primary_damage"));
pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
{
local entity proj;
- W_SetupShot_ProjectileSize (self, '0 0 -4', '0 0 -4', FALSE, 2, "weapons/electro_fire2.wav", cvar("g_balance_electro_secondary_damage"));
+ W_SetupShot_ProjectileSize (self, '0 0 -4', '0 0 -4', FALSE, 2, "weapons/electro_fire2.wav", CHAN_WEAPON, cvar("g_balance_electro_secondary_damage"));
+
w_shotdir = v_forward; // no TrueAim for grenades please
pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
proj.event_damage = W_Plasma_Damage;
proj.flags = FL_PROJECTILE;
- //proj.bouncefactor = cvar("g_balance_electro_secondary_bouncefactor");
- //proj.bouncestop = cvar("g_balance_electro_secondary_bouncestop");
+ proj.bouncefactor = cvar("g_balance_electro_secondary_bouncefactor");
+ proj.bouncestop = cvar("g_balance_electro_secondary_bouncestop");
#if 0
entity p2;
}
}
- W_SetupShot_Range(self.owner, TRUE, 0, "", cvar("g_balance_electro_primary_damage") * dt, cvar("g_balance_electro_primary_range"));
+ W_SetupShot_Range(self.owner, TRUE, 0, "", 0, cvar("g_balance_electro_primary_damage") * dt, cvar("g_balance_electro_primary_range"));
WarpZone_traceline_antilag(self.owner, w_shotorg, w_shotend, MOVE_NORMAL, self.owner, ANTILAG_LATENCY(self.owner));
// apply the damage
f = ExponentialFalloff(cvar("g_balance_electro_primary_falloff_mindist"), cvar("g_balance_electro_primary_falloff_maxdist"), cvar("g_balance_electro_primary_falloff_halflifedist"), vlen(WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos) - w_shotorg));
+ if(accuracy_isgooddamage(self.owner, trace_ent))
+ accuracy_add(self.owner, WEP_ELECTRO, 0, cvar("g_balance_electro_primary_damage") * dt * f);
Damage (trace_ent, self.owner, self.owner, cvar("g_balance_electro_primary_damage") * dt * f, WEP_ELECTRO, trace_endpos, force * dt);
- Damage_RecordDamage(self.owner, WEP_ELECTRO, cvar("g_balance_electro_primary_damage") * dt * f);
}
W_Plasma_TriggerCombo(trace_endpos, cvar("g_balance_electro_primary_comboradius"), self.owner);
{
// only play fire sound if 0.5 sec has passed since player let go the fire button
if(time - self.prevlgfire > 0.5)
- {
sound (self, CHAN_WEAPON, "weapons/lgbeam_fire.wav", VOL_BASE, ATTN_NORM);
- }
entity beam, oldself;
if(points <= 0)
continue;
dir = normalize(e.origin + e.view_ofs - self.origin);
+
+ if(accuracy_isgooddamage(self.realowner, e))
+ accuracy_add(self.realowner, WEP_FIREBALL, 0, cvar("g_balance_fireball_primary_bfgdamage") * points);
+
Damage(e, self, self.realowner, cvar("g_balance_fireball_primary_bfgdamage") * points, self.projectiledeathtype | HITTYPE_BOUNCE | HITTYPE_SPLASH, e.origin + e.view_ofs, cvar("g_balance_fireball_primary_bfgforce") * dir);
pointparticles(particleeffectnum("fireball_bfgdamage"), e.origin, -1 * dir, 1);
-
- Damage_RecordDamage(self.owner, self.projectiledeathtype, cvar("g_balance_fireball_primary_bfgdamage") * points);
}
}
{
local entity proj;
- W_SetupShot_ProjectileSize (self, '-16 -16 -16', '16 16 16', FALSE, 2, "weapons/fireball_fire2.wav", cvar("g_balance_fireball_primary_damage") + cvar("g_balance_fireball_primary_bfgdamage"));
+ W_SetupShot_ProjectileSize (self, '-16 -16 -16', '16 16 16', FALSE, 2, "weapons/fireball_fire2.wav", CHAN_WEAPON, cvar("g_balance_fireball_primary_damage") + cvar("g_balance_fireball_primary_bfgdamage"));
pointparticles(particleeffectnum("fireball_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
void W_Fireball_AttackEffect(float i, vector f_diff)
{
- W_SetupShot_ProjectileSize (self, '-16 -16 -16', '16 16 16', FALSE, 0, "", 0);
+ W_SetupShot_ProjectileSize (self, '-16 -16 -16', '16 16 16', FALSE, 0, "", 0, 0);
w_shotorg += f_diff_x * v_up + f_diff_y * v_right;
pointparticles(particleeffectnum("fireball_preattack_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
}
f_diff = '+1.25 +3.75 0';
break;
}
- W_SetupShot_ProjectileSize(self, '-4 -4 -4', '4 4 4', FALSE, 2, "weapons/fireball_fire.wav", cvar("g_balance_fireball_secondary_damage"));
+ W_SetupShot_ProjectileSize(self, '-4 -4 -4', '4 4 4', FALSE, 2, "weapons/fireball_fire.wav", CHAN_WEAPON, cvar("g_balance_fireball_secondary_damage"));
traceline(w_shotorg, w_shotorg + f_diff_x * v_up + f_diff_y * v_right, MOVE_NORMAL, self);
w_shotorg = trace_endpos;
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
self.ammo_rockets = self.ammo_rockets - cvar("g_balance_grenadelauncher_primary_ammo");
- W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", cvar("g_balance_grenadelauncher_primary_damage"));
+ W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", CHAN_WEAPON, cvar("g_balance_grenadelauncher_primary_damage"));
w_shotdir = v_forward; // no TrueAim for grenades please
pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
self.ammo_rockets = self.ammo_rockets - cvar("g_balance_grenadelauncher_secondary_ammo");
- W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", cvar("g_balance_grenadelauncher_secondary_damage"));
+ W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", CHAN_WEAPON, cvar("g_balance_grenadelauncher_secondary_damage"));
w_shotdir = v_forward; // no TrueAim for grenades please
pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
self.ammo_rockets = self.ammo_rockets - cvar("g_balance_hagar_primary_ammo");
- W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav", cvar("g_balance_hagar_primary_damage"));
+ W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav", CHAN_WEAPON, cvar("g_balance_hagar_primary_damage"));
pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
self.ammo_rockets = self.ammo_rockets - cvar("g_balance_hagar_secondary_ammo");
- W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav", cvar("g_balance_hagar_secondary_damage"));
- //W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav"); // TODO: move model a little to the right
+ W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav", CHAN_WEAPON, cvar("g_balance_hagar_secondary_damage"));
pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
if(self.crouch)
spread = spread * cvar("g_balance_hlac_primary_spread_crouchmod");
- W_SetupShot (self, FALSE, 3, "weapons/lasergun_fire.wav", cvar("g_balance_hlac_primary_damage"));
+ W_SetupShot (self, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON, cvar("g_balance_hlac_primary_damage"));
pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
if (!g_norecoil)
{
if(self.crouch)
spread = spread * cvar("g_balance_hlac_secondary_spread_crouchmod");
- W_SetupShot (self, FALSE, 3, "weapons/lasergun_fire.wav", cvar("g_balance_hlac_secondary_damage"));
+ W_SetupShot (self, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON, cvar("g_balance_hlac_secondary_damage"));
pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
missile = spawn ();
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
self.ammo_cells = self.ammo_cells - cvar("g_balance_hook_secondary_ammo");
- W_SetupShot (self, FALSE, 4, "weapons/hookbomb_fire.wav", cvar("g_balance_hook_secondary_damage"));
+ W_SetupShot (self, FALSE, 4, "weapons/hookbomb_fire.wav", CHAN_WEAPON, cvar("g_balance_hook_secondary_damage"));
gren = spawn ();
gren.owner = self;
s_forward = v_forward * cos(a * DEG2RAD) + v_up * sin(a * DEG2RAD);
if(nodamage)
- W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", 0);
+ W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON2, 0);
else if(issecondary == 1)
- W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", cvar("g_balance_laser_secondary_damage"));
+ W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON2, cvar("g_balance_laser_secondary_damage"));
else
- W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", cvar("g_balance_laser_primary_damage"));
+ W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON2, cvar("g_balance_laser_primary_damage"));
pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
missile = spawn ();
float dt;
dt = frametime;
- W_SetupShot_Range(self.owner, TRUE, 0, "", damage * dt, myradius);
+ W_SetupShot_Range(self.owner, TRUE, 0, "", 0, damage * dt, myradius);
WarpZone_traceline_antilag(self.owner, w_shotorg, w_shotend, MOVE_NORMAL, self.owner, ANTILAG_LATENCY(self.owner));
// apply the damage
{
vector force;
force = w_shotdir * myforce;
+ if(accuracy_isgooddamage(self.owner, trace_ent))
+ accuracy_add(self.owner, WEP_LASER, 0, damage * dt);
Damage (trace_ent, self.owner, self.owner, damage * dt, WEP_LASER | HITTYPE_SECONDARY, trace_endpos, force * dt);
- Damage_RecordDamage(self.owner, WEP_LASER | HITTYPE_SECONDARY, damage * dt);
}
// draw effect
if (self.BUTTON_ATCK)
if (weapon_prepareattack(0, cvar("g_balance_laser_primary_refire")))
{
- W_Laser_Attack(1);
+ W_Laser_Attack(0);
weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_laser_primary_animtime"), w_ready);
}
if (self.BUTTON_ATCK2)
newmine.damageforcescale = self.damageforcescale;
newmine.health = self.health;
newmine.event_damage = self.event_damage;
+ newmine.spawnshieldtime = self.spawnshieldtime;
newmine.movetype = MOVETYPE_NONE; // lock the mine in place
newmine.projectiledeathtype = self.projectiledeathtype;
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
self.ammo_rockets = self.ammo_rockets - cvar("g_balance_minelayer_ammo");
- W_SetupShot_ProjectileSize (self, '-4 -4 -4', '4 4 4', FALSE, 5, "weapons/mine_fire.wav", cvar("g_balance_minelayer_damage"));
+ W_SetupShot_ProjectileSize (self, '-4 -4 -4', '4 4 4', FALSE, 5, "weapons/mine_fire.wav", CHAN_WEAPON, cvar("g_balance_minelayer_damage"));
pointparticles(particleeffectnum("rocketlauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
mine = WarpZone_RefSys_SpawnSameRefSys(self);
float flying;
flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last
- W_SetupShot (self, TRUE, 0, "weapons/minstanexfire.wav", 0);
+ W_SetupShot (self, TRUE, 0, "weapons/minstanexfire.wav", CHAN_WEAPON, 10000);
yoda = 0;
damage_goodhits = 0;
if(headshot)
{
AnnounceTo(self, "headshot");
- print("h\n");
}
if(damage_goodhits && self.minstanex_lasthit)
{
mydmg *= charge;
myforce *= charge;
- W_SetupShot (self, TRUE, 5, "weapons/nexfire.wav", mydmg);
+ W_SetupShot (self, TRUE, 5, "weapons/nexfire.wav", CHAN_WEAPON, mydmg);
yoda = 0;
FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_NEX);
void spawnfunc_weapon_nex (void); // defined in t_items.qc
+.float nex_charge_pool_pauseregen_finished;
float w_nex(float req)
{
float dt;
if(cvar("g_balance_nex_charge") && self.nex_charge < cvar("g_balance_nex_charge_limit"))
self.nex_charge = min(1, self.nex_charge + cvar("g_balance_nex_charge_rate") * frametime / W_TICSPERFRAME);
+ if(cvar("g_balance_nex_secondary_charge_pool"))
+ if(self.nex_charge_pool_ammo < 1)
+ {
+ if(self.nex_charge_pool_pauseregen_finished < time)
+ self.nex_charge_pool_ammo = min(1, self.nex_charge_pool_ammo + cvar("g_balance_nex_secondary_charge_pool_regen") * frametime / W_TICSPERFRAME);
+ self.pauseregen_finished = max(self.pauseregen_finished, time + cvar("g_balance_nex_secondary_charge_pool_pause_health_regen"));
+ }
+
if (self.BUTTON_ATCK)
{
if (weapon_prepareattack(0, cvar("g_balance_nex_primary_refire")))
{
self.nex_charge_rottime = time + cvar("g_balance_nex_charge_rot_pause");
dt = frametime / W_TICSPERFRAME;
- if(self.nex_charge < 1)
+
+ if(cvar("g_balance_nex_secondary_charge_pool"))
{
- dt = min(dt, (1 - self.nex_charge) / cvar("g_balance_nex_secondary_charge_rate"));
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ if(cvar("g_balance_nex_secondary_ammo"))
{
- if(cvar("g_balance_nex_secondary_ammo"))
+ // always deplete if secondary is held
+ self.nex_charge_pool_ammo = max(0, self.nex_charge_pool_ammo - cvar("g_balance_nex_secondary_ammo") * dt);
+
+ dt = min(dt, (1 - self.nex_charge) / cvar("g_balance_nex_secondary_charge_rate"));
+ self.nex_charge_pool_pauseregen_finished = time + cvar("g_balance_nex_secondary_charge_pool_pause_regen");
+ dt = min(dt, self.nex_charge_pool_ammo);
+ dt = max(0, dt);
+
+ self.nex_charge += dt * cvar("g_balance_nex_secondary_charge_rate");
+ }
+ }
+
+ else if(cvar("g_balance_nex_secondary_ammo"))
+ {
+ if(self.nex_charge < 1)
+ {
+ dt = min(dt, (1 - self.nex_charge) / cvar("g_balance_nex_secondary_charge_rate"));
+ if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
dt = min(dt, (self.ammo_cells - cvar("g_balance_nex_primary_ammo")) / cvar("g_balance_nex_secondary_ammo"));
dt = max(0, dt);
self.ammo_cells = max(cvar("g_balance_nex_secondary_ammo"), self.ammo_cells - cvar("g_balance_nex_secondary_ammo") * dt);
}
}
+ self.nex_charge += dt * cvar("g_balance_nex_secondary_charge_rate");
}
- self.nex_charge += dt * cvar("g_balance_nex_secondary_charge_rate");
}
}
else if(cvar("g_balance_nex_secondary"))
else if (req == WR_CHECKAMMO1)
return self.ammo_cells >= cvar("g_balance_nex_primary_ammo");
else if (req == WR_CHECKAMMO2)
- {
- if(cvar("g_balance_nex_secondary_charge"))
- return self.ammo_cells >= cvar("g_balance_nex_primary_ammo");
- return self.ammo_cells >= cvar("g_balance_nex_secondary_ammo");
- }
+ return self.ammo_cells >= cvar("g_balance_nex_primary_ammo"); // don't allow charging if we don't have enough ammo
return TRUE;
};
#endif
if not(self.items & IT_UNLIMITED_SUPERWEAPONS)
self.weapons = self.weapons - (self.weapons & WEPBIT_PORTO);
- W_SetupShot (self, FALSE, 4, "porto/fire.wav", 0);
+ W_SetupShot (self, FALSE, 4, "porto/fire.wav", CHAN_WEAPON, 0);
// always shoot from the eye
w_shotdir = v_forward;
w_shotorg = self.origin + self.view_ofs + ((w_shotorg - self.origin - self.view_ofs) * v_forward) * v_forward;
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
self.ammo_rockets = self.ammo_rockets - cvar("g_balance_rocketlauncher_ammo");
- W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 5, "weapons/rocket_fire.wav", cvar("g_balance_rocketlauncher_damage"));
+ W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 5, "weapons/rocket_fire.wav", CHAN_WEAPON, cvar("g_balance_rocketlauncher_damage"));
pointparticles(particleeffectnum("rocketlauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
missile = WarpZone_RefSys_SpawnSameRefSys(self);
self.ammo_rockets = self.ammo_rockets - cvar("g_balance_seeker_missile_ammo");
makevectors(self.v_angle);
- W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/seeker_fire.wav", cvar("g_balance_seeker_missile_damage"));
+ W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/seeker_fire.wav", CHAN_WEAPON, 0);
w_shotorg += f_diff;
pointparticles(particleeffectnum("seeker_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
self.ammo_rockets = self.ammo_rockets - cvar("g_balance_seeker_tag_ammo");
- W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/tag_fire.wav", 0);
+ W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/tag_fire.wav", CHAN_WEAPON, cvar("g_balance_seeker_missile_damage") * cvar("g_balance_seeker_missile_count"));
missile = spawn();
missile.owner = self;
f_diff = '+1.25 +3.75 0';
break;
}
- W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/flac_fire.wav", cvar("g_balance_seeker_flac_damage"));
+ W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/flac_fire.wav", CHAN_WEAPON, cvar("g_balance_seeker_flac_damage"));
w_shotorg += f_diff;
pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
bulletspeed = cvar("g_balance_shotgun_primary_speed");
bulletconstant = cvar("g_balance_shotgun_primary_bulletconstant");
- W_SetupShot (self, cvar("g_antilag_bullets") && bulletspeed >= cvar("g_antilag_bullets"), 5, "weapons/shotgun_fire.wav", cvar("g_balance_shotgun_primary_damage"));
+ W_SetupShot (self, cvar("g_antilag_bullets") && bulletspeed >= cvar("g_antilag_bullets"), 5, "weapons/shotgun_fire.wav", CHAN_WEAPON, d * bullets);
for (sc = 0;sc < bullets;sc = sc + 1)
fireBallisticBullet(w_shotorg, w_shotdir, spread, bulletspeed, 5, d, 0, f, WEP_SHOTGUN, 0, 1, bulletconstant);
endFireBallisticBullet();
{
vector force;
force = angle * cvar("g_balance_shotgun_secondary_force");
+ if(accuracy_isgooddamage(self.owner, trace_ent))
+ accuracy_add(self.owner, WEP_SHOTGUN, 0, cvar("g_balance_shotgun_secondary_damage") * min(1, f + 1));
Damage (trace_ent, self.owner, self.owner, cvar("g_balance_shotgun_secondary_damage") * min(1, f + 1), WEP_SHOTGUN | HITTYPE_SECONDARY , self.owner.origin + self.owner.view_ofs, force);
- Damage_RecordDamage(self.owner, WEP_SHOTGUN | HITTYPE_SECONDARY, cvar("g_balance_shotgun_secondary_damage") * min(1, f + 1));
remove(self);
}
else if(time >= self.cnt + cvar("g_balance_shotgun_secondary_melee_time")) // missed, remove ent
meleetemp.owner = self;
meleetemp.think = shotgun_meleethink;
meleetemp.nextthink = time + cvar("g_balance_shotgun_secondary_melee_delay");
- W_SetupShot_Range(self, TRUE, 0, "", cvar("g_balance_shotgun_secondary_damage"), cvar("g_balance_shotgun_secondary_melee_range"));
+ W_SetupShot_Range(self, TRUE, 0, "", 0, cvar("g_balance_shotgun_secondary_damage"), cvar("g_balance_shotgun_secondary_melee_range"));
}
void spawnfunc_weapon_shotgun(); // defined in t_items.qc
{
vector o;
float c, n;
- W_SetupShot(self, FALSE, 2, "", cvar("g_balance_tuba_damage"));
+ W_SetupShot(self, FALSE, 2, "", 0, cvar("g_balance_tuba_damage"));
if(self.tuba_notecount)
{
self.tuba_notecount = FALSE;
else
self.ammo_nails = self.ammo_nails - cvar("g_balance_uzi_sustained_ammo");
}
- W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", cvar("g_balance_uzi_first_damage"));
+ W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", CHAN_WEAPON, ((self.uzi_bulletcounter == 1) ? cvar("g_balance_uzi_first_damage") : cvar("g_balance_uzi_sustained_damage")));
if (!g_norecoil)
{
self.punchangle_x = random () - 0.5;
return;
}
- W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", cvar("g_balance_uzi_first_damage"));
+ W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", CHAN_WEAPON, cvar("g_balance_uzi_sustained_damage"));
if (!g_norecoil)
{
self.punchangle_x = random () - 0.5;
void uzi_mode1_fire_burst()
{
- W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", cvar("g_balance_uzi_first_damage"));
+ W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", CHAN_WEAPON, cvar("g_balance_uzi_sustained_damage"));
if (!g_norecoil)
{
self.punchangle_x = random () - 0.5;
--- /dev/null
+models/ice/ice
+{
+ dpnoshadow
+ dpreflectcube cubemaps/default/sky
+ {
+ map models/ice/ice.tga
+ blendfunc add
+ rgbgen vertex
+ }
+}
--- /dev/null
+crylink_projectile_core
+{
+ surfaceparm nonsolid
+ surfaceparm nolightmap
+ deformVertexes autosprite
+ {
+ map textures/projectiles/crylink_projectile_core.tga
+ blendfunc add
+ rgbGen lightingDiffuse
+ }
+}
+crylink_projectile_long
+{
+ surfaceparm nonsolid
+ surfaceparm nolightmap
+ deformVertexes autosprite2
+ {
+ map textures/projectiles/crylink_projectile_long.tga
+ blendfunc add
+ rgbGen lightingDiffuse
+ }
+}
+hlac_projectile_core
+{
+ surfaceparm nonsolid
+ surfaceparm nolightmap
+ deformVertexes autosprite
+ {
+ map textures/projectiles/hlac_projectile_core.tga
+ blendfunc add
+ rgbGen lightingDiffuse
+ }
+}
+hlac_projectile_long
+{
+ surfaceparm nonsolid
+ surfaceparm nolightmap
+ deformVertexes autosprite2
+ {
+ map textures/projectiles/hlac_projectile_long.tga
+ blendfunc add
+ rgbGen lightingDiffuse
+ }
+}
+electro_projectile_core
+{
+ surfaceparm nonsolid
+ surfaceparm nolightmap
+ deformVertexes autosprite
+ {
+ map textures/projectiles/electro_projectile_core.tga
+ blendfunc add
+ tcmod page 4 1 0.1
+ rgbGen lightingDiffuse
+ }
+}
+electro_projectile_long
+{
+ surfaceparm nonsolid
+ surfaceparm nolightmap
+ deformVertexes autosprite2
+ {
+ map textures/projectiles/electro_projectile_long.tga
+ blendfunc add
+ tcmod page 4 1 0.1
+ rgbGen lightingDiffuse
+ }
+}
+laser_projectile_core
+{
+ surfaceparm nonsolid
+ surfaceparm nolightmap
+ deformVertexes autosprite
+ {
+ map textures/projectiles/laser_projectile_core.tga
+ blendfunc add
+ rgbGen lightingDiffuse
+ }
+}
+laser_projectile_long
+{
+ surfaceparm nonsolid
+ surfaceparm nolightmap
+ deformVertexes autosprite2
+ {
+ map textures/projectiles/laser_projectile_long.tga
+ blendfunc add
+ rgbGen lightingDiffuse
+ }
+}
\ No newline at end of file
*Level Design
FruitieX
+MirceaKitsune
*Music / Sound FX
mand1nga
Antonio "terencehill" Piu
Ben "MooKow" Banker
Calinou
+chooksta
+Cuinn "Cuinnton" Herrick
Kristian "morfar" Johansson
kojn
Maik "SavageX" Merten
MrBougo
+Samual Lenks
Stephan "esteel" Stahl
Wolfgang "Blub\0" Bumiller
Mephisto
michaelb
Michael "Tenshihan" Quinn
-MirceaKitsune
Munyul
Netzwerg
NoelCower
Robert "ai" Kuroto
Ronan
Sajt
-Samual Lenks
Severin "sev" Meyer
Shaggy
Shank