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_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
+++ /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_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_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_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 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_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.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
+++ /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_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_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_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
-set g_balance_nex_secondary_animtime 0.3
-set g_balance_nex_secondary_ammo 0
-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_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_halflifedist 595
set g_balance_electro_secondary_damage 25
set g_balance_electro_secondary_edgedamage 0
set g_balance_electro_secondary_force 100
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_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_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
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_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 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"
exec balanceXonotic.cfg
exec ctfscoring-ai.cfg
exec effects-normal.cfg
-exec physicsNoQWBunny-xpmbased.cfg
+exec physicsX0.cfg
exec turrets.cfg
// hud cvar descriptions
--- /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
+++ /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
+// 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;
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)
{
entity e;
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);
}
else if (activeweapon == WEP_NEX && nex_charge) // ring around crosshair representing velocity-dependent damage for the nex
{
- vector rgb;
if(nex_charge_pool || use_nex_charge_pool)
{
use_nex_charge_pool = 1;
acc_levels = MAX_ACCURACY_LEVELS;
for (i = 0; i < acc_levels; ++i)
- acc_lev[i] = stof(argv(i));
+ acc_lev[i] = stof(argv(i)) / 100.0;
}
// let know that acc_col[] needs to be loaded
acc_col_x[0] = -1;
var float autocvar_cl_casings_ticrate = 0.1;
var float autocvar_cl_casings_sloppy = 1;
+var float autocvar_cl_gentle_damage;
+
var float autocvar_scoreboard_color_bg_team;
var float autocvar__menu_alpha;
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;
}
float show_accuracy;
- float weapon_stats, weapon_number;
+ float weapon_stats;
if(cvar("hud_panel_weapons_accuracy") && acc_levels)
{
show_accuracy = true;
- // 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 (acc_col_x[0] == -1)
for (i = 0; i < acc_levels; ++i)
acc_col[i] = stov(cvar_string(strcat("accuracy_color", ftos(i))));
// 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;
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 MAX_ACCURACY_LEVELS 10
float acc_lev[MAX_ACCURACY_LEVELS];
if(getstati(STAT_SWITCHWEAPON) == WEP_MINSTANEX)
g_minstagib = 1; // TODO: real detection for minstagib?
- float weapon_hit, weapon_damage, weapon_stats, weapon_number;
- // 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);
+ float weapon_stats, weapon_number;
if (!acc_levels)
rgb = '1 1 1';
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];
+ weapon_stats = weapon_accuracy[i-WEP_FIRST];
float weapon_alpha;
- if(weapon_damage)
- {
- weapon_stats = bound(0, floor(100 * weapon_hit / weapon_damage), 100);
+ 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
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;
- }
- }
- }
-}
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;
// 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;
// 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;
#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");
}
}
--- /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);
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");
}
DropAllRunes(self);
+ MUTATOR_CALLHOOK(MakePlayerObserver);
Portal_ClearAll(self);
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);
PlayerScore_Attach(self);
ClientData_Attach();
+ accuracy_init(self);
bot_clientconnect();
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")
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)
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);
- }
if(ent.items & IT_STRENGTH)
if(!g_minstagib)
// 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);
}
}
};
.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;
//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
}
}
-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("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);
}
// 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);
*/
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"))
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);
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);
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 ??
}
../common/mapinfo.qh
../common/util.qc
+accuracy.qh
csqcprojectile.qh
csqceffects.qc
monsters/ai.qc
monsters/m_monsters.qc
monsters/monster_zombie.qc
+accuracy.qc
csqcprojectile.qc
playerdemo.qc
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"));
}
}
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", 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", 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;
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", 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", 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 -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, "", cvar("g_balance_electro_secondary_damage"));
+ sound(self, CHAN_WEAPON2, "weapons/electro_fire2.wav", VOL_BASE, ATTN_NORM);
w_shotdir = v_forward; // no TrueAim for grenades please
pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
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);
}
}
{
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;
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", 10000);
yoda = 0;
damage_goodhits = 0;
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", 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", cvar("g_balance_seeker_missile_damage") * cvar("g_balance_seeker_missile_count"));
missile = spawn();
missile.owner = self;
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", 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
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", ((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", 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", cvar("g_balance_uzi_sustained_damage"));
if (!g_norecoil)
{
self.punchangle_x = random () - 0.5;
Antonio "terencehill" Piu
Ben "MooKow" Banker
Calinou
+chooksta
Kristian "morfar" Johansson
kojn
Maik "SavageX" Merten