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_grenadelauncher_primary_ammo 2
set g_balance_grenadelauncher_primary_health 25
set g_balance_grenadelauncher_primary_damageforcescale 4
-set g_balance_grenadelauncher_primary_bouncefactor 0.5
-set g_balance_grenadelauncher_primary_bouncestop 0.075
set g_balance_grenadelauncher_primary_remote_minbouncecnt 0
set g_balance_grenadelauncher_secondary_type 1
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_bouncefactor 0.5
-set g_balance_grenadelauncher_secondary_bouncestop 0.075
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_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_star_lifetime 0.1 // range: 700 full, fades to 2450
-set g_balance_crylink_primary_star_fadetime 0.25
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_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_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_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_laserguided_speed 1000 //650
-set g_balance_rocketlauncher_laserguided_speedaccel 0
-set g_balance_rocketlauncher_laserguided_speedstart 1000
-set g_balance_rocketlauncher_laserguided_turnrate 0.75 //0.5
-set g_balance_rocketlauncher_laserguided_allow_steal 1
set g_balance_rocketlauncher_remote_damage 105
set g_balance_rocketlauncher_remote_edgedamage 40
set g_balance_rocketlauncher_remote_radius 150
// {{{ laser
set g_balance_laser_primary_damage 25
set g_balance_laser_primary_edgedamage 10
-set g_balance_laser_primary_force 258
+set g_balance_laser_primary_force 182 // Original value was insanely low :P
set g_balance_laser_primary_radius 70
set g_balance_laser_primary_speed 12000
set g_balance_laser_primary_spread 0
set g_balance_laser_primary_shotangle 0
set g_balance_laser_primary_delay 0.03
set g_balance_laser_primary_gauntlet 0
-set g_balance_laser_primary_force_zscale 1
-set g_balance_laser_primary_force_velocitybias 0
+set g_balance_laser_primary_force_zscale 2 // 300 upforce
+set g_balance_laser_primary_force_velocitybias 0.3
set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
-set g_balance_laser_secondary_damage 25
-set g_balance_laser_secondary_edgedamage 10
-set g_balance_laser_secondary_force 375
-set g_balance_laser_secondary_radius 70
-set g_balance_laser_secondary_speed 12000
+set g_balance_laser_secondary_damage 200 // dps
+set g_balance_laser_secondary_edgedamage 0
+set g_balance_laser_secondary_force 1300
+set g_balance_laser_secondary_radius 60
+set g_balance_laser_secondary_speed 0
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 -90
+set g_balance_laser_secondary_refire 0.066
+set g_balance_laser_secondary_animtime 0.066
+set g_balance_laser_secondary_lifetime 0
+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_gauntlet 1
+set g_balance_laser_secondary_force_zscale 1.25
set g_balance_laser_secondary_force_velocitybias 0
// }}}
// {{{ shotgun
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 26
set g_balance_uzi_first_force -30
set g_balance_grenadelauncher_primary_ammo 2
set g_balance_grenadelauncher_primary_health 72
set g_balance_grenadelauncher_primary_damageforcescale 0
-set g_balance_grenadelauncher_primary_bouncefactor 0.7
-set g_balance_grenadelauncher_primary_bouncestop 0.12
set g_balance_grenadelauncher_primary_remote_minbouncecnt 0
set g_balance_grenadelauncher_secondary_type 1
set g_balance_grenadelauncher_secondary_ammo 2
set g_balance_grenadelauncher_secondary_health 40
set g_balance_grenadelauncher_secondary_damageforcescale 0
-set g_balance_grenadelauncher_secondary_bouncefactor 0.7
-set g_balance_grenadelauncher_secondary_bouncestop 0.12
set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
+
+set g_balance_grenadelauncher_bouncefactor 0.7
+set g_balance_grenadelauncher_bouncestop 0.12
// }}}
// {{{ minelayer // TODO
set g_balance_minelayer_damage 35
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_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: 10000 full, fades to 20000
set g_balance_crylink_primary_middle_fadetime 5
-set g_balance_crylink_primary_star_lifetime 2 // range: 800 full, fades to 1300
-set g_balance_crylink_primary_star_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_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_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_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_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_laserguided_speed 1000 //650
-set g_balance_rocketlauncher_laserguided_speedaccel 0
-set g_balance_rocketlauncher_laserguided_speedstart 1000
-set g_balance_rocketlauncher_laserguided_turnrate 0.60 //0.5
-set g_balance_rocketlauncher_laserguided_allow_steal 1
set g_balance_rocketlauncher_remote_damage 120
set g_balance_rocketlauncher_remote_edgedamage 46
set g_balance_rocketlauncher_remote_radius 185
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_grenadelauncher_primary_ammo 2
set g_balance_grenadelauncher_primary_health 25
set g_balance_grenadelauncher_primary_damageforcescale 4
-set g_balance_grenadelauncher_primary_bouncefactor 0.5
-set g_balance_grenadelauncher_primary_bouncestop 0.075
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_ammo 2
set g_balance_grenadelauncher_secondary_health 10
set g_balance_grenadelauncher_secondary_damageforcescale 4
-set g_balance_grenadelauncher_secondary_bouncefactor 0.5
-set g_balance_grenadelauncher_secondary_bouncestop 0.075
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_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_star_lifetime 0.1 // range: 700 full, fades to 2450
-set g_balance_crylink_primary_star_fadetime 0.25
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_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_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_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_laserguided_speed 1000 //650
-set g_balance_rocketlauncher_laserguided_speedaccel 0
-set g_balance_rocketlauncher_laserguided_speedstart 1000
-set g_balance_rocketlauncher_laserguided_turnrate 0.75 //0.5
-set g_balance_rocketlauncher_laserguided_allow_steal 1
set g_balance_rocketlauncher_remote_damage 105
set g_balance_rocketlauncher_remote_edgedamage 40
set g_balance_rocketlauncher_remote_radius 150
set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
set g_start_weapon_porto -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
set g_start_weapon_hook -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_hlac 0 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
+set g_start_weapon_hlac -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
set g_start_weapon_campingrifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_fireball 0 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_seeker 0 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
+set g_start_weapon_fireball -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
+set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
set g_balance_health_start 125
set g_balance_armor_start 0
-set g_start_ammo_shells 30
+set g_start_ammo_shells 15
set g_start_ammo_nails 0
set g_start_ammo_rockets 0
set g_start_ammo_cells 0
// {{{ pickup items
set g_pickup_ammo_anyway 1
set g_pickup_weapons_anyway 1
-set g_pickup_shells 30
-set g_pickup_shells_weapon 30
-set g_pickup_shells_max 120
-set g_pickup_nails 80
-set g_pickup_nails_weapon 80
-set g_pickup_nails_max 400
-set g_pickup_rockets 30
-set g_pickup_rockets_weapon 30
-set g_pickup_rockets_max 120
+set g_pickup_shells 15
+set g_pickup_shells_weapon 15
+set g_pickup_shells_max 100
+set g_pickup_nails 75
+set g_pickup_nails_weapon 75
+set g_pickup_nails_max 300
+set g_pickup_rockets 40
+set g_pickup_rockets_weapon 40
+set g_pickup_rockets_max 160
set g_pickup_cells 50
set g_pickup_cells_weapon 50
set g_pickup_cells_max 200
set g_pickup_fuel 25
set g_pickup_fuel_weapon 25
set g_pickup_fuel_jetpack 50
-set g_pickup_fuel_max 999
+set g_pickup_fuel_max 100
set g_pickup_armorsmall 10
set g_pickup_armorsmall_max 200
set g_pickup_armorsmall_anyway 1
// {{{ laser
set g_balance_laser_primary_damage 25
set g_balance_laser_primary_edgedamage 10
-set g_balance_laser_primary_force 400
+set g_balance_laser_primary_force 175
set g_balance_laser_primary_radius 70
set g_balance_laser_primary_speed 12000
set g_balance_laser_primary_spread 0
set g_balance_laser_primary_shotangle 0
set g_balance_laser_primary_delay 0.03
set g_balance_laser_primary_gauntlet 0
-set g_balance_laser_primary_force_zscale 1
-set g_balance_laser_primary_force_velocitybias 0
+set g_balance_laser_primary_force_zscale 2 // 350 upforce
+set g_balance_laser_primary_force_velocitybias 0.3
set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
set g_balance_laser_secondary_damage 25
set g_balance_laser_secondary_edgedamage 10
set g_balance_laser_secondary_shotangle -90
set g_balance_laser_secondary_delay 0
set g_balance_laser_secondary_gauntlet 0
-set g_balance_laser_secondary_force_zscale 1
+set g_balance_laser_secondary_force_zscale 1.25
set g_balance_laser_secondary_force_velocitybias 0
// }}}
// {{{ shotgun
-set g_balance_shotgun_primary_bullets 6
-set g_balance_shotgun_primary_damage 8
+set g_balance_shotgun_primary_bullets 10
+set g_balance_shotgun_primary_damage 6
set g_balance_shotgun_primary_force 15
set g_balance_shotgun_primary_spread 0.11
set g_balance_shotgun_primary_refire 0.5
set g_balance_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 12
-set g_balance_uzi_first_force 5
-set g_balance_uzi_first_spread 0.015
-set g_balance_uzi_first_refire 0.15
+set g_balance_uzi_first_damage 18
+set g_balance_uzi_first_force 20
+set g_balance_uzi_first_spread 0.03
+set g_balance_uzi_first_refire 0.2
set g_balance_uzi_first_ammo 1
-set g_balance_uzi_sustained_damage 7
-set g_balance_uzi_sustained_force 5
-set g_balance_uzi_sustained_spread 0.05
-set g_balance_uzi_sustained_refire 0.075
+set g_balance_uzi_sustained_damage 10
+set g_balance_uzi_sustained_force 10
+set g_balance_uzi_sustained_spread 0.08
+set g_balance_uzi_sustained_refire 0.1
set g_balance_uzi_sustained_ammo 1
set g_balance_uzi_speed 18000
set g_balance_uzi_bulletconstant 115 // 13.1qu
set g_balance_grenadelauncher_primary_edgedamage 38
set g_balance_grenadelauncher_primary_force 400
set g_balance_grenadelauncher_primary_radius 140
-set g_balance_grenadelauncher_primary_speed 2200
+set g_balance_grenadelauncher_primary_speed 2000
set g_balance_grenadelauncher_primary_speed_up 220
set g_balance_grenadelauncher_primary_speed_z 0
set g_balance_grenadelauncher_primary_spread 0
set g_balance_grenadelauncher_primary_ammo 2
set g_balance_grenadelauncher_primary_health 25
set g_balance_grenadelauncher_primary_damageforcescale 4
-set g_balance_grenadelauncher_primary_bouncefactor 0.5
-set g_balance_grenadelauncher_primary_bouncestop 0.075
set g_balance_grenadelauncher_primary_remote_minbouncecnt 0
set g_balance_grenadelauncher_secondary_type 1
set g_balance_grenadelauncher_secondary_ammo 2
set g_balance_grenadelauncher_secondary_health 70
set g_balance_grenadelauncher_secondary_damageforcescale 4
-set g_balance_grenadelauncher_secondary_bouncefactor 0.5
-set g_balance_grenadelauncher_secondary_bouncestop 0.075
-set g_balance_grenadelauncher_secondary_remote_detonateprimary 1
+set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
+
+set g_balance_grenadelauncher_bouncefactor 0.5
+set g_balance_grenadelauncher_bouncestop 0.075
// }}}
// {{{ minelayer // TODO
set g_balance_minelayer_damage 35
set g_balance_minelayer_remote_radius 200
set g_balance_minelayer_remote_force 300
// }}}
-// {{{ electro
-set g_balance_electro_lightning 0
-set g_balance_electro_primary_damage 65
+// {{{ electro // TODO
+set g_balance_electro_lightning 1
+set g_balance_electro_primary_damage 90
set g_balance_electro_primary_edgedamage 0
-set g_balance_electro_primary_force 200
-set g_balance_electro_primary_force_up 0
-set g_balance_electro_primary_radius 150
-set g_balance_electro_primary_comboradius 0
-set g_balance_electro_primary_speed 2000
+set g_balance_electro_primary_force 425
+set g_balance_electro_primary_force_up 125
+set g_balance_electro_primary_radius 850
+set g_balance_electro_primary_comboradius 75
+set g_balance_electro_primary_speed 0
set g_balance_electro_primary_spread 0
-set g_balance_electro_primary_lifetime 30
+set g_balance_electro_primary_lifetime 0
set g_balance_electro_primary_refire 0.6
-set g_balance_electro_primary_animtime 0.3
-set g_balance_electro_primary_ammo 2
-set g_balance_electro_primary_range 0
+set g_balance_electro_primary_animtime 0.03
+set g_balance_electro_primary_ammo 7
+set g_balance_electro_primary_range 800
set g_balance_electro_primary_falloff_mindist 255 // 0.3 * radius
set g_balance_electro_primary_falloff_maxdist 850
set g_balance_electro_primary_falloff_halflifedist 425
-set g_balance_electro_secondary_damage 50
+set g_balance_electro_secondary_damage 25
set g_balance_electro_secondary_edgedamage 0
-set g_balance_electro_secondary_force 200
-set g_balance_electro_secondary_radius 150
+set g_balance_electro_secondary_force 100
+set g_balance_electro_secondary_radius 100
set g_balance_electro_secondary_speed 900
set g_balance_electro_secondary_speed_up 200
set g_balance_electro_secondary_speed_z 0
-set g_balance_electro_secondary_spread 0
+set g_balance_electro_secondary_spread 0.08
set g_balance_electro_secondary_lifetime 2.5
set g_balance_electro_secondary_refire 0.2
set g_balance_electro_secondary_refire2 1
set g_balance_electro_combo_force 200
set g_balance_electro_combo_radius 250
set g_balance_electro_combo_comboradius 0
-set g_balance_electro_combo_speed 2000
+set g_balance_electro_combo_speed 400
// }}}
-// {{{ crylink
-set g_balance_crylink_primary_damage 14
+// {{{ crylink
+set g_balance_crylink_primary_damage 10
set g_balance_crylink_primary_edgedamage 0
set g_balance_crylink_primary_force -55
set g_balance_crylink_primary_radius 50
-set g_balance_crylink_primary_speed 7000
-set g_balance_crylink_primary_spread 0.02
+set g_balance_crylink_primary_speed 3000
+set g_balance_crylink_primary_spread 0.05
set g_balance_crylink_primary_shots 4
set g_balance_crylink_primary_bounces 1
set g_balance_crylink_primary_refire 0.4
set g_balance_crylink_primary_animtime 0.3
set g_balance_crylink_primary_ammo 2
set g_balance_crylink_primary_bouncedamagefactor 0.5
+set g_balance_crylink_primary_joinspeed 0
+set g_balance_crylink_primary_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_star_lifetime 0.1 // range: 700 full, fades to 2450
-set g_balance_crylink_primary_star_fadetime 0.25
-set g_balance_crylink_primary_other_lifetime 0.1 // range: 700 full, fades to 2450
-set g_balance_crylink_primary_other_fadetime 0.25
+set g_balance_crylink_primary_other_lifetime 5
+set g_balance_crylink_primary_other_fadetime 5
set g_balance_crylink_secondary 1
-set g_balance_crylink_secondary_damage 10
+set g_balance_crylink_secondary_damage 8
set g_balance_crylink_secondary_edgedamage 0
set g_balance_crylink_secondary_force -40
set g_balance_crylink_secondary_radius 10
-set g_balance_crylink_secondary_speed 4000
-set g_balance_crylink_secondary_spread 0.01
+set g_balance_crylink_secondary_speed 9000
+set g_balance_crylink_secondary_spread 0.03
set g_balance_crylink_secondary_shots 3
set g_balance_crylink_secondary_bounces 0
-set g_balance_crylink_secondary_refire 0.1
-set g_balance_crylink_secondary_animtime 0.1
+set g_balance_crylink_secondary_refire 0.2
+set g_balance_crylink_secondary_animtime 0.2
set g_balance_crylink_secondary_ammo 2
set g_balance_crylink_secondary_bouncedamagefactor 0.5
+set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_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
+set g_balance_crylink_secondary_line_lifetime 5
+set g_balance_crylink_secondary_line_fadetime 5
// }}}
// {{{ nex
set g_balance_nex_primary_damage 90
-set g_balance_nex_primary_force 300
+set g_balance_nex_primary_force 400
set g_balance_nex_primary_refire 1.5
set g_balance_nex_primary_animtime 0.3
set g_balance_nex_primary_ammo 5
set g_balance_nex_secondary 0
set g_balance_nex_secondary_charge 0
set g_balance_nex_secondary_charge_rate 0.1
-set g_balance_nex_secondary_damage 90
-set g_balance_nex_secondary_force 300
-set g_balance_nex_secondary_refire 1.5
-set g_balance_nex_secondary_animtime 0.3
-set g_balance_nex_secondary_ammo 5
-set g_balance_nex_secondary_damagefalloff_mindist 1000
-set g_balance_nex_secondary_damagefalloff_maxdist 3000
-set g_balance_nex_secondary_damagefalloff_halflife 1500
-set g_balance_nex_secondary_damagefalloff_forcehalflife 1500
+set g_balance_nex_secondary_damage 0
+set g_balance_nex_secondary_force 0
+set g_balance_nex_secondary_refire 0
+set g_balance_nex_secondary_animtime 0
+set g_balance_nex_secondary_ammo 2
+set g_balance_nex_secondary_damagefalloff_mindist 0
+set g_balance_nex_secondary_damagefalloff_maxdist 0
+set g_balance_nex_secondary_damagefalloff_halflife 0
+set g_balance_nex_secondary_damagefalloff_forcehalflife 0
-set g_balance_nex_charge 0
+set g_balance_nex_charge 1
set g_balance_nex_charge_mindmg 40
set g_balance_nex_charge_start 0
set g_balance_nex_charge_rate 0.1
set g_balance_nex_charge_limit 0.5
set g_balance_nex_charge_rot_rate 0
-set g_balance_nex_charge_shot_multiplier 0.5
+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.25
set g_balance_nex_charge_velocity_rate 0.2
set g_balance_nex_charge_minspeed 400
set g_balance_nex_charge_maxspeed 1000
set g_balance_hagar_primary_edgedamage 0
set g_balance_hagar_primary_force 50
set g_balance_hagar_primary_radius 70
-set g_balance_hagar_primary_spread 0.05
-set g_balance_hagar_primary_speed 2400
-set g_balance_hagar_primary_lifetime 30
+set g_balance_hagar_primary_spread 0.08
+set g_balance_hagar_primary_speed 2000
+set g_balance_hagar_primary_lifetime 0.12
set g_balance_hagar_primary_refire 0.15
set g_balance_hagar_primary_ammo 1
set g_balance_hagar_secondary 1
-set g_balance_hagar_secondary_damage 20
-set g_balance_hagar_secondary_edgedamage 10
-set g_balance_hagar_secondary_force 50
-set g_balance_hagar_secondary_radius 90
-set g_balance_hagar_secondary_spread 0.05
+set g_balance_hagar_secondary_damage 37
+set g_balance_hagar_secondary_edgedamage 15
+set g_balance_hagar_secondary_force 100
+set g_balance_hagar_secondary_radius 65
+set g_balance_hagar_secondary_spread 0.015
set g_balance_hagar_secondary_speed 2000
-set g_balance_hagar_secondary_lifetime_min 0.1
-set g_balance_hagar_secondary_lifetime_rand 0.05
-set g_balance_hagar_secondary_refire 0.1
-set g_balance_hagar_secondary_ammo 0.5
+set g_balance_hagar_secondary_lifetime_min 30
+set g_balance_hagar_secondary_lifetime_rand 0
+set g_balance_hagar_secondary_refire 0.15
+set g_balance_hagar_secondary_ammo 1
// }}}
// {{{ rocketlauncher
set g_balance_rocketlauncher_damage 80
set g_balance_rocketlauncher_radius 100
set g_balance_rocketlauncher_speed 1600
set g_balance_rocketlauncher_speedaccel 1600
-set g_balance_rocketlauncher_speedstart 1000
+set g_balance_rocketlauncher_speedstart 800
set g_balance_rocketlauncher_lifetime 30
set g_balance_rocketlauncher_refire 1.2
set g_balance_rocketlauncher_animtime 0.3
set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
set g_balance_rocketlauncher_guidestop 0 // stop guiding when firing again
-set g_balance_rocketlauncher_laserguided_speed 1000 //650
-set g_balance_rocketlauncher_laserguided_speedaccel 0
-set g_balance_rocketlauncher_laserguided_speedstart 1000
-set g_balance_rocketlauncher_laserguided_turnrate 0.75 //0.5
-set g_balance_rocketlauncher_laserguided_allow_steal 1
-set g_balance_rocketlauncher_remote_damage 80
-set g_balance_rocketlauncher_remote_edgedamage 40
+set g_balance_rocketlauncher_remote_damage 70
+set g_balance_rocketlauncher_remote_edgedamage 30
set g_balance_rocketlauncher_remote_radius 100
-set g_balance_rocketlauncher_remote_force 600
+set g_balance_rocketlauncher_remote_force 500
// }}}
// {{{ porto
set g_balance_porto_primary_refire 1.5
set g_balance_porto_primary_animtime 0.3
set g_balance_porto_primary_speed 5000
-set g_balance_porto_primary_lifetime 30
+set g_balance_porto_primary_lifetime 5
set g_balance_portal_health 200 // these get recharged whenever the portal is used
set g_balance_portal_lifetime 15 // these get recharged whenever the portal is used
// }}}
// {{{ hook
-set g_balance_hook_primary_fuel 2 // hook monkeys set 0
+set g_balance_hook_primary_fuel 5 // hook monkeys set 0
set g_balance_hook_primary_refire 0 // hook monkeys set 0
set g_balance_hook_primary_animtime 0.3 // good shoot anim
set g_balance_hook_primary_hooked_time_max 0 // infinite
set g_balance_hook_primary_hooked_time_free 2 // 2s being hooked are free
-set g_balance_hook_primary_hooked_fuel 3 // fuel per second hooked
+set g_balance_hook_primary_hooked_fuel 5 // fuel per second hooked
set g_balance_hook_secondary_damage 25 // not much
set g_balance_hook_secondary_edgedamage 5 // not much
set g_balance_hook_secondary_radius 500 // LOTS
set g_balance_hook_secondary_force -2000 // LOTS
set g_balance_hook_secondary_ammo 50 // a whole pack
-set g_balance_hook_secondary_lifetime 30 // infinite
+set g_balance_hook_secondary_lifetime 5 // infinite
set g_balance_hook_secondary_speed 0 // not much throwing
set g_balance_hook_secondary_gravity 5 // fast falling
set g_balance_hook_secondary_refire 3 // don't drop too many bombs...
set g_balance_hlac_secondary_shots 6
// }}}
// {{{ campingrifle
-set g_balance_campingrifle_magazinecapacity 0
+set g_balance_campingrifle_magazinecapacity 8 // make it pretty much useless in close combat
set g_balance_campingrifle_reloadtime 2 // matches reload anim
set g_balance_campingrifle_auto_reload_after_changing_weapons 0
-set g_balance_campingrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
-set g_balance_campingrifle_primary_tracer 0
-set g_balance_campingrifle_primary_damage 50
-set g_balance_campingrifle_primary_headshotaddeddamage 50
+set g_balance_campingrifle_bursttime 0
+set g_balance_campingrifle_primary_tracer 1
+set g_balance_campingrifle_primary_damage 65
+set g_balance_campingrifle_primary_headshotaddeddamage 75
set g_balance_campingrifle_primary_spread 0
-set g_balance_campingrifle_primary_force 50
-set g_balance_campingrifle_primary_speed 35000
+set g_balance_campingrifle_primary_force 2
+set g_balance_campingrifle_primary_speed 40000
set g_balance_campingrifle_primary_lifetime 5
-set g_balance_campingrifle_primary_refire 0.7
+set g_balance_campingrifle_primary_refire 0.75
set g_balance_campingrifle_primary_animtime 0.3
set g_balance_campingrifle_primary_ammo 10
-set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
-set g_balance_campingrifle_primary_burstcost 0.35 // require same cooldown as secondary, note it's smaller than primary refire time
-set g_balance_campingrifle_primary_bullethail 0
+set g_balance_campingrifle_primary_bulletconstant 110 // 62.2qu
+set g_balance_campingrifle_primary_burstcost 0
+set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
set g_balance_campingrifle_secondary 1
set g_balance_campingrifle_secondary_tracer 0
-set g_balance_campingrifle_secondary_damage 15
-set g_balance_campingrifle_secondary_headshotaddeddamage 25
-set g_balance_campingrifle_secondary_spread 0.02
-set g_balance_campingrifle_secondary_force 30
+set g_balance_campingrifle_secondary_damage 50
+set g_balance_campingrifle_secondary_headshotaddeddamage 50 // 50 damage only on head
+set g_balance_campingrifle_secondary_spread 0
+set g_balance_campingrifle_secondary_force 2
set g_balance_campingrifle_secondary_speed 20000
set g_balance_campingrifle_secondary_lifetime 5
set g_balance_campingrifle_secondary_refire 0.1
set g_balance_campingrifle_secondary_animtime 0.1
-set g_balance_campingrifle_secondary_ammo 4
-set g_balance_campingrifle_secondary_bulletconstant 130 // 18.3qu
-set g_balance_campingrifle_secondary_burstcost 0.35
-set g_balance_campingrifle_secondary_bullethail 0
+set g_balance_campingrifle_secondary_ammo 10
+set g_balance_campingrifle_secondary_bulletconstant 110 // 15.5qu
+set g_balance_campingrifle_secondary_burstcost 0
+set g_balance_campingrifle_secondary_bullethail 0 // empty magazine on shot
// }}}
// {{{ tuba
set g_balance_tuba_refire 0.05
set g_pickup_weapons_anyway 1
set g_pickup_shells 20
set g_pickup_shells_weapon 10
-set g_pickup_shells_max 45
-set g_pickup_nails 120
+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_max 150
set g_pickup_cells 30
set g_pickup_cells_weapon 20
-set g_pickup_cells_max 200
+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_respawntime_medium 20
set g_pickup_respawntime_long 30
set g_pickup_respawntime_powerup 120
-set g_pickup_respawntime_weapon 5
-set g_pickup_respawntime_ammo 25
+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
// }}}
// {{{ misc
-set g_balance_selfdamagepercent 0.65
+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_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 4
+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
// {{{ weapon properties
// {{{ laser
-set g_balance_laser_primary_damage 20 // dps 33, hope that's not too high
-set g_balance_laser_primary_edgedamage 20
-set g_balance_laser_primary_force 200 // this looks insanely low, but actually isn't with zscale and velocitybias
+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 4000
+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_shotangle 0
set g_balance_laser_primary_delay 0
set g_balance_laser_primary_gauntlet 0
-set g_balance_laser_primary_force_zscale 1.35 // 270 upforce
-set g_balance_laser_primary_force_velocitybias 0.25
+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_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.25
+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 60
+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_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.3
+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 10
-set g_balance_uzi_sustained_spread 0.08
+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
// }}}
// {{{ mortar
set g_balance_grenadelauncher_primary_type 0
-set g_balance_grenadelauncher_primary_damage 60
-set g_balance_grenadelauncher_primary_edgedamage 38
-set g_balance_grenadelauncher_primary_force 400
+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_ammo 2
set g_balance_grenadelauncher_primary_health 25
set g_balance_grenadelauncher_primary_damageforcescale 4
-set g_balance_grenadelauncher_primary_bouncefactor 0.5
-set g_balance_grenadelauncher_primary_bouncestop 0.075
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_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_ammo 2
set g_balance_grenadelauncher_secondary_health 10
set g_balance_grenadelauncher_secondary_damageforcescale 4
-set g_balance_grenadelauncher_secondary_bouncefactor 0.5
-set g_balance_grenadelauncher_secondary_bouncestop 0.075
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_remote_force 300
// }}}
// {{{ electro
-set g_balance_electro_lightning 1
-set g_balance_electro_primary_damage 110
+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 425
-set g_balance_electro_primary_force_up 125
-set g_balance_electro_primary_radius 850
-set g_balance_electro_primary_comboradius 150
-set g_balance_electro_primary_speed 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 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_range 800
+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 100
-set g_balance_electro_secondary_radius 100
-set g_balance_electro_secondary_speed 500
+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.08
-set g_balance_electro_secondary_lifetime 3.5
+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.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 4
+set g_balance_electro_secondary_damageforcescale 2
set g_balance_electro_secondary_count 3
-set g_balance_electro_combo_damage 60
-set g_balance_electro_combo_edgedamage 0
-set g_balance_electro_combo_force 80
+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 400
+set g_balance_electro_combo_speed 1000
// }}}
// {{{ crylink
set g_balance_crylink_primary_damage 5
-set g_balance_crylink_primary_edgedamage 2.5
-set g_balance_crylink_primary_force 25
-set g_balance_crylink_primary_radius 50
-set g_balance_crylink_primary_speed 2500
-set g_balance_crylink_primary_spread 0.04
-set g_balance_crylink_primary_shots 12
+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 // range: 10000 full, fades to 20000
-set g_balance_crylink_primary_middle_fadetime 5
-set g_balance_crylink_primary_star_lifetime 2 // range: 800 full, fades to 1300
-set g_balance_crylink_primary_star_fadetime 0.25
+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_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
// {{{ nex
set g_balance_nex_primary_damage 100
set g_balance_nex_primary_force 600
-set g_balance_nex_primary_refire 0.75
+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_secondary 1
set g_balance_nex_secondary_charge 1
-set g_balance_nex_secondary_charge_rate 0.7
+set g_balance_nex_secondary_charge_rate 0.55
set g_balance_nex_secondary_damage 100
set g_balance_nex_secondary_force 600
set g_balance_nex_secondary_refire 1.5
set g_balance_nex_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
+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_minstanex_ammo 10
// }}}
// {{{ hagar
-set g_balance_hagar_primary_damage 30
-set g_balance_hagar_primary_edgedamage 15
-set g_balance_hagar_primary_force 50
-set g_balance_hagar_primary_radius 65
+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 3000
+set g_balance_hagar_primary_speed 2500
set g_balance_hagar_primary_lifetime 30
-set g_balance_hagar_primary_refire 0.15
+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_ammo 1
// }}}
// {{{ rocketlauncher // TODO
-set g_balance_rocketlauncher_damage 110
+set g_balance_rocketlauncher_damage 120
set g_balance_rocketlauncher_edgedamage 25
set g_balance_rocketlauncher_force 350
-set g_balance_rocketlauncher_radius 125
-set g_balance_rocketlauncher_speed 1000
+set g_balance_rocketlauncher_radius 130
+set g_balance_rocketlauncher_speed 900
set g_balance_rocketlauncher_speedaccel 0
-set g_balance_rocketlauncher_speedstart 1000
-set g_balance_rocketlauncher_lifetime 5
-set g_balance_rocketlauncher_refire 1
+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 45 // max degrees per second
+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_laserguided_speed 1000 //650
-set g_balance_rocketlauncher_laserguided_speedaccel 0
-set g_balance_rocketlauncher_laserguided_speedstart 1000
-set g_balance_rocketlauncher_laserguided_turnrate 0.75 //0.5
-set g_balance_rocketlauncher_laserguided_allow_steal 1
set g_balance_rocketlauncher_remote_damage 90
set g_balance_rocketlauncher_remote_edgedamage 20
set g_balance_rocketlauncher_remote_radius 125
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 75
-set g_balance_campingrifle_primary_headshotaddeddamage 75
+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 1.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
// {{{ 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_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_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_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_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_refire 1
set g_balance_seeker_tag_speed 9000
set g_balance_seeker_tag_spread 0
// End new seeker
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 250
+set g_lms_start_health 200
+set g_lms_start_armor 150
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_nails 200
+set g_lms_start_ammo_rockets 150
+set g_lms_start_ammo_cells 150
set g_lms_start_ammo_fuel 0
set g_balance_nix_roundtime 25
set g_balance_nix_incrtime 1.6
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 18
+set g_balance_uzi_first_damage 20
set g_balance_uzi_first_force 35
set g_balance_uzi_first_spread 0.03
set g_balance_uzi_first_refire 0.2
set g_balance_uzi_first_ammo 2
-set g_balance_uzi_sustained_damage 10
+set g_balance_uzi_sustained_damage 12
set g_balance_uzi_sustained_force 7.5
set g_balance_uzi_sustained_spread 0.1
set g_balance_uzi_sustained_refire 0.1
set g_balance_grenadelauncher_primary_ammo 2
set g_balance_grenadelauncher_primary_health 80
set g_balance_grenadelauncher_primary_damageforcescale 0
-set g_balance_grenadelauncher_primary_bouncefactor 0.5
-set g_balance_grenadelauncher_primary_bouncestop 0.12
set g_balance_grenadelauncher_primary_remote_minbouncecnt 0
set g_balance_grenadelauncher_secondary_type 1
set g_balance_grenadelauncher_secondary_ammo 2
set g_balance_grenadelauncher_secondary_health 40
set g_balance_grenadelauncher_secondary_damageforcescale 0
-set g_balance_grenadelauncher_secondary_bouncefactor 0.5
-set g_balance_grenadelauncher_secondary_bouncestop 0.12
set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
+
+set g_balance_grenadelauncher_bouncefactor 0.5
+set g_balance_grenadelauncher_bouncestop 0.12
// }}}
// {{{ minelayer // TODO
set g_balance_minelayer_damage 35
// }}}
// {{{ electro // TODO
set g_balance_electro_lightning 1
-set g_balance_electro_primary_damage 90
+set g_balance_electro_primary_damage 100
set g_balance_electro_primary_edgedamage 0
set g_balance_electro_primary_force 425
set g_balance_electro_primary_force_up 125
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_joinexplode 0
+set g_balance_crylink_primary_joinexplode_damage 0
+set g_balance_crylink_primary_joinexplode_edgedamage 0
+set g_balance_crylink_primary_joinexplode_radius 0
+set g_balance_crylink_primary_joinexplode_force 0
+set g_balance_crylink_primary_linkexplode 0
set g_balance_crylink_primary_middle_lifetime 5 // range: 10000 full, fades to 20000
set g_balance_crylink_primary_middle_fadetime 5
-set g_balance_crylink_primary_star_lifetime 2 // range: 800 full, fades to 1300
-set g_balance_crylink_primary_star_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_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_nex_secondary 1
set g_balance_nex_secondary_charge 1
-set g_balance_nex_secondary_charge_rate 0.1
+set g_balance_nex_secondary_charge_rate 0.125
set g_balance_nex_secondary_damage 0
set g_balance_nex_secondary_force 0
set g_balance_nex_secondary_refire 0
set g_balance_nex_charge_rate 0.05
set g_balance_nex_charge_limit 0.5
set g_balance_nex_charge_rot_rate 0.01
+set g_balance_nex_charge_rot_pause 0 // Dont rot down untill this long after release of charge button
set g_balance_nex_charge_shot_multiplier 0.675
-set g_balance_nex_charge_velocity_rate 0.15
+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.25
-set g_balance_minstanex_animtime 1
+set g_balance_minstanex_refire 1
+set g_balance_minstanex_animtime 0.75
set g_balance_minstanex_ammo 10
// }}}
// {{{ hagar
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_laserguided_speed 1000 //650
-set g_balance_rocketlauncher_laserguided_speedaccel 0
-set g_balance_rocketlauncher_laserguided_speedstart 1000
-set g_balance_rocketlauncher_laserguided_turnrate 0.75 //0.5
-set g_balance_rocketlauncher_laserguided_allow_steal 1
set g_balance_rocketlauncher_remote_damage 50
set g_balance_rocketlauncher_remote_edgedamage 16.5
set g_balance_rocketlauncher_remote_radius 120
set g_balance_campingrifle_bursttime 0
set g_balance_campingrifle_primary_tracer 1
set g_balance_campingrifle_primary_damage 75
-set g_balance_campingrifle_primary_headshotaddeddamage 75
+set g_balance_campingrifle_primary_headshotaddeddamage 125
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_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_headshotaddeddamage 75
set g_balance_campingrifle_secondary_spread 0
set g_balance_campingrifle_secondary_force 2
set g_balance_campingrifle_secondary_speed 20000
// {{{ 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 45
-set g_pickup_nails 120
+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 200
+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_max 100
set g_pickup_armormedium_anyway 0
+
set g_pickup_armorbig 50
-set g_pickup_armorbig_max 999
+set g_pickup_armorbig_max 150
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_max 100
set g_pickup_healthmedium_anyway 0
+
set g_pickup_healthlarge 50
-set g_pickup_healthlarge_max 999
+set g_pickup_healthlarge_max 150
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 5
-set g_pickup_respawntime_ammo 25
+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_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_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 0
-set g_balance_pause_armor_rot 5
-set g_balance_pause_armor_rot_spawn 10
+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_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_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.65
+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"
// 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.20
-set g_balance_falldamage_maxdamage 15
+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 4
+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
// {{{ weapon properties
// {{{ laser
-set g_balance_laser_primary_damage 20 // dps 33, hope that's not too high
-set g_balance_laser_primary_edgedamage 20
-set g_balance_laser_primary_force 270
+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 4000
+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_shotangle 0
set g_balance_laser_primary_delay 0
set g_balance_laser_primary_gauntlet 0
-set g_balance_laser_primary_force_zscale 1
+set g_balance_laser_primary_force_zscale 1.2
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
// {{{ shotgun
set g_balance_shotgun_primary_bullets 10
set g_balance_shotgun_primary_damage 5
-set g_balance_shotgun_primary_force 60
+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_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.3
+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 10
-set g_balance_uzi_sustained_spread 0.08
+
+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 60
-set g_balance_grenadelauncher_primary_edgedamage 38
-set g_balance_grenadelauncher_primary_force 400
+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_ammo 2
set g_balance_grenadelauncher_primary_health 25
set g_balance_grenadelauncher_primary_damageforcescale 4
-set g_balance_grenadelauncher_primary_bouncefactor 0.5
-set g_balance_grenadelauncher_primary_bouncestop 0.075
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_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_ammo 2
set g_balance_grenadelauncher_secondary_health 10
set g_balance_grenadelauncher_secondary_damageforcescale 4
-set g_balance_grenadelauncher_secondary_bouncefactor 0.5
-set g_balance_grenadelauncher_secondary_bouncestop 0.075
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_remote_force 300
// }}}
// {{{ electro
-set g_balance_electro_lightning 1
-set g_balance_electro_primary_damage 110
+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 425
-set g_balance_electro_primary_force_up 125
-set g_balance_electro_primary_radius 850
-set g_balance_electro_primary_comboradius 150
-set g_balance_electro_primary_speed 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 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_range 800
+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 100
-set g_balance_electro_secondary_radius 100
-set g_balance_electro_secondary_speed 500
+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.08
-set g_balance_electro_secondary_lifetime 3.5
+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.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 4
+set g_balance_electro_secondary_damageforcescale 2
set g_balance_electro_secondary_count 3
-set g_balance_electro_combo_damage 60
-set g_balance_electro_combo_edgedamage 0
-set g_balance_electro_combo_force 80
+
+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 400
+set g_balance_electro_combo_speed 1000
// }}}
// {{{ crylink
set g_balance_crylink_primary_damage 5
-set g_balance_crylink_primary_edgedamage 2.5
-set g_balance_crylink_primary_force 25
-set g_balance_crylink_primary_radius 50
-set g_balance_crylink_primary_speed 2500
-set g_balance_crylink_primary_spread 0.04
-set g_balance_crylink_primary_shots 12
+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_middle_lifetime 5 // range: 10000 full, fades to 20000
-set g_balance_crylink_primary_middle_fadetime 5
-set g_balance_crylink_primary_star_lifetime 2 // range: 800 full, fades to 1300
-set g_balance_crylink_primary_star_fadetime 0.25
+set g_balance_crylink_primary_joinspeed 150
+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_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 0
set g_balance_crylink_secondary_middle_lifetime 5 // range: 10000 full, fades to 10000
set g_balance_crylink_secondary_middle_fadetime 5
// {{{ nex
set g_balance_nex_primary_damage 100
set g_balance_nex_primary_force 600
-set g_balance_nex_primary_refire 0.75
+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_secondary 1
set g_balance_nex_secondary_charge 1
-set g_balance_nex_secondary_charge_rate 0.7
+set g_balance_nex_secondary_charge_rate 0.55
set g_balance_nex_secondary_damage 100
set g_balance_nex_secondary_force 600
set g_balance_nex_secondary_refire 1.5
set g_balance_nex_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
+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_minstanex_ammo 10
// }}}
// {{{ hagar
-set g_balance_hagar_primary_damage 30
-set g_balance_hagar_primary_edgedamage 15
-set g_balance_hagar_primary_force 50
-set g_balance_hagar_primary_radius 65
+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 3000
+set g_balance_hagar_primary_speed 2500
set g_balance_hagar_primary_lifetime 30
-set g_balance_hagar_primary_refire 0.15
+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_ammo 1
// }}}
// {{{ rocketlauncher // TODO
-set g_balance_rocketlauncher_damage 110
+set g_balance_rocketlauncher_damage 120
set g_balance_rocketlauncher_edgedamage 25
set g_balance_rocketlauncher_force 350
-set g_balance_rocketlauncher_radius 125
-set g_balance_rocketlauncher_speed 1000
+set g_balance_rocketlauncher_radius 130
+set g_balance_rocketlauncher_speed 900
set g_balance_rocketlauncher_speedaccel 0
-set g_balance_rocketlauncher_speedstart 1000
-set g_balance_rocketlauncher_lifetime 5
-set g_balance_rocketlauncher_refire 1
+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 45 // max degrees per second
+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_laserguided_speed 1000 //650
-set g_balance_rocketlauncher_laserguided_speedaccel 0
-set g_balance_rocketlauncher_laserguided_speedstart 1000
-set g_balance_rocketlauncher_laserguided_turnrate 0.75 //0.5
-set g_balance_rocketlauncher_laserguided_allow_steal 1
set g_balance_rocketlauncher_remote_damage 90
set g_balance_rocketlauncher_remote_edgedamage 20
set g_balance_rocketlauncher_remote_radius 125
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 75
-set g_balance_campingrifle_primary_headshotaddeddamage 75
+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 1.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
// {{{ 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_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_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_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_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_refire 1
set g_balance_seeker_tag_speed 9000
set g_balance_seeker_tag_spread 0
// End new seeker
_cl_playermodel models/player/umbra.iqm
_cl_playerskin 0
seta crosshair 3
-seta crosshair_color_red 0.6
-seta crosshair_color_green 0.8
-seta crosshair_color_blue 1
+seta crosshair_color "0.6 0.8 1"
seta crosshair_alpha 1
seta crosshair_size 0.35
seta crosshair_dot 1
seta crosshair_pickup_speed 4
seta crosshair_per_weapon 0 "when 1, each gun will display a different crosshair"
seta crosshair_color_override 0 "when 1, crosshair_color_* overrides the per-weapon color"
+seta crosshair_color_per_weapon 1 "when 1, each gun will display a different colored crosshair"
seta crosshair_effect_speed -1 "how fast (in seconds) some crosshair effects should take place, 0 = instant, -1 = 2x weapon switch time"
seta crosshair_effect_scalefade 1 "use scaling and fading for crosshair effects"
seta crosshair_hittest 1 "do a crosshair hit evaluation; also, the crosshair is scaled by the given number when aiming at an enemy, and blurred when aiming at a team mate"
seta crosshair_hittest_blur 1 "blur the crosshair if the shot is obstructed"
seta crosshair_hittest_showimpact 0 "move the crosshair to the actual impact location if obstructed"
seta crosshair_laser "" "crosshair to display when wielding the laser"
-seta crosshair_laser_color_red 1 "crosshair color red component to display when wielding the laser"
-seta crosshair_laser_color_green 0.35 "crosshair color green component to display when wielding the laser"
-seta crosshair_laser_color_blue 0.2 "crosshair color blue component to display when wielding the laser"
+seta crosshair_laser_color "1 0.35 0.2" "crosshair color to display when wielding the laser"
seta crosshair_laser_alpha 0.75 "crosshair alpha value to display when wielding the laser"
seta crosshair_laser_size 0.4 "crosshair size when wielding the laser"
seta crosshair_shotgun "" "crosshair to display when wielding the shotgun"
-seta crosshair_shotgun_color_red 0.7 "crosshair color red component to display when wielding the shotgun"
-seta crosshair_shotgun_color_green 0.7 "crosshair color green component to display when wielding the shotgun"
-seta crosshair_shotgun_color_blue 0.7 "crosshair color blue component to display when wielding the shotgun"
+seta crosshair_shotgun_color "0.7 0.7 0.7" "crosshair color to display when wielding the shotgun"
seta crosshair_shotgun_alpha 1.1 "crosshair alpha value to display when wielding the shotgun"
seta crosshair_shotgun_size 0.65 "crosshair size when wielding the shotgun"
seta crosshair_uzi "" "crosshair to display when wielding the machinegun"
-seta crosshair_uzi_color_red 0.4 "crosshair color red component to display when wielding the machinegun"
-seta crosshair_uzi_color_green 0.9 "crosshair color green component to display when wielding the machinegun"
-seta crosshair_uzi_color_blue 0.35 "crosshair color blue component to display when wielding the machinegun"
+seta crosshair_uzi_color "0.4 0.9 0.35" "crosshair color to display when wielding the machinegun"
seta crosshair_uzi_alpha 0.9 "crosshair alpha value to display when wielding the machinegun"
seta crosshair_uzi_size 0.6 "crosshair size when wielding the machinegun"
seta crosshair_grenadelauncher "" "crosshair to display when wielding the mortar"
-seta crosshair_grenadelauncher_color_red 1 "crosshair color red component to display when wielding the mortar"
-seta crosshair_grenadelauncher_color_green 0.15 "crosshair color green component to display when wielding the mortar"
-seta crosshair_grenadelauncher_color_blue 0 "crosshair color blue component to display when wielding the mortar"
+seta crosshair_grenadelauncher_color "1 0.15 0" "crosshair color to display when wielding the mortar"
seta crosshair_grenadelauncher_alpha 1.15 "crosshair alpha value to display when wielding the mortar"
seta crosshair_grenadelauncher_size 0.7 "crosshair size when wielding the mortar"
seta crosshair_minelayer "" "crosshair to display when wielding the mortar"
-seta crosshair_minelayer_color_red 0.75 "crosshair color red component to display when wielding the mortar"
-seta crosshair_minelayer_color_green 0.75 "crosshair color green component to display when wielding the mortar"
-seta crosshair_minelayer_color_blue 0 "crosshair color blue component to display when wielding the mortar"
+seta crosshair_minelayer_color "0.75 0.75 0" "crosshair color to display when wielding the mortar"
seta crosshair_minelayer_alpha 1.15 "crosshair alpha value to display when wielding the mortar"
seta crosshair_minelayer_size 0.9 "crosshair size when wielding the mortar"
seta crosshair_electro "" "crosshair to display when wielding the electro"
-seta crosshair_electro_color_red 0.35 "crosshair color red component to display when wielding the electro"
-seta crosshair_electro_color_green 0.5 "crosshair color green component to display when wielding the electro"
-seta crosshair_electro_color_blue 1 "crosshair color blue component to display when wielding the electro"
+seta crosshair_electro_color "0.35 0.5 1" "crosshair color to display when wielding the electro"
seta crosshair_electro_alpha 1 "crosshair alpha value to display when wielding the electro"
seta crosshair_electro_size 0.5 "crosshair size when wielding the electro"
seta crosshair_crylink "" "crosshair to display when wielding the crylink"
-seta crosshair_crylink_color_red 0.85 "crosshair color red component to display when wielding the crylink"
-seta crosshair_crylink_color_green 0.25 "crosshair color green component to display when wielding the crylink"
-seta crosshair_crylink_color_blue 1 "crosshair color blue component to display when wielding the crylink"
+seta crosshair_crylink_color "0.85 0.25 1" "crosshair color to display when wielding the crylink"
seta crosshair_crylink_alpha 0.85 "crosshair alpha value to display when wielding the crylink"
seta crosshair_crylink_size 0.4 "crosshair size when wielding the crylink"
seta crosshair_nex "" "crosshair to display when wielding the nex gun"
-seta crosshair_nex_color_red 0 "crosshair color red component to display when wielding the nex gun"
-seta crosshair_nex_color_green 0.9 "crosshair color green component to display when wielding the nex gun"
-seta crosshair_nex_color_blue 1 "crosshair color blue component to display when wielding the nex gun"
+seta crosshair_nex_color "0 0.9 1" "crosshair color to display when wielding the nex gun"
seta crosshair_nex_alpha 0.85 "crosshair alpha value to display when wielding the nex gun"
seta crosshair_nex_size 0.65 "crosshair size when wielding the nex gun"
seta crosshair_hagar "" "crosshair to display when wielding the hagar"
-seta crosshair_hagar_color_red 0.85 "crosshair color red component to display when wielding the hagar"
-seta crosshair_hagar_color_green 0.5 "crosshair color green component to display when wielding the hagar"
-seta crosshair_hagar_color_blue 0.35 "crosshair color blue component to display when wielding the hagar"
+seta crosshair_hagar_color "0.85 0.5 0.35" "crosshair color to display when wielding the hagar"
seta crosshair_hagar_alpha 1 "crosshair alpha value to display when wielding the hagar"
seta crosshair_hagar_size 0.8 "crosshair size when wielding the hagar"
seta crosshair_rocketlauncher "" "crosshair to display when wielding the rocketlauncher"
-seta crosshair_rocketlauncher_color_red 1 "crosshair color red component to display when wielding the rocketlauncher"
-seta crosshair_rocketlauncher_color_green 0.75 "crosshair color green component to display when wielding the rocketlauncher"
-seta crosshair_rocketlauncher_color_blue 0.2 "crosshair color blue component to display when wielding the rocketlauncher"
+seta crosshair_rocketlauncher_color "1 0.75 0.2" "crosshair color to display when wielding the rocketlauncher"
seta crosshair_rocketlauncher_alpha 1 "crosshair alpha value to display when wielding the rocketlauncher"
seta crosshair_rocketlauncher_size 0.5875 "crosshair size when wielding the rocketlauncher"
seta crosshair_porto "" "crosshair to display when wielding the porto"
-seta crosshair_porto_color_red 0.5 "crosshair color red component to display when wielding the porto"
-seta crosshair_porto_color_green 1 "crosshair color green component to display when wielding the porto"
-seta crosshair_porto_color_blue 0.5 "crosshair color blue component to display when wielding the porto"
+seta crosshair_porto_color "0.5 1 0.5" "crosshair color to display when wielding the porto"
seta crosshair_porto_alpha 0.85 "crosshair alpha value to display when wielding the porto"
seta crosshair_porto_size 0.6 "crosshair size when wielding the porto"
seta crosshair_minstanex "" "crosshair to display when wielding the minstanex gun"
-seta crosshair_minstanex_color_red 0.65 "crosshair color red component to display when wielding the minstanex gun"
-seta crosshair_minstanex_color_green 0.65 "crosshair color green component to display when wielding the minstanex gun"
-seta crosshair_minstanex_color_blue 1 "crosshair color blue component to display when wielding the minstanex gun"
+seta crosshair_minstanex_color "0.65 0.65 1" "crosshair color to display when wielding the minstanex gun"
seta crosshair_minstanex_alpha 1 "crosshair alpha value to display when wielding the minstanex gun"
seta crosshair_minstanex_size 0.4 "crosshair size when wielding the minstanex gun"
seta crosshair_hook "" "crosshair to display when wielding the hook"
-seta crosshair_hook_color_red 0.65 "crosshair color red component to display when wielding the hook"
-seta crosshair_hook_color_green 1 "crosshair color green component to display when wielding the hook"
-seta crosshair_hook_color_blue 0.85 "crosshair color blue component to display when wielding the hook"
+seta crosshair_hook_color "0.65 1 0.85" "crosshair color to display when wielding the hook"
seta crosshair_hook_alpha 0.85 "crosshair alpha value to display when wielding the hook"
seta crosshair_hook_size 0.5 "crosshair size when wielding the hook"
seta crosshair_hlac "" "crosshair to display when wielding the H.L.A.C"
-seta crosshair_hlac_color_red 1 "crosshair color red component to display when wielding the H.L.A.C."
-seta crosshair_hlac_color_green 0.65 "crosshair color green component to display when wielding the H.L.A.C."
-seta crosshair_hlac_color_blue 0.2 "crosshair color blue component to display when wielding the H.L.A.C."
+seta crosshair_hlac_color "1 0.65 0.2" "crosshair color to display when wielding the H.L.A.C."
seta crosshair_hlac_alpha 1 "crosshair alpha value to display when wielding the H.L.A.C."
seta crosshair_hlac_size 0.6 "crosshair size when wielding the H.L.A.C."
seta crosshair_seeker "" "crosshair to display when wielding the TAG Seeker"
-seta crosshair_seeker_color_red 1 "crosshair color red component to display when wielding the TAG seeker"
-seta crosshair_seeker_color_green 0.35 "crosshair color green component to display when wielding the TAG seeker"
-seta crosshair_seeker_color_blue 0.35 "crosshair color blue component to display when wielding the TAG seeker"
+seta crosshair_seeker_color "1 0.35 0.35" "crosshair color to display when wielding the TAG seeker"
seta crosshair_seeker_alpha 0.9 "crosshair alpha value to display when wielding the TAG seeker"
seta crosshair_seeker_size 0.8 "crosshair size when wielding the TAG seeker"
seta crosshair_campingrifle "" "crosshair to display when wielding the campingrifle"
-seta crosshair_campingrifle_color_red 0.85 "crosshair color red component to display when wielding the campingrifle"
-seta crosshair_campingrifle_color_green 0.5 "crosshair color green component to display when wielding the campingrifle"
-seta crosshair_campingrifle_color_blue 0.25 "crosshair color blue component to display when wielding the campingrifle"
+seta crosshair_campingrifle_color "0.85 0.5 0.25" "crosshair color to display when wielding the campingrifle"
seta crosshair_campingrifle_alpha 1 "crosshair alpha value to display when wielding the campingrifle"
seta crosshair_campingrifle_size 0.65 "crosshair size when wielding the campingrifle"
seta crosshair_tuba "" "crosshair to display when wielding the tuba"
-seta crosshair_tuba_color_red 0.85 "crosshair color red component to display when wielding the tuba"
-seta crosshair_tuba_color_green 0.5 "crosshair color green component to display when wielding the tuba"
-seta crosshair_tuba_color_blue 0.25 "crosshair color blue component to display when wielding the tuba"
+seta crosshair_tuba_color "0.85 0.5 0.25" "crosshair color to display when wielding the tuba"
seta crosshair_tuba_alpha 1 "crosshair alpha value to display when wielding the tuba"
seta crosshair_tuba_size 1 "crosshair size when wielding the tuba"
seta crosshair_fireball "" "crosshair to display when wielding the fireball"
-seta crosshair_fireball_color_red 0.2 "crosshair color red component to display when wielding the fireball"
-seta crosshair_fireball_color_green 1.0 "crosshair color green component to display when wielding the fireball"
-seta crosshair_fireball_color_blue 0.2 "crosshair color blue component to display when wielding the fireball"
+seta crosshair_fireball_color "0.2 1.0 0.2" "crosshair color to display when wielding the fireball"
seta crosshair_fireball_alpha 1 "crosshair alpha value to display when wielding the fireball"
seta crosshair_fireball_size 1 "crosshair size when wielding the fireball"
seta crosshair_ring_size 2 "bullet counter ring size for Rifle, velocity ring for Nex"
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_laserguided_missile 0 "if set to 1 the rockets of the rocket launcher can be steered using a laserpointer"
+set g_weaponarena_random_with_laser "1" "additionally, always provide the laser in random weapon arena games"
set g_midair 0 "if set to 1 you can only apply damage to your opponent while he is airborne"
set g_midair_shieldtime 0.3 "number of seconds you are still invincible since you lost contact to the ground"
set g_spawnsound 1 "set to 0 if you don't want to hear the spawn sound when a player spawns"
seta hud_panel_weapons_label 1 "1 = show number of weapon, 2 = show bound key of weapon"
seta hud_panel_weapons_complainbubble_time 1 "time that a new entry stays until it fades out"
seta hud_panel_weapons_complainbubble_fadetime 0.25 "fade out time"
-seta hud_panel_weapons_accuracy 1 "show accuracy color as the weapon icon background"
-seta hud_panel_weapons_accuracy_color0 "1 0 0"
-seta hud_panel_weapons_accuracy_color1 "1 1 0"
-seta hud_panel_weapons_accuracy_color2 "0 1 0"
-seta hud_panel_weapons_accuracy_color_levels "0 20 100" "accuracy values at which a specified color (hud_panel_weapons_accuracy_color<X>) will be used. If your accuracy is between 2 of these values then a mix of the Xth and X+1th colors will be used. You can specify up to 10 values, in increasing order"
+seta hud_panel_weapons_accuracy 1 "show accuracy color as the weapon icon background; colors can be configured with accuracy_color* cvars"
seta hud_panel_weapons_ammo 1 "show ammo as a status bar"
seta hud_panel_weapons_ammo_full_shells 50 "show 100% of the status bar at this ammo count"
seta hud_panel_weapons_ammo_full_nails 200 "show 100% of the status bar at this ammo count"
seta scoreboard_border_thickness 1 "scoreboard border thickness"
seta scoreboard_accuracy_border_thickness 1 "accuracy stats border thickness"
seta scoreboard_accuracy_doublerows 0 "use two rows instead of one"
-seta scoreboard_accuracy 1 "show weapon accuracy stats panel on scoreboard"
+seta scoreboard_accuracy 1 "show weapon accuracy stats panel on scoreboard; colors can be configured with accuracy_color* cvars"
seta scoreboard_color_bg_r 0 "red color component of the scoreboard background"
seta scoreboard_color_bg_g 0.4 "green color component of the scoreboard background"
seta scoreboard_color_bg_b 0.6 "blue color component of the scoreboard background"
seta scoreboard_offset_right 0.148 "how many pixels the scoreboard is offset from the right screen edge"
seta scoreboard_bg_scale 0.25 "scale for the tiled scoreboard background"
+seta accuracy_color_levels "0 20 100" "accuracy values at which a specified color (accuracy_color<X>) will be used. If your accuracy is between 2 of these values then a mix of the Xth and X+1th colors will be used. You can specify up to 10 values, in increasing order"
+seta accuracy_color0 "1 0 0"
+seta accuracy_color1 "1 1 0"
+seta accuracy_color2 "0 1 0"
+
// for menu server list (eventually make them have engine support?)
seta menu_slist_showfull 1 "show servers even if they are full and have no slots to join"
seta menu_slist_showempty 1 "show servers even if they are no empty and have no opponents to play against"
// for menu weapon arena
set menu_weaponarena_with_laser 0 "also enable the Laser in this weapon arena"
-seta menu_maxplayers 8 "maxplayers value when the menu starts a game"
+seta menu_maxplayers 16 "maxplayers value when the menu starts a game"
// command executed before loading a map by the menu
// makes sure maxplayers is at least minplayers or bot_number + 1
mod_q3shader_default_polygonoffset -14
mod_q3shader_default_polygonfactor 0
+// allow fullbright
+set sv_allow_fullbright 0 "when set, clients may use r_fullbright on this server without getting a night vision effect overlay"
+
+// auto-teams (team selection by player ID)
+// any player not listed is forced to spectate
+set g_forced_team_red "" "list of player IDs for red team"
+set g_forced_team_blue "" "list of player IDs for blue team"
+set g_forced_team_yellow "" "list of player IDs for yellow team"
+set g_forced_team_pink "" "list of player IDs for pink team"
+set g_forced_team_otherwise "default" "action if a non listed player joins (can be default for default action, spectate for forcing to spectate, or red, blue, yellow, pink)"
+
// other config files
exec balanceXonotic.cfg
exec ctfscoring-ai.cfg
airfriction 8
gravity 1.3
stretchfactor 0.1
+
+
+// crylink joinexplode effect
+// decal
+// used in qcsrc/client/damage.qc: pointparticles(particleeffectnum("crylink_joinexplode"), org2, '0 0 0', 1)
+effect crylink_joinexplode
+countabsolute 1
+type decal
+tex 47 47
+size 24 24
+alpha 256 256 0
+originjitter 12 12 12
+//lightradius 200
+//lightradiusfade 800
+//lightcolor 3.2 0.4 4
+// purple flare effect
+effect crylink_joinexplode
+countabsolute 1
+type static
+tex 39 39
+color 0x504060 0x504060
+size 24 24
+alpha 256 256 512
+// purple sparks
+effect crylink_joinexplode
+count 40
+type spark
+tex 41 41
+color 0xA040C0 0xA040C0
+bounce 2
+size 6 6
+alpha 256 256 1024
+velocityjitter 512 512 512
+// purple splash
+effect crylink_joinexplode
+count 1.5
+type static
+color 0xE070FF 0xE070FF
+size 16 16
+alpha 256 256 512
+velocityjitter 32 32 32
+// purple splash
+effect crylink_joinexplode
+count 3
+type static
+color 0xE070FF 0xE070FF
+size 16 16
+alpha 256 256 1024
+velocityjitter 256 256 256
+
seta hud_panel_healtharmor_bg_alpha ""
seta hud_panel_healtharmor_bg_border ""
seta hud_panel_healtharmor_bg_padding ""
-seta hud_panel_healtharmor_flip "0
+seta hud_panel_healtharmor_flip "0"
seta hud_panel_healtharmor_iconalign "4"
seta hud_panel_healtharmor_baralign "4"
seta hud_panel_healtharmor_progressbar "1"
seta hud_panel_healtharmor_bg_alpha ""
seta hud_panel_healtharmor_bg_border ""
seta hud_panel_healtharmor_bg_padding ""
-seta hud_panel_healtharmor_flip "0
+seta hud_panel_healtharmor_flip "0"
seta hud_panel_healtharmor_iconalign "0"
seta hud_panel_healtharmor_baralign "0"
seta hud_panel_healtharmor_progressbar "0"
-// These have been modified from Nexuiz 2.4.2's physicsQBR.cfg file and a bunch of other crap div0 threw on here :P
-// DO NOT SCREW WITH friction on land, edge friction, step height, or sv_airaccel_qw
-sv_gravity 819
-sv_maxspeed 420
-sv_maxairspeed 283
+// "NoQWBunny" physics based on XPM
+sv_gravity 800
+sv_maxspeed 320
+sv_maxairspeed 424
sv_stopspeed 100
sv_accelerate 13
-sv_airaccelerate 6
-sv_friction 9.6 // higher values make you slide less
-edgefriction 1 // div0 says no! lol
+sv_airaccelerate 2
+sv_friction 8
+edgefriction 1
sv_stepheight 26
-sv_jumpvelocity 304
+// 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 // pain in the ass to tweak without screwing up the strafing
-sv_airaccel_qw -0.93 //given a negative value to combat potential cheats, was told by divVerent not to mess with it
+sv_airaccel_sideways_friction 0
+sv_airaccel_qw -0.8
-sv_airstopaccelerate 0
-sv_airstrafeaccelerate 0
-sv_maxairstrafespeed 0
-sv_airstrafeaccel_qw 0
-sv_aircontrol 0
-sv_aircontrol_penalty 0
+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 0
+sv_airspeedlimit_nonqw 800
sv_warsowbunny_turnaccel 0
sv_warsowbunny_accel 0.1593
sv_warsowbunny_topspeed 925
sv_friction_on_land 0
sv_doublejump 0
sv_jumpspeedcap_min ""
-sv_jumpspeedcap_max 0.38
-sv_jumpspeedcap_max_disable_on_ramps 0
+sv_jumpspeedcap_max ""
+sv_jumpspeedcap_max_disable_on_ramps 1
--- /dev/null
+// These have been modified from Nexuiz 2.4.2's physicsQBR.cfg file and a bunch of other crap div0 threw on here :P
+// DO NOT SCREW WITH friction on land, edge friction, step height, or sv_airaccel_qw
+sv_gravity 819
+sv_maxspeed 420
+sv_maxairspeed 283
+
+sv_stopspeed 100
+sv_accelerate 13
+sv_airaccelerate 6
+sv_friction 9.6 // higher values make you slide less
+edgefriction 1 // div0 says no! lol
+sv_stepheight 26
+sv_jumpvelocity 304
+sv_wateraccelerate -1
+sv_waterfriction -1
+sv_airaccel_sideways_friction 0 // pain in the ass to tweak without screwing up the strafing
+sv_airaccel_qw -0.93 //given a negative value to combat potential cheats, was told by divVerent not to mess with it
+
+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 0.38
+sv_jumpspeedcap_max_disable_on_ramps 0
// "NoQWBunny" physics based on XPM
sv_gravity 800
-sv_maxspeed 320
+sv_maxspeed 400
sv_maxairspeed 400
sv_stopspeed 100
string weaponorder_bypriority;
float nex_charge_movingavg;
+
+float serverflags;
nex_scope = !ReadByte();
campingrifle_scope = !ReadByte();
+ serverflags = ReadByte();
+
if(!postinit)
PostInit();
}
// next R_RenderScene call
drawstring('0 0 0', "", '1 1 0', '1 1 1', 0, 0);
- if(cvar("r_fakelight") >= 2 || cvar("r_fullbright"))
+ if(cvar("r_fakelight") >= 2 || cvar("r_fullbright") >= 1)
+ if not(serverflags & SERVERFLAG_ALLOW_FULLBRIGHT)
{
// apply night vision effect
vector rgb, tc_00, tc_01, tc_10, tc_11;
string wcross_wep, wcross_name;
float wcross_scale, wcross_blur;
- wcross_color_x = cvar("crosshair_color_red");
- wcross_color_y = cvar("crosshair_color_green");
- wcross_color_z = cvar("crosshair_color_blue");
- if (cvar("crosshair_per_weapon")) {
+ if (cvar("crosshair_per_weapon") || cvar("crosshair_color_per_weapon")) {
e = get_weaponinfo(activeweapon);
if (e && e.netname != "")
{
wcross_wep = e.netname;
- wcross_resolution *= cvar(strcat("crosshair_", wcross_wep, "_size"));
- if (wcross_resolution == 0)
- return;
- wcross_alpha *= cvar(strcat("crosshair_", wcross_wep, "_alpha"));
- if (wcross_alpha == 0)
- return;
-
- wcross_style = cvar_string(strcat("crosshair_", wcross_wep));
- if(wcross_style == "")
- wcross_style = e.netname;
-
- if(!cvar("crosshair_color_override"))
+ if(cvar("crosshair_per_weapon"))
{
- wcross_color_x = cvar(strcat("crosshair_", wcross_wep, "_color_red"));
- wcross_color_y = cvar(strcat("crosshair_", wcross_wep, "_color_green"));
- wcross_color_z = cvar(strcat("crosshair_", wcross_wep, "_color_blue"));
+ wcross_resolution *= cvar(strcat("crosshair_", wcross_wep, "_size"));
+ if (wcross_resolution == 0)
+ return;
+ wcross_alpha *= cvar(strcat("crosshair_", wcross_wep, "_alpha"));
+ if (wcross_alpha == 0)
+ return;
+
+ wcross_style = cvar_string(strcat("crosshair_", wcross_wep));
+ if(wcross_style == "" || wcross_style == "0")
+ wcross_style = wcross_wep;
}
}
}
+ if(wcross_wep != "" && cvar("crosshair_color_per_weapon"))
+ wcross_color = stov(cvar_string(strcat("crosshair_", wcross_wep, "_color")));
+ else
+ wcross_color = stov(cvar_string("crosshair_color"));
wcross_name = strcat("gfx/crosshair", wcross_style);
case HUD_NORMAL:
// do some accuracy var caching
float i;
- if(cvar_string("hud_panel_weapons_accuracy_color_levels") != acc_color_levels)
if(!(gametype == GAME_RACE || gametype == GAME_CTS))
{
- if(acc_color_levels)
- strunzone(acc_color_levels);
- acc_color_levels = strzone(cvar_string("hud_panel_weapons_accuracy_color_levels"));
- acc_levels = tokenize(acc_color_levels);
- if (acc_levels > MAX_ACCURACY_LEVELS)
- acc_levels = MAX_ACCURACY_LEVELS;
-
- for (i = 0; i < acc_levels; ++i)
- acc_lev[i] = stof(argv(i));
+ if(cvar_string("accuracy_color_levels") != acc_color_levels)
+ {
+ if(acc_color_levels)
+ strunzone(acc_color_levels);
+ acc_color_levels = strzone(cvar_string("accuracy_color_levels"));
+ acc_levels = tokenize(acc_color_levels);
+ if (acc_levels > MAX_ACCURACY_LEVELS)
+ acc_levels = MAX_ACCURACY_LEVELS;
+
+ for (i = 0; i < acc_levels; ++i)
+ acc_lev[i] = stof(argv(i));
+ }
+ // let know that acc_col[] needs to be loaded
+ acc_col_x[0] = -1;
}
HUD_Main(); // always run these functions for alpha checks
var float autocvar_cl_casings_ticrate = 0.1;
var float autocvar_cl_casings_sloppy = 1;
-var float autocvar_cl_gentle;
-var float autocvar_cl_gentle_gibs;
-var float autocvar_cl_gentle_messages;
-
var float autocvar_scoreboard_color_bg_team;
var float autocvar__menu_alpha;
var float autocvar__hud_configure;
var float autocvar_hud_configure_teamcolorforced;
-var float autocvar_hud_configure_checkcollisions;
var float autocvar_hud_configure_bg_minalpha;
var float autocvar_hud_configure_grid;
var float autocvar_hud_configure_grid_xsize;
var float autocvar__con_chat_maximized;
var string autocvar__hud_panelorder;
-var string autocvar_hud_skin;
var string autocvar_hud_dock;
-var string autocvar_hud_dock_color;
-var float autocvar_hud_dock_color_team;
-var float autocvar_hud_dock_alpha;
var float autocvar_hud_progressbar_alpha;
-var vector autocvar_hud_progressbar_strength_color;
-var vector autocvar_hud_progressbar_shield_color;
-var vector autocvar_hud_progressbar_health_color;
-var vector autocvar_hud_progressbar_armor_color;
-var vector autocvar_hud_progressbar_fuel_color;
-var vector autocvar_hud_progressbar_nexball_color;
var string autocvar_hud_panel_bg;
var vector autocvar_hud_panel_bg_color;
var float autocvar_hud_panel_fg_alpha;
var float autocvar_hud_panel_weapons;
-var vector autocvar_hud_panel_weapons_pos;
-var vector autocvar_hud_panel_weapons_size;
-var string autocvar_hud_panel_weapons_bg;
-var string autocvar_hud_panel_weapons_bg_color;
-var string autocvar_hud_panel_weapons_bg_color_team;
-var string autocvar_hud_panel_weapons_bg_alpha;
-var string autocvar_hud_panel_weapons_bg_border;
-var string autocvar_hud_panel_weapons_bg_padding;
-var float autocvar_hud_panel_weapons_aspect;
-var float autocvar_hud_panel_weapons_accuracy;
-var float autocvar_hud_panel_weapons_ammo;
-var vector autocvar_hud_panel_weapons_ammo_color;
-var float autocvar_hud_panel_weapons_ammo_alpha;
-var float autocvar_hud_panel_weapons_ammo_full_shells;
-var float autocvar_hud_panel_weapons_ammo_full_nails;
-var float autocvar_hud_panel_weapons_ammo_full_rockets;
-var float autocvar_hud_panel_weapons_ammo_full_cells;
-var float autocvar_hud_panel_weapons_ammo_full_fuel;
-var float autocvar_hud_panel_weapons_label;
-var float autocvar_hud_panel_weapons_complainbubble;
-var float autocvar_hud_panel_weapons_complainbubble_padding;
-var float autocvar_hud_panel_weapons_complainbubble_time;
-var float autocvar_hud_panel_weapons_complainbubble_fadetime;
-var vector autocvar_hud_panel_weapons_complainbubble_color_outofammo;
-var vector autocvar_hud_panel_weapons_complainbubble_color_donthave;
-var vector autocvar_hud_panel_weapons_complainbubble_color_unavailable;
var float autocvar_hud_panel_ammo;
-var vector autocvar_hud_panel_ammo_pos;
-var vector autocvar_hud_panel_ammo_size;
-var string autocvar_hud_panel_ammo_bg;
-var string autocvar_hud_panel_ammo_bg_color;
-var string autocvar_hud_panel_ammo_bg_color_team;
-var string autocvar_hud_panel_ammo_bg_alpha;
-var string autocvar_hud_panel_ammo_bg_border;
-var string autocvar_hud_panel_ammo_bg_padding;
var float autocvar_hud_panel_ammo_onlycurrent;
var float autocvar_hud_panel_ammo_iconalign;
var float autocvar_hud_panel_powerups;
-var vector autocvar_hud_panel_powerups_pos;
-var vector autocvar_hud_panel_powerups_size;
-var string autocvar_hud_panel_powerups_bg;
-var string autocvar_hud_panel_powerups_bg_color;
-var string autocvar_hud_panel_powerups_bg_color_team;
-var string autocvar_hud_panel_powerups_bg_alpha;
-var string autocvar_hud_panel_powerups_bg_border;
-var string autocvar_hud_panel_powerups_bg_padding;
-var float autocvar_hud_panel_powerups_flip;
-var float autocvar_hud_panel_powerups_iconalign;
-var float autocvar_hud_panel_powerups_baralign;
-var float autocvar_hud_panel_powerups_progressbar;
var float autocvar_hud_panel_healtharmor;
-var vector autocvar_hud_panel_healtharmor_pos;
-var vector autocvar_hud_panel_healtharmor_size;
-var string autocvar_hud_panel_healtharmor_bg;
-var string autocvar_hud_panel_healtharmor_bg_color;
-var string autocvar_hud_panel_healtharmor_bg_color_team;
-var string autocvar_hud_panel_healtharmor_bg_alpha;
-var string autocvar_hud_panel_healtharmor_bg_border;
-var string autocvar_hud_panel_healtharmor_bg_padding;
-var float autocvar_hud_panel_healtharmor_flip;
-var float autocvar_hud_panel_healtharmor_iconalign;
-var float autocvar_hud_panel_healtharmor_baralign;
-var float autocvar_hud_panel_healtharmor_progressbar;
var float autocvar_hud_panel_notify;
-var vector autocvar_hud_panel_notify_pos;
-var vector autocvar_hud_panel_notify_size;
-var string autocvar_hud_panel_notify_bg;
-var string autocvar_hud_panel_notify_bg_color;
-var string autocvar_hud_panel_notify_bg_color_team;
-var string autocvar_hud_panel_notify_bg_alpha;
-var string autocvar_hud_panel_notify_bg_border;
-var string autocvar_hud_panel_notify_bg_padding;
-var float autocvar_hud_panel_notify_print;
-var float autocvar_hud_panel_notify_time;
-var float autocvar_hud_panel_notify_fadetime;
-var float autocvar_hud_panel_notify_flip;
var float autocvar_hud_panel_timer;
-var vector autocvar_hud_panel_timer_pos;
-var vector autocvar_hud_panel_timer_size;
-var string autocvar_hud_panel_timer_bg;
-var string autocvar_hud_panel_timer_bg_color;
-var string autocvar_hud_panel_timer_bg_color_team;
-var string autocvar_hud_panel_timer_bg_alpha;
-var string autocvar_hud_panel_timer_bg_border;
-var string autocvar_hud_panel_timer_bg_padding;
var float autocvar_hud_panel_timer_increment;
var float autocvar_hud_panel_radar;
-var vector autocvar_hud_panel_radar_pos;
-var vector autocvar_hud_panel_radar_size;
-var string autocvar_hud_panel_radar_bg;
-var string autocvar_hud_panel_radar_bg_color;
-var string autocvar_hud_panel_radar_bg_color_team;
-var string autocvar_hud_panel_radar_bg_alpha;
-var string autocvar_hud_panel_radar_bg_border;
-var string autocvar_hud_panel_radar_bg_padding;
var float autocvar_hud_panel_score;
-var vector autocvar_hud_panel_score_pos;
-var vector autocvar_hud_panel_score_size;
-var string autocvar_hud_panel_score_bg;
-var string autocvar_hud_panel_score_bg_color;
-var string autocvar_hud_panel_score_bg_color_team;
-var string autocvar_hud_panel_score_bg_alpha;
-var string autocvar_hud_panel_score_bg_border;
-var string autocvar_hud_panel_score_bg_padding;
var float autocvar_hud_panel_racetimer;
-var vector autocvar_hud_panel_racetimer_pos;
-var vector autocvar_hud_panel_racetimer_size;
-var string autocvar_hud_panel_racetimer_bg;
-var string autocvar_hud_panel_racetimer_bg_color;
-var string autocvar_hud_panel_racetimer_bg_color_team;
-var string autocvar_hud_panel_racetimer_bg_alpha;
-var string autocvar_hud_panel_racetimer_bg_border;
-var string autocvar_hud_panel_racetimer_bg_padding;
var float autocvar_hud_panel_vote;
-var vector autocvar_hud_panel_vote_pos;
-var vector autocvar_hud_panel_vote_size;
-var string autocvar_hud_panel_vote_bg;
-var string autocvar_hud_panel_vote_bg_color;
-var string autocvar_hud_panel_vote_bg_color_team;
-var string autocvar_hud_panel_vote_bg_alpha;
-var string autocvar_hud_panel_vote_bg_border;
-var string autocvar_hud_panel_vote_bg_padding;
-var float autocvar_hud_panel_vote_alreadyvoted_alpha;
var float autocvar_hud_panel_modicons;
-var vector autocvar_hud_panel_modicons_pos;
-var vector autocvar_hud_panel_modicons_size;
-var string autocvar_hud_panel_modicons_bg;
-var string autocvar_hud_panel_modicons_bg_color;
-var string autocvar_hud_panel_modicons_bg_color_team;
-var string autocvar_hud_panel_modicons_bg_alpha;
-var string autocvar_hud_panel_modicons_bg_border;
-var string autocvar_hud_panel_modicons_bg_padding;
var float autocvar_hud_panel_pressedkeys;
-var vector autocvar_hud_panel_pressedkeys_pos;
-var vector autocvar_hud_panel_pressedkeys_size;
-var string autocvar_hud_panel_pressedkeys_bg;
-var string autocvar_hud_panel_pressedkeys_bg_color;
-var string autocvar_hud_panel_pressedkeys_bg_color_team;
-var string autocvar_hud_panel_pressedkeys_bg_alpha;
-var string autocvar_hud_panel_pressedkeys_bg_border;
-var string autocvar_hud_panel_pressedkeys_bg_padding;
-var float autocvar_hud_panel_pressedkeys_aspect;
var float autocvar_hud_panel_chat;
-var vector autocvar_hud_panel_chat_pos;
-var vector autocvar_hud_panel_chat_size;
-var string autocvar_hud_panel_chat_bg;
-var string autocvar_hud_panel_chat_bg_color;
-var string autocvar_hud_panel_chat_bg_color_team;
-var string autocvar_hud_panel_chat_bg_alpha;
-var string autocvar_hud_panel_chat_bg_border;
-var string autocvar_hud_panel_chat_bg_padding;
var float autocvar_hud_panel_engineinfo;
-var vector autocvar_hud_panel_engineinfo_pos;
-var vector autocvar_hud_panel_engineinfo_size;
-var string autocvar_hud_panel_engineinfo_bg;
-var string autocvar_hud_panel_engineinfo_bg_color;
-var string autocvar_hud_panel_engineinfo_bg_color_team;
-var string autocvar_hud_panel_engineinfo_bg_alpha;
-var string autocvar_hud_panel_engineinfo_bg_border;
-var string autocvar_hud_panel_engineinfo_bg_padding;
var float autocvar_hud_panel_infomessages;
-var vector autocvar_hud_panel_infomessages_pos;
-var vector autocvar_hud_panel_infomessages_size;
-var string autocvar_hud_panel_infomessages_bg;
-var string autocvar_hud_panel_infomessages_bg_color;
-var string autocvar_hud_panel_infomessages_bg_color_team;
-var string autocvar_hud_panel_infomessages_bg_alpha;
-var string autocvar_hud_panel_infomessages_bg_border;
-var string autocvar_hud_panel_infomessages_bg_padding;
var float autocvar_hud_panel_infomessages_flip;
var float autocvar_scoreboard_border_thickness;
org_z = ReadShort() * 4 + 2;
vel = decompressShortVector(ReadShort());
- if(autocvar_cl_gentle_gibs || cvar("cl_gentle"))
+ float cl_gentle_gibs = cvar("cl_gentle_gibs");
+ if(cl_gentle_gibs || cvar("cl_gentle"))
type |= 0x80; // set gentle bit
if(type & 0x80)
{
- if(autocvar_cl_gentle_gibs == 2)
+ if(cl_gentle_gibs == 2)
gentle_prefix = "";
- else if(autocvar_cl_gentle_gibs == 3)
+ else if(cl_gentle_gibs == 3)
gentle_prefix = "happy_";
else
gentle_prefix = "morphed_";
gentle_prefix = "particlegibs_";
}
- if not(autocvar_cl_gentle_gibs || cvar("cl_gentle"))
+ if not(cl_gentle_gibs || cvar("cl_gentle"))
amount *= 1 - cvar("cl_nogibs");
if(cvar("ekg"))
==================
*/
+#define HUD_Write(s) fputs(fh, s)
+// q: quoted, n: not quoted
+#define HUD_Write_Cvar_n(cvar) HUD_Write(strcat("seta ", cvar, " ", cvar_string(cvar), "\n"))
+#define HUD_Write_Cvar_q(cvar) HUD_Write(strcat("seta ", cvar, " \"", cvar_string(cvar), "\"\n"))
+#define HUD_Write_PanelCvar_n(cvar_suf) HUD_Write_Cvar_n(strcat("hud_panel_", panel_name, cvar_suf))
+#define HUD_Write_PanelCvar_q(cvar_suf) HUD_Write_Cvar_q(strcat("hud_panel_", panel_name, cvar_suf))
// Save the config
void HUD_Panel_ExportCfg(string cfgname)
{
float fh;
- fh = fopen(strcat("hud_", autocvar_hud_skin, "_", cfgname, ".cfg"), FILE_WRITE);
+ string filename = strcat("hud_", cvar_string("hud_skin"), "_", cfgname, ".cfg");
+ fh = fopen(filename, FILE_WRITE);
if(fh >= 0)
{
- fputs(fh, strcat("seta hud_skin \"", cvar_string("hud_skin"), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_bg \"", cvar_string("hud_panel_bg"), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_bg_color \"", cvar_string("hud_panel_bg_color"), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_bg_color_team \"", cvar_string("hud_panel_bg_color_team"), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_bg_alpha \"", cvar_string("hud_panel_bg_alpha"), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_bg_border \"", cvar_string("hud_panel_bg_border"), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_bg_padding \"", cvar_string("hud_panel_bg_padding"), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_fg_alpha \"", cvar_string("hud_panel_fg_alpha"), "\"", "\n"));
- fputs(fh, "\n");
-
- fputs(fh, strcat("seta hud_dock \"", cvar_string("hud_dock"), "\"", "\n"));
- fputs(fh, strcat("seta hud_dock_color \"", cvar_string("hud_dock_color"), "\"", "\n"));
- fputs(fh, strcat("seta hud_dock_color_team \"", cvar_string("hud_dock_color_team"), "\"", "\n"));
- fputs(fh, strcat("seta hud_dock_alpha \"", cvar_string("hud_dock_alpha"), "\"", "\n"));
- fputs(fh, "\n");
-
- fputs(fh, strcat("seta hud_progressbar_alpha \"", cvar_string("hud_progressbar_alpha"), "\"", "\n"));
- fputs(fh, strcat("seta hud_progressbar_strength_color \"", cvar_string("hud_progressbar_strength_color"), "\"", "\n"));
- fputs(fh, strcat("seta hud_progressbar_shield_color \"", cvar_string("hud_progressbar_shield_color"), "\"", "\n"));
- fputs(fh, strcat("seta hud_progressbar_health_color \"", cvar_string("hud_progressbar_health_color"), "\"", "\n"));
- fputs(fh, strcat("seta hud_progressbar_armor_color \"", cvar_string("hud_progressbar_armor_color"), "\"", "\n"));
- fputs(fh, strcat("seta hud_progressbar_fuel_color \"", cvar_string("hud_progressbar_fuel_color"), "\"", "\n"));
- fputs(fh, strcat("seta hud_progressbar_nexball_color \"", cvar_string("hud_progressbar_nexball_color"), "\"", "\n"));
- fputs(fh, "\n");
-
- fputs(fh, strcat("seta _hud_panelorder \"", cvar_string("_hud_panelorder"), "\"", "\n"));
- fputs(fh, "\n");
-
- fputs(fh, strcat("seta hud_configure_grid \"", cvar_string("hud_configure_grid"), "\"", "\n"));
- fputs(fh, strcat("seta hud_configure_grid_xsize \"", cvar_string("hud_configure_grid_xsize"), "\"", "\n"));
- fputs(fh, strcat("seta hud_configure_grid_ysize \"", cvar_string("hud_configure_grid_ysize"), "\"", "\n"));
- fputs(fh, "\n");
-
- fputs(fh, strcat("seta scr_centerpos \"", cvar_string("scr_centerpos"), "\"", "\n"));
- fputs(fh, "\n");
+ HUD_Write_Cvar_q("hud_skin");
+ HUD_Write_Cvar_q("hud_panel_bg");
+ HUD_Write_Cvar_q("hud_panel_bg_color");
+ HUD_Write_Cvar_q("hud_panel_bg_color_team");
+ HUD_Write_Cvar_q("hud_panel_bg_alpha");
+ HUD_Write_Cvar_q("hud_panel_bg_border");
+ HUD_Write_Cvar_q("hud_panel_bg_padding");
+ HUD_Write_Cvar_q("hud_panel_fg_alpha");
+ HUD_Write("\n");
+
+ HUD_Write_Cvar_q("hud_dock");
+ HUD_Write_Cvar_q("hud_dock_color");
+ HUD_Write_Cvar_q("hud_dock_color_team");
+ HUD_Write_Cvar_q("hud_dock_alpha");
+ HUD_Write("\n");
+
+ HUD_Write_Cvar_q("hud_progressbar_alpha");
+ HUD_Write_Cvar_q("hud_progressbar_strength_color");
+ HUD_Write_Cvar_q("hud_progressbar_shield_color");
+ HUD_Write_Cvar_q("hud_progressbar_health_color");
+ HUD_Write_Cvar_q("hud_progressbar_armor_color");
+ HUD_Write_Cvar_q("hud_progressbar_fuel_color");
+ HUD_Write_Cvar_q("hud_progressbar_nexball_color");
+ HUD_Write("\n");
+
+ HUD_Write_Cvar_q("_hud_panelorder");
+ HUD_Write("\n");
+
+ HUD_Write_Cvar_q("hud_configure_grid");
+ HUD_Write_Cvar_q("hud_configure_grid_xsize");
+ HUD_Write_Cvar_q("hud_configure_grid_ysize");
+ HUD_Write("\n");
+
+ HUD_Write_Cvar_q("scr_centerpos");
+ HUD_Write("\n");
// common cvars for all panels
float i;
{
HUD_Panel_GetName(i);
- fputs(fh, strcat("seta hud_panel_", panel_name, " ", cvar_string(strcat("hud_panel_", panel_name)), "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_pos \"", cvar_string(strcat("hud_panel_", panel_name, "_pos")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_size \"", cvar_string(strcat("hud_panel_", panel_name, "_size")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_bg \"", cvar_string(strcat("hud_panel_", panel_name, "_bg")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_bg_color \"", cvar_string(strcat("hud_panel_", panel_name, "_bg_color")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_bg_color_team \"", cvar_string(strcat("hud_panel_", panel_name, "_bg_color_team")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_bg_alpha \"", cvar_string(strcat("hud_panel_", panel_name, "_bg_alpha")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_bg_border \"", cvar_string(strcat("hud_panel_", panel_name, "_bg_border")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_bg_padding \"", cvar_string(strcat("hud_panel_", panel_name, "_bg_padding")), "\"", "\n"));
+ HUD_Write_PanelCvar_n("");
+ HUD_Write_PanelCvar_q("_pos");
+ HUD_Write_PanelCvar_q("_size");
+ HUD_Write_PanelCvar_q("_bg");
+ HUD_Write_PanelCvar_q("_bg_color");
+ HUD_Write_PanelCvar_q("_bg_color_team");
+ HUD_Write_PanelCvar_q("_bg_alpha");
+ HUD_Write_PanelCvar_q("_bg_border");
+ HUD_Write_PanelCvar_q("_bg_padding");
switch(i) {
case HUD_PANEL_WEAPONS:
- fputs(fh, strcat("seta hud_panel_", panel_name, "_complainbubble \"", cvar_string(strcat("hud_panel_", panel_name, "_complainbubble")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_complainbubble_padding \"", cvar_string(strcat("hud_panel_", panel_name, "_complainbubble_padding")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_complainbubble_color_outofammo \"", cvar_string(strcat("hud_panel_", panel_name, "_complainbubble_color_outofammo")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_complainbubble_color_donthave \"", cvar_string(strcat("hud_panel_", panel_name, "_complainbubble_color_donthave")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_complainbubble_color_unavailable \"", cvar_string(strcat("hud_panel_", panel_name, "_complainbubble_color_unavailable")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_ammo_color \"", cvar_string(strcat("hud_panel_", panel_name, "_ammo_color")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_ammo_alpha \"", cvar_string(strcat("hud_panel_", panel_name, "_ammo_alpha")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_aspect \"", cvar_string(strcat("hud_panel_", panel_name, "_aspect")), "\"", "\n"));
+ HUD_Write_PanelCvar_q("_complainbubble");
+ HUD_Write_PanelCvar_q("_complainbubble_padding");
+ HUD_Write_PanelCvar_q("_complainbubble_color_outofammo");
+ HUD_Write_PanelCvar_q("_complainbubble_color_donthave");
+ HUD_Write_PanelCvar_q("_complainbubble_color_unavailable");
+ HUD_Write_PanelCvar_q("_ammo_color");
+ HUD_Write_PanelCvar_q("_ammo_alpha");
+ HUD_Write_PanelCvar_q("_aspect");
break;
case HUD_PANEL_AMMO:
- fputs(fh, strcat("seta hud_panel_", panel_name, "_onlycurrent \"", cvar_string(strcat("hud_panel_", panel_name, "_onlycurrent")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_iconalign \"", cvar_string(strcat("hud_panel_", panel_name, "_iconalign")), "\"", "\n"));
+ HUD_Write_PanelCvar_q("_onlycurrent");
+ HUD_Write_PanelCvar_q("_iconalign");
break;
case HUD_PANEL_POWERUPS:
- fputs(fh, strcat("seta hud_panel_", panel_name, "_flip \"", cvar_string(strcat("hud_panel_", panel_name, "_flip")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_iconalign \"", cvar_string(strcat("hud_panel_", panel_name, "_iconalign")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_baralign \"", cvar_string(strcat("hud_panel_", panel_name, "_baralign")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_progressbar \"", cvar_string(strcat("hud_panel_", panel_name, "_progressbar")), "\"", "\n"));
+ HUD_Write_PanelCvar_q("_flip");
+ HUD_Write_PanelCvar_q("_iconalign");
+ HUD_Write_PanelCvar_q("_baralign");
+ HUD_Write_PanelCvar_q("_progressbar");
break;
case HUD_PANEL_HEALTHARMOR:
- fputs(fh, strcat("seta hud_panel_", panel_name, "_flip \"", cvar_string(strcat("hud_panel_", panel_name, "_flip")), "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_iconalign \"", cvar_string(strcat("hud_panel_", panel_name, "_iconalign")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_baralign \"", cvar_string(strcat("hud_panel_", panel_name, "_baralign")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_progressbar \"", cvar_string(strcat("hud_panel_", panel_name, "_progressbar")), "\"", "\n"));
+ HUD_Write_PanelCvar_q("_flip");
+ HUD_Write_PanelCvar_q("_iconalign");
+ HUD_Write_PanelCvar_q("_baralign");
+ HUD_Write_PanelCvar_q("_progressbar");
break;
case HUD_PANEL_NOTIFY:
- fputs(fh, strcat("seta hud_panel_", panel_name, "_flip \"", cvar_string(strcat("hud_panel_", panel_name, "_flip")), "\"", "\n"));
- fputs(fh, strcat("seta hud_panel_", panel_name, "_print \"", cvar_string(strcat("hud_panel_", panel_name, "_print")), "\"", "\n"));
+ HUD_Write_PanelCvar_q("_flip");
+ HUD_Write_PanelCvar_q("_print");
break;
case HUD_PANEL_RADAR:
- fputs(fh, strcat("seta hud_panel_", panel_name, "_foreground_alpha \"", cvar_string(strcat("hud_panel_", panel_name, "_foreground_alpha")), "\"", "\n"));
+ HUD_Write_PanelCvar_q("_foreground_alpha");
break;
case HUD_PANEL_VOTE:
- fputs(fh, strcat("seta hud_panel_", panel_name, "_alreadyvoted_alpha \"", cvar_string(strcat("hud_panel_", panel_name, "_alreadyvoted_alpha")), "\"", "\n"));
+ HUD_Write_PanelCvar_q("_alreadyvoted_alpha");
break;
case HUD_PANEL_PRESSEDKEYS:
- fputs(fh, strcat("seta hud_panel_", panel_name, "_aspect \"", cvar_string(strcat("hud_panel_", panel_name, "_aspect")), "\"", "\n"));
+ HUD_Write_PanelCvar_q("_aspect");
break;
case HUD_PANEL_INFOMESSAGES:
- fputs(fh, strcat("seta hud_panel_", panel_name, "_flip \"", cvar_string(strcat("hud_panel_", panel_name, "_flip")), "\"", "\n"));
+ HUD_Write_PanelCvar_q("_flip");
break;
}
- fputs(fh, "\n");
+ HUD_Write("\n");
}
- fputs(fh, strcat("menu_sync", "\n")); // force the menu to reread the cvars, so that the dialogs are updated
+ HUD_Write("menu_sync\n"); // force the menu to reread the cvars, so that the dialogs are updated
- print("^2Successfully exported to hud_", autocvar_hud_skin, "_", cfgname, ".cfg! (Note: It's saved in data/data/)\n");
+ print("^2Successfully exported to ", filename, "! (Note: It's saved in data/data/)\n");
+ fclose(fh);
}
- fclose(fh);
+ else
+ print("^1Couldn't write to ", filename, "\n");
}
const float hlBorderSize = 4;
else // push it downwards
myTarget_y = panel_pos_y + panel_size_y;
}
- if(cvar("hud_configure_checkcollisions_debug"))
- drawfill(panel_pos, panel_size, '1 1 0', .3, DRAWFLAG_NORMAL);
+ //if(cvar("hud_configure_checkcollisions_debug"))
+ //drawfill(panel_pos, panel_size, '1 1 0', .3, DRAWFLAG_NORMAL);
}
return myTarget;
vector mySize;
mySize = panel_size;
- if(cvar("hud_configure_checkcollisions_debug"))
- drawfill(pos, mySize, '1 1 1', .2, DRAWFLAG_NORMAL);
+ //if(cvar("hud_configure_checkcollisions_debug"))
+ //drawfill(pos, mySize, '1 1 1', .2, DRAWFLAG_NORMAL);
if(autocvar_hud_configure_grid)
{
else
mySize_y = min(mySize_y, dist_y);
}
- if(cvar("hud_configure_checkcollisions_debug"))
- drawfill(panel_pos, panel_size, '1 1 0', .3, DRAWFLAG_NORMAL);
+ //if(cvar("hud_configure_checkcollisions_debug"))
+ //drawfill(panel_pos, panel_size, '1 1 0', .3, DRAWFLAG_NORMAL);
}
return mySize;
if(myPos_y + mySize_y > vid_conheight)
mySize_y = vid_conheight - myPos_y;
- if(cvar("hud_configure_checkcollisions_debug"))
- drawfill(myPos, mySize, '1 1 1', .2, DRAWFLAG_NORMAL);
+ //if(cvar("hud_configure_checkcollisions_debug"))
+ //drawfill(myPos, mySize, '1 1 1', .2, DRAWFLAG_NORMAL);
// before checkresize, otherwise panel can be snapped partially inside another panel or panel aspect ratio can be broken
if(autocvar_hud_configure_grid)
myPos_y = resizeorigin_y;
}
- if(cvar("hud_configure_checkcollisions_debug"))
- drawfill(myPos, mySize, '0 1 0', .3, DRAWFLAG_NORMAL);
+ //if(cvar("hud_configure_checkcollisions_debug"))
+ //drawfill(myPos, mySize, '0 1 0', .3, DRAWFLAG_NORMAL);
HUD_Panel_GetName(highlightedPanel);
string s;
if (prev_pos != panel_pos || prev_size != panel_size)
{
- hud_configure_checkcollisions = (!(hudShiftState & S_CTRL) && autocvar_hud_configure_checkcollisions);
+ hud_configure_checkcollisions = (!(hudShiftState & S_CTRL) && cvar("hud_configure_checkcollisions"));
// backup!
panel_pos_backup = prev_pos;
panel_size_backup = prev_size;
}
}
- float i, weapid, fade, weapon_stats, weapon_number, weapon_cnt;
+ float i, weapid, wpnalpha, weapon_cnt;
weapon_cnt = 0;
for(i = WEP_FIRST; i <= WEP_LAST; ++i)
{
panel_size -= '2 2 0' * panel_bg_padding;
}
- // hits
- weapon_stats = getstati(STAT_DAMAGE_HITS);
- weapon_number = weapon_stats & 63;
- weapon_hits[weapon_number-WEP_FIRST] = floor(weapon_stats / 64);
- // fired
- weapon_stats = getstati(STAT_DAMAGE_FIRED);
- weapon_number = weapon_stats & 63;
- weapon_fired[weapon_number-WEP_FIRST] = floor(weapon_stats / 64);
-
if(cvar_or("hud_panel_weapons_fade", 1))
{
- fade = 3.2 - 2 * (time - weapontime);
- fade = bound(0.7, fade, 1);
+ wpnalpha = 3.2 - 2 * (time - weapontime);
+ wpnalpha = bound(0.7, wpnalpha, 1) * panel_fg_alpha;
}
else
- fade = 1;
+ wpnalpha = panel_fg_alpha;
HUD_Weapons_Clear();
float rows, columns;
+ float aspect = cvar("hud_panel_weapons_aspect");
rows = panel_size_y/panel_size_x;
- rows = bound(1, floor((sqrt(4 * autocvar_hud_panel_weapons_aspect * rows * WEP_COUNT + rows * rows) + rows + 0.5) / 2), WEP_COUNT);
+ rows = bound(1, floor((sqrt(4 * aspect * rows * WEP_COUNT + rows * rows) + rows + 0.5) / 2), WEP_COUNT);
columns = ceil(WEP_COUNT/rows);
float row, column;
float a, type, fullammo;
float when;
- when = autocvar_hud_panel_weapons_complainbubble_time;
+ when = cvar("hud_panel_weapons_complainbubble_time");
float fadetime;
- fadetime = autocvar_hud_panel_weapons_complainbubble_fadetime;
+ fadetime = cvar("hud_panel_weapons_complainbubble_fadetime");
vector color;
vector wpnpos;
vector wpnsize;
+
+ float fullammo_shells, fullammo_nails, fullammo_rockets, fullammo_cells, fullammo_fuel;
+ vector ammo_color;
+ float ammo_alpha;
+ wpnsize = eX * panel_size_x*(1/columns) + eY * panel_size_y*(1/rows);
+ float barsize_x, barsize_y, baroffset_x, baroffset_y;
+ float show_ammo = cvar("hud_panel_weapons_ammo");
+ if (show_ammo)
+ {
+ fullammo_shells = cvar("hud_panel_weapons_ammo_full_shells");
+ fullammo_nails = cvar("hud_panel_weapons_ammo_full_nails");
+ fullammo_rockets = cvar("hud_panel_weapons_ammo_full_rockets");
+ fullammo_cells = cvar("hud_panel_weapons_ammo_full_cells");
+ fullammo_fuel = cvar("hud_panel_weapons_ammo_full_fuel");
+ ammo_color = stov(cvar_string("hud_panel_weapons_ammo_color"));
+ ammo_alpha = panel_fg_alpha * cvar("hud_panel_weapons_ammo_alpha");
+
+
+ if(wpnsize_x/wpnsize_y > aspect)
+ {
+ barsize_x = aspect * wpnsize_y;
+ barsize_y = wpnsize_y;
+ baroffset_x = (wpnsize_x - barsize_x) / 2;
+ }
+ else
+ {
+ barsize_y = 1/aspect * wpnsize_x;
+ barsize_x = wpnsize_x;
+ baroffset_y = (wpnsize_y - barsize_y) / 2;
+ }
+ }
float show_accuracy;
- if(autocvar_hud_panel_weapons_accuracy && acc_levels)
+ float weapon_stats, weapon_number;
+ 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))));
+ }
+
+ float weapons_st = getstati(STAT_WEAPONS);
+ float label = cvar("hud_panel_weapons_label");
for(i = 0; i < weapon_cnt; ++i)
{
- wpnpos = panel_pos + eX * column * panel_size_x*(1/columns) + eY * row * panel_size_y*(1/rows);
- wpnsize = eX * panel_size_x*(1/columns) + eY * panel_size_y*(1/rows);
+ wpnpos = panel_pos + eX * column * wpnsize_x + eY * row * wpnsize_y;
self = weaponorder[i];
weapid = self.impulse;
// draw background behind currently selected weapon
if(self.weapon == activeweapon)
- drawpic_aspect_skin(wpnpos, "weapon_current_bg", wpnsize, '1 1 1', fade * panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawpic_aspect_skin(wpnpos, "weapon_current_bg", wpnsize, '1 1 1', wpnalpha, DRAWFLAG_NORMAL);
// draw the weapon accuracy
if(show_accuracy)
{
weapon_hit = weapon_hits[self.weapon-WEP_FIRST];
weapon_stats = floor(100 * weapon_hit / weapon_damage);
- }
- // find the max level lower than weapon_stats
- float j;
- j = acc_levels-1;
- while ( j && weapon_stats < acc_lev[j] )
- --j;
+ // find the max level lower than weapon_stats
+ float j;
+ j = acc_levels-1;
+ while ( j && weapon_stats < acc_lev[j] )
+ --j;
- // inject color j+1 in color j, how much depending on how much weapon_stats is higher than level j
- float factor;
- factor = (weapon_stats - acc_lev[j]) / (acc_lev[j+1] - acc_lev[j]);
- color = acc_color(j);
- color = color + factor * (acc_color(j+1) - color);
+ // inject color j+1 in color j, how much depending on how much weapon_stats is higher than level j
+ float factor;
+ factor = (weapon_stats - acc_lev[j]) / (acc_lev[j+1] - acc_lev[j]);
+ color = acc_col[j];
+ color = color + factor * (acc_col[j+1] - color);
- if(weapon_damage)
drawpic_aspect_skin(wpnpos, "weapon_accuracy", wpnsize, color, panel_fg_alpha, DRAWFLAG_NORMAL);
+ }
}
// draw the weapon icon
- if((self.impulse >= 0) && (getstati(STAT_WEAPONS) & self.weapons))
+ if((weapid >= 0) && (weapons_st & self.weapons))
{
- drawpic_aspect_skin(wpnpos, strcat("weapon", self.netname), wpnsize, '1 1 1', fade * panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawpic_aspect_skin(wpnpos, strcat("weapon", self.netname), wpnsize, '1 1 1', wpnalpha, DRAWFLAG_NORMAL);
- if(autocvar_hud_panel_weapons_label == 1) // weapon number
- drawstring(wpnpos, ftos(weapid), '1 1 0' * 0.5 * panel_size_y*(1/rows), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
- else if(autocvar_hud_panel_weapons_label == 2) // bind
- drawstring(wpnpos, getcommandkey(ftos(weapid), strcat("impulse ", ftos(weapid))), '1 1 0' * 0.5 * panel_size_y*(1/rows), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ if(label == 1) // weapon number
+ drawstring(wpnpos, ftos(weapid), '1 1 0' * 0.5 * wpnsize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ else if(label == 2) // bind
+ drawstring(wpnpos, getcommandkey(ftos(weapid), strcat("impulse ", ftos(weapid))), '1 1 0' * 0.5 * wpnsize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
// draw ammo status bar
- if(autocvar_hud_panel_weapons_ammo && weapid != WEP_TUBA && weapid != WEP_LASER && weapid != WEP_PORTO)
+ if(show_ammo && weapid != WEP_TUBA && weapid != WEP_LASER && weapid != WEP_PORTO)
{
a = 0;
type = GetAmmoTypeForWep(weapid);
if(a > 0)
{
switch(type) {
- case 0: fullammo = autocvar_hud_panel_weapons_ammo_full_shells; break;
- case 1: fullammo = autocvar_hud_panel_weapons_ammo_full_nails; break;
- case 2: fullammo = autocvar_hud_panel_weapons_ammo_full_rockets; break;
- case 3: fullammo = autocvar_hud_panel_weapons_ammo_full_cells; break;
- case 4: fullammo = autocvar_hud_panel_weapons_ammo_full_fuel; break;
+ case 0: fullammo = fullammo_shells; break;
+ case 1: fullammo = fullammo_nails; break;
+ case 2: fullammo = fullammo_rockets; break;
+ case 3: fullammo = fullammo_cells; break;
+ case 4: fullammo = fullammo_fuel; break;
default: fullammo = 60;
}
- float barsize_x, barsize_y, barpos_x, barpos_y;
- if(wpnsize_x/wpnsize_y > autocvar_hud_panel_weapons_aspect)
- {
- barsize_x = autocvar_hud_panel_weapons_aspect * wpnsize_y;
- barsize_y = wpnsize_y;
-
- barpos_x = wpnpos_x + (wpnsize_x - barsize_x) / 2;
- barpos_y = wpnpos_y;
- }
- else
- {
- barsize_y = 1/autocvar_hud_panel_weapons_aspect * wpnsize_x;
- barsize_x = wpnsize_x;
-
- barpos_y = wpnpos_y + (wpnsize_y - barsize_y) / 2;
- barpos_x = wpnpos_x;
- }
-
drawsetcliparea(
- barpos_x,
- barpos_y,
+ wpnpos_x + baroffset_x,
+ wpnpos_y + baroffset_y,
barsize_x * bound(0, a/fullammo, 1),
barsize_y);
- drawpic_aspect_skin(wpnpos, "weapon_ammo", wpnsize, autocvar_hud_panel_weapons_ammo_color, panel_fg_alpha * autocvar_hud_panel_weapons_ammo_alpha, DRAWFLAG_NORMAL);
+ drawpic_aspect_skin(wpnpos, "weapon_ammo", wpnsize, ammo_color, ammo_alpha, DRAWFLAG_NORMAL);
drawresetcliparea();
}
}
}
// draw the complain message
- if(time - complain_weapon_time < when + fadetime && self.weapon == complain_weapon && autocvar_hud_panel_weapons_complainbubble)
+ if(time - complain_weapon_time < when + fadetime && self.weapon == complain_weapon && cvar("hud_panel_weapons_complainbubble"))
{
if(fadetime)
{
string s;
if(complain_weapon_type == 0) {
s = "Out of ammo";
- color = autocvar_hud_panel_weapons_complainbubble_color_outofammo;
+ color = stov(cvar_string("hud_panel_weapons_complainbubble_color_outofammo"));
}
else if(complain_weapon_type == 1) {
s = "Don't have";
- color = autocvar_hud_panel_weapons_complainbubble_color_donthave;
+ color = stov(cvar_string("hud_panel_weapons_complainbubble_color_donthave"));
}
else {
s = "Unavailable";
- color = autocvar_hud_panel_weapons_complainbubble_color_unavailable;
+ color = stov(cvar_string("hud_panel_weapons_complainbubble_color_unavailable"));
}
- drawpic_aspect_skin(wpnpos + '1 1 0' * autocvar_hud_panel_weapons_complainbubble_padding, "weapon_complainbubble", wpnsize - '2 2 0' * autocvar_hud_panel_weapons_complainbubble_padding, color, a * panel_fg_alpha, DRAWFLAG_NORMAL);
- drawstring_aspect(wpnpos + '1 1 0' * autocvar_hud_panel_weapons_complainbubble_padding, s, wpnsize - '2 2 0' * autocvar_hud_panel_weapons_complainbubble_padding, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
+ float padding = cvar("hud_panel_weapons_complainbubble_padding");
+ drawpic_aspect_skin(wpnpos + '1 1 0' * padding, "weapon_complainbubble", wpnsize - '2 2 0' * padding, color, a * panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(wpnpos + '1 1 0' * padding, s, wpnsize - '2 2 0' * padding, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
}
++row;
void DrawAmmoItem(vector myPos, vector mySize, float itemcode, float currently_selected)
{
float a;
- a = getstati(GetAmmoStat(itemcode)); // how much ammo do we have of type itemcode?
if(autocvar__hud_configure)
+ {
+ currently_selected = (itemcode == 2); //rockets always selected
a = 100;
+ }
+ else
+ a = getstati(GetAmmoStat(itemcode)); // how much ammo do we have of type itemcode?
vector color;
if(a < 10)
else
alpha = 0.7;
- vector newSize, newPos;
- if(mySize_x/mySize_y > 3)
- {
- newSize_x = 3 * mySize_y;
- newSize_y = mySize_y;
-
- newPos_x = myPos_x + (mySize_x - newSize_x) / 2;
- newPos_y = myPos_y;
- }
- else
- {
- newSize_y = 1/3 * mySize_x;
- newSize_x = mySize_x;
-
- newPos_y = myPos_y + (mySize_y - newSize_y) / 2;
- newPos_x = myPos_x;
- }
-
vector picpos, numpos;
if(autocvar_hud_panel_ammo_iconalign)
{
- numpos = newPos;
- picpos = newPos + eX * 2 * newSize_y;
+ numpos = myPos;
+ picpos = myPos + eX * 2 * mySize_y;
}
else
{
- numpos = newPos + eX * newSize_y;
- picpos = newPos;
+ numpos = myPos + eX * mySize_y;
+ picpos = myPos;
}
if (currently_selected)
- drawpic_aspect_skin(newPos, "ammo_current_bg", newSize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawpic_aspect_skin(myPos, "ammo_current_bg", mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
- drawfont = hud_bigfont;
if(a > 0)
- drawstring_aspect(numpos, ftos(a), eX * (2/3) * newSize_x + eY * newSize_y, color, panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(numpos, ftos(a), eX * (2/3) * mySize_x + eY * mySize_y, color, panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
else // "ghost" ammo count
- drawstring_aspect(numpos, ftos(a), eX * (2/3) * newSize_x + eY * newSize_y, '0 0 0', panel_fg_alpha * alpha * 0.5, DRAWFLAG_NORMAL);
- drawfont = hud_font;
+ drawstring_aspect(numpos, ftos(a), eX * (2/3) * mySize_x + eY * mySize_y, '0 0 0', panel_fg_alpha * alpha * 0.5, DRAWFLAG_NORMAL);
if(a > 0)
- drawpic_aspect_skin(picpos, GetAmmoPicture(itemcode), '1 1 0' * newSize_y, '1 1 1', panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
+ drawpic_aspect_skin(picpos, GetAmmoPicture(itemcode), '1 1 0' * mySize_y, '1 1 1', panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
else // "ghost" ammo icon
- drawpic_aspect_skin(picpos, GetAmmoPicture(itemcode), '1 1 0' * newSize_y, '0 0 0', panel_fg_alpha * alpha * 0.5, DRAWFLAG_NORMAL);
+ drawpic_aspect_skin(picpos, GetAmmoPicture(itemcode), '1 1 0' * mySize_y, '0 0 0', panel_fg_alpha * alpha * 0.5, DRAWFLAG_NORMAL);
}
void HUD_Ammo(void)
active_panel = HUD_PANEL_AMMO;
HUD_Panel_UpdateCvars(ammo);
- float i, currently_selected;
-
vector pos, mySize;
pos = panel_pos;
mySize = panel_size;
mySize -= '2 2 0' * panel_bg_padding;
}
- float rows, columns;
- rows = mySize_y/mySize_x;
- rows = bound(1, floor((sqrt(4 * (3/1) * rows * AMMO_COUNT + rows * rows) + rows + 0.5) / 2), AMMO_COUNT);
- // ^^^ ammo item aspect goes here
+ float rows, columns, row, column;
+ vector ammo_size;
+ if (autocvar_hud_panel_ammo_onlycurrent)
+ ammo_size = mySize;
+ else
+ {
+ rows = mySize_y/mySize_x;
+ rows = bound(1, floor((sqrt(4 * (3/1) * rows * AMMO_COUNT + rows * rows) + rows + 0.5) / 2), AMMO_COUNT);
+ // ^^^ ammo item aspect goes here
- columns = ceil(AMMO_COUNT/rows);
+ columns = ceil(AMMO_COUNT/rows);
- float row, column;
- // ammo
- for (i = 0; i < AMMO_COUNT; ++i) {
- currently_selected = getstati(STAT_ITEMS) & GetAmmoItemCode(i);
- if(autocvar_hud_panel_ammo_onlycurrent) {
- if(autocvar__hud_configure)
- i = 2;
- if (currently_selected || autocvar__hud_configure)
- {
- DrawAmmoItem(pos, mySize, i, currently_selected);
- break;
- }
- } else {
- DrawAmmoItem(pos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows), eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows), i, currently_selected);
- ++row;
- if(row >= rows)
+ ammo_size = eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows);
+ }
+
+ vector offset;
+ float newSize;
+ if(ammo_size_x/ammo_size_y > 3)
+ {
+ newSize = 3 * ammo_size_y;
+ offset_x = ammo_size_x - newSize;
+ pos_x += offset_x/2;
+ ammo_size_x = newSize;
+ }
+ else
+ {
+ newSize = 1/3 * ammo_size_x;
+ offset_y = ammo_size_y - newSize;
+ pos_y += offset_y/2;
+ ammo_size_y = newSize;
+ }
+
+ drawfont = hud_bigfont;
+ float i, stat_items, currently_selected;
+ if (autocvar_hud_panel_ammo_onlycurrent)
+ {
+ if(autocvar__hud_configure)
+ {
+ DrawAmmoItem(pos, ammo_size, 2, true); //show rockets
+ return;
+ }
+ stat_items = getstati(STAT_ITEMS);
+ for (i = 0; i < AMMO_COUNT; ++i) {
+ currently_selected = stat_items & GetAmmoItemCode(i);
+ if (currently_selected)
{
- row = 0;
- column = column + 1;
+ DrawAmmoItem(pos, ammo_size, i, true);
+ return;
}
}
+ return; // nothing to display
}
+
+ stat_items = getstati(STAT_ITEMS);
+ for (i = 0; i < AMMO_COUNT; ++i) {
+ currently_selected = stat_items & GetAmmoItemCode(i);
+ DrawAmmoItem(pos + eX * column * (ammo_size_x + offset_x) + eY * row * (ammo_size_y + offset_y), ammo_size, i, currently_selected);
+ ++row;
+ if(row >= rows)
+ {
+ row = 0;
+ column = column + 1;
+ }
+ }
+ drawfont = hud_font;
}
void DrawNumIcon(float iconalign, vector myPos, vector mySize, float x, string icon, float left, vector color, float alpha)
if(!autocvar_hud_panel_powerups && !autocvar__hud_configure)
return;
- active_panel = HUD_PANEL_POWERUPS;
- HUD_Panel_UpdateCvars(powerups);
- float stat_items;
- stat_items = getstati(STAT_ITEMS);
-
if(!autocvar__hud_configure)
{
- if not(stat_items & IT_STRENGTH)
- if not(stat_items & IT_INVINCIBLE)
- return;
+ if not(getstati(STAT_ITEMS) & (IT_STRENGTH | IT_INVINCIBLE))
+ return;
if (getstati(STAT_HEALTH) <= 0)
return;
}
+ active_panel = HUD_PANEL_POWERUPS;
+ HUD_Panel_UpdateCvars(powerups);
vector pos, mySize;
pos = panel_pos;
mySize = panel_size;
string leftname, rightname;
float leftcnt, rightcnt;
float leftexact, rightexact;
- if (autocvar_hud_panel_powerups_flip) {
+ float flip = cvar("hud_panel_powerups_flip");
+ if (flip) {
leftname = "strength";
leftcnt = ceil(strength_time);
leftexact = strength_time;
}
drawfont = hud_bigfont;
+ float baralign = cvar("hud_panel_powerups_baralign");
+ float iconalign = cvar("hud_panel_powerups_iconalign");
+ float progressbar = cvar("hud_panel_powerups_progressbar");
if (mySize_x/mySize_y > 4)
{
if(leftcnt)
{
- if(autocvar_hud_panel_powerups_baralign == 1 || autocvar_hud_panel_powerups_baralign == 3) { // right align
+ if(baralign == 1 || baralign == 3) { // right align
barpos = pos + eX * 0.5 * mySize_x - eX * 0.5 * mySize_x * min(1, leftcnt/30);
barsize = eX * 0.5 * mySize_x * min(1, leftcnt/30) + eY * mySize_y;
} else { // left align
barsize = eX * 0.5 * mySize_x * min(1, leftcnt/30) + eY * mySize_y;
}
- if(autocvar_hud_panel_powerups_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(leftname);
HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
}
if(leftcnt > 1)
- DrawNumIcon(autocvar_hud_panel_powerups_iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, '1 1 1', 1);
+ DrawNumIcon(iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, '1 1 1', 1);
if(leftcnt <= 5)
- DrawNumIcon_expanding(autocvar_hud_panel_powerups_iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, '1 1 1', bound(0, (leftcnt - leftexact) / 0.5, 1));
+ DrawNumIcon_expanding(iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, '1 1 1', bound(0, (leftcnt - leftexact) / 0.5, 1));
}
if(rightcnt)
{
- if(autocvar_hud_panel_powerups_baralign == 0 || autocvar_hud_panel_powerups_baralign == 3) { // left align
+ if(baralign == 0 || baralign == 3) { // left align
barpos = pos + eX * 0.5 * mySize_x;
barsize = eX * 0.5 * mySize_x * min(1, rightcnt/30) + eY * mySize_y;
} else { // right align
barsize = eX * 0.5 * mySize_x * min(1, rightcnt/30) + eY * mySize_y;
}
- if(autocvar_hud_panel_powerups_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(rightname);
- HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
}
if(rightcnt > 1)
- DrawNumIcon(autocvar_hud_panel_powerups_iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, '1 1 1', 1);
+ DrawNumIcon(iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, '1 1 1', 1);
if(rightcnt <= 5)
- DrawNumIcon_expanding(autocvar_hud_panel_powerups_iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, '1 1 1', bound(0, (rightcnt - rightexact) / 0.5, 1));
+ DrawNumIcon_expanding(iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, '1 1 1', bound(0, (rightcnt - rightexact) / 0.5, 1));
}
}
else if (mySize_x/mySize_y > 1.5)
{
if(leftcnt)
{
- if(autocvar_hud_panel_powerups_baralign == 1 || autocvar_hud_panel_powerups_baralign == 3) { // right align
+ if(baralign == 1 || baralign == 3) { // right align
barpos = pos + eX * mySize_x - eX * mySize_x * min(1, leftcnt/30);
barsize = eX * mySize_x * min(1, leftcnt/30) + eY * 0.5 * mySize_y;
} else { // left align
barsize = eX * mySize_x * min(1, leftcnt/30) + eY * 0.5 * mySize_y;
}
- if(autocvar_hud_panel_powerups_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(leftname);
- HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
}
if(leftcnt > 1)
- DrawNumIcon(autocvar_hud_panel_powerups_iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, '1 1 1', 1);
+ DrawNumIcon(iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, '1 1 1', 1);
if(leftcnt <= 5)
- DrawNumIcon_expanding(autocvar_hud_panel_powerups_iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, '1 1 1', bound(0, (leftcnt - leftexact) / 0.5, 1));
+ DrawNumIcon_expanding(iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, '1 1 1', bound(0, (leftcnt - leftexact) / 0.5, 1));
}
if(rightcnt)
{
- if(autocvar_hud_panel_powerups_baralign == 0 || autocvar_hud_panel_powerups_baralign == 3) { // left align
+ if(baralign == 0 || baralign == 3) { // left align
barpos = pos + eY * 0.5 * mySize_y;
barsize = eX * mySize_x * min(1, rightcnt/30) + eY * 0.5 * mySize_y;
} else { // right align
barsize = eX * mySize_x * min(1, rightcnt/30) + eY * 0.5 * mySize_y;
}
- if(autocvar_hud_panel_powerups_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(rightname);
- HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
}
if(rightcnt > 1)
- DrawNumIcon(autocvar_hud_panel_powerups_iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, '1 1 1', 1);
+ DrawNumIcon(iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, '1 1 1', 1);
if(rightcnt <= 5)
- DrawNumIcon_expanding(autocvar_hud_panel_powerups_iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, '1 1 1', bound(0, (rightcnt - rightexact) / 0.5, 1));
+ DrawNumIcon_expanding(iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, '1 1 1', bound(0, (rightcnt - rightexact) / 0.5, 1));
}
}
else
{
if(leftcnt)
{
- if(autocvar_hud_panel_powerups_baralign == 1 || autocvar_hud_panel_powerups_baralign == 3) { // down align
+ if(baralign == 1 || baralign == 3) { // down align
barpos = pos + eY * mySize_y - eY * mySize_y * min(1, leftcnt/30);
barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, leftcnt/30);
} else { // up align
barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, leftcnt/30);
}
- if(autocvar_hud_panel_powerups_iconalign == 1 || autocvar_hud_panel_powerups_iconalign == 3) { // down align
+ if(iconalign == 1 || iconalign == 3) { // down align
picpos = pos + eX * 0.05 * mySize_x + eY * (mySize_y - 0.65 * mySize_x);
numpos = pos + eY * mySize_y - eY * 0.25 * mySize_x;
} else { // up align
numpos = pos + eY * 0.4 * mySize_x;
}
- if(autocvar_hud_panel_powerups_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(leftname);
- HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
}
if(leftcnt <= 5)
drawpic_aspect_skin_expanding(picpos, leftname, '0.4 0.4 0' * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, bound(0, (leftcnt - leftexact) / 0.5, 1));
if(rightcnt)
{
- if(autocvar_hud_panel_powerups_baralign == 0 || autocvar_hud_panel_powerups_baralign == 3) { // up align
+ if(baralign == 0 || baralign == 3) { // up align
barpos = pos + eX * 0.5 * mySize_x;
barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, rightcnt/30);
} else { // down align
barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, rightcnt/30);
}
- if(autocvar_hud_panel_powerups_iconalign == 0 || autocvar_hud_panel_powerups_iconalign == 3) { // up align
+ if(iconalign == 0 || iconalign == 3) { // up align
picpos = pos + eX * 0.05 * mySize_x + eX * 0.5 * mySize_x;
numpos = pos + eY * 0.4 * mySize_x + eX * 0.5 * mySize_x;
} else { // down align
numpos = pos + eY * mySize_y - eY * 0.25 * mySize_x + eX * 0.5 * mySize_x;
}
- if(autocvar_hud_panel_powerups_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(rightname);
- HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
+ HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
}
if(rightcnt <= 5)
drawpic_aspect_skin_expanding(picpos, rightname, '0.4 0.4 0' * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, bound(0, (rightcnt - rightexact) / 0.5, 1));
vector numpos;
drawfont = hud_bigfont;
+ float baralign = cvar("hud_panel_healtharmor_baralign");
+ float iconalign = cvar("hud_panel_healtharmor_iconalign");
+ float progressbar = cvar("hud_panel_healtharmor_progressbar");
if(autocvar_hud_panel_healtharmor == 2) // combined health and armor display
{
vector v;
float x;
x = floor(v_x + 1);
- if(autocvar_hud_panel_healtharmor_baralign == 1 || autocvar_hud_panel_healtharmor_baralign == 3) { // right align
+ if(baralign == 1 || baralign == 3) { // right align
barpos = pos + eX * mySize_x - eX * mySize_x * min(1, x/400);
barsize = eX * mySize_x * min(1, x/400) + eY * mySize_y;
} else { // left align
if(v_z) // NOT fully armored
{
biggercount = "health";
- if(autocvar_hud_panel_healtharmor_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColor(health);
HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
else
{
biggercount = "armor";
- if(autocvar_hud_panel_healtharmor_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColor(armor);
HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
if(health)
drawpic_aspect_skin(pos + eX * mySize_x - eX * 0.5 * mySize_y, "health", '0.5 0.5 0' * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
}
- DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos, mySize, x, biggercount, 1, HUD_Get_Num_Color(x, 2 * 200), 1);
+ DrawNumIcon(iconalign, pos, mySize, x, biggercount, 1, HUD_Get_Num_Color(x, 2 * 200), 1);
// fuel
if(fuel)
{
- if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // left align
+ if(baralign == 0 || baralign == 3) { // left align
barpos = pos + eX * mySize_x - eX * mySize_x * min(1, fuel/100);
barsize = eX * mySize_x * min(1, fuel/100) + eY * 0.2 * mySize_y;
} else {
float leftcnt, rightcnt;
float leftactive, rightactive;
float leftalpha, rightalpha;
- if (autocvar_hud_panel_healtharmor_flip) { // old style layout with armor left/top of health
+ float flip = cvar("hud_panel_healtharmor_flip");
+ if (flip) { // old style layout with armor left/top of health
leftname = "armor";
leftcnt = armor;
if(leftcnt)
{
if(leftactive)
{
- if(autocvar_hud_panel_healtharmor_baralign == 1 || autocvar_hud_panel_healtharmor_baralign == 3) { // right align
+ if(baralign == 1 || baralign == 3) { // right align
barpos = pos + eX * 0.5 * mySize_x - eX * 0.5 * mySize_x * min(1, leftcnt/200);
barsize = eX * 0.5 * mySize_x * min(1, leftcnt/200) + eY * mySize_y;
} else { // left align
barsize = eX * 0.5 * mySize_x * min(1, leftcnt/200) + eY * mySize_y;
}
- if(autocvar_hud_panel_healtharmor_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(leftname);
HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
}
- DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, HUD_Get_Num_Color(leftcnt, 200), 1);
+ DrawNumIcon(iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, HUD_Get_Num_Color(leftcnt, 200), 1);
}
if(rightactive)
{
- if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // left align
+ if(baralign == 0 || baralign == 3) { // left align
barpos = pos + eX * 0.5 * mySize_x;
barsize = eX * 0.5 * mySize_x * min(1, rightcnt/200) + eY * mySize_y;
} else { // right align
barsize = eX * 0.5 * mySize_x * min(1, rightcnt/200) + eY * mySize_y;
}
- if(autocvar_hud_panel_healtharmor_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(rightname);
HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
}
- DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, HUD_Get_Num_Color(rightcnt, 200), 1);
+ DrawNumIcon(iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, HUD_Get_Num_Color(rightcnt, 200), 1);
}
if(fuel)
{
- if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // left align
+ if(baralign == 0 || baralign == 3) { // left align
barpos = pos + eX * mySize_x - eX * mySize_x * min(1, fuel/100);
barsize = eX * mySize_x * min(1, fuel/100) + eY * 0.2 * mySize_y;
} else {
{
if(leftactive)
{
- if(autocvar_hud_panel_healtharmor_baralign == 1 || autocvar_hud_panel_healtharmor_baralign == 3) { // right align
+ if(baralign == 1 || baralign == 3) { // right align
barpos = pos + eX * mySize_x - eX * mySize_x * min(1, leftcnt/200);
barsize = eX * mySize_x * min(1, leftcnt/200) + eY * 0.5 * mySize_y;
} else { // left align
barsize = eX * mySize_x * min(1, leftcnt/200) + eY * 0.5 * mySize_y;
}
- if(autocvar_hud_panel_healtharmor_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(leftname);
HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
}
- DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, HUD_Get_Num_Color(leftcnt, 200), 1);
+ DrawNumIcon(iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, HUD_Get_Num_Color(leftcnt, 200), 1);
}
if(rightactive)
{
- if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // left align
+ if(baralign == 0 || baralign == 3) { // left align
barpos = pos + eY * 0.5 * mySize_y;
barsize = eX * mySize_x * min(1, rightcnt/200) + eY * 0.5 * mySize_y;
} else { // right align
barsize = eX * mySize_x * min(1, rightcnt/200) + eY * 0.5 * mySize_y;
}
- if(autocvar_hud_panel_healtharmor_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(rightname);
HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
}
- DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, HUD_Get_Num_Color(rightcnt, 200), 1);
+ DrawNumIcon(iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, HUD_Get_Num_Color(rightcnt, 200), 1);
}
if(fuel)
{
- if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // left align
+ if(baralign == 0 || baralign == 3) { // left align
barpos = pos + eX * mySize_x - eX * mySize_x * min(1, fuel/100);
barsize = eX * mySize_x * min(1, fuel/100) + eY * 0.1 * mySize_y;
} else {
{
if(leftactive)
{
- if(autocvar_hud_panel_healtharmor_baralign == 1 || autocvar_hud_panel_healtharmor_baralign == 3) { // down align
+ if(baralign == 1 || baralign == 3) { // down align
barpos = pos + eY * mySize_y - eY * mySize_y * min(1, leftcnt/200);
barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, leftcnt/200);
} else { // up align
barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, leftcnt/200);
}
- if(autocvar_hud_panel_healtharmor_iconalign == 1 || autocvar_hud_panel_healtharmor_iconalign == 3) { // down align
+ if(iconalign == 1 || iconalign == 3) { // down align
picpos = pos + eX * 0.05 * mySize_x + eY * (mySize_y - 0.65 * mySize_x);
numpos = pos + eY * mySize_y - eY * 0.25 * mySize_x;
} else { // up align
numpos = pos + eY * 0.4 * mySize_x;
}
- if(autocvar_hud_panel_healtharmor_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(leftname);
HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
if(rightactive)
{
- if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // up align
+ if(baralign == 0 || baralign == 3) { // up align
barpos = pos + eX * 0.5 * mySize_x;
barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, rightcnt/200);
} else { // down align
barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, rightcnt/200);
}
- if(autocvar_hud_panel_healtharmor_iconalign == 0 || autocvar_hud_panel_healtharmor_iconalign == 3) { // up align
+ if(iconalign == 0 || iconalign == 3) { // up align
picpos = pos + eX * 0.05 * mySize_x + eX * 0.5 * mySize_x;
numpos = pos + eY * 0.4 * mySize_x + eX * 0.5 * mySize_x;
} else { // down align
numpos = pos + eY * mySize_y - eY * 0.25 * mySize_x + eX * 0.5 * mySize_x;
}
- if(autocvar_hud_panel_healtharmor_progressbar)
+ if(progressbar)
{
HUD_Panel_GetProgressBarColorForString(rightname);
HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
if(fuel)
{
- if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // left align
+ if(baralign == 0 || baralign == 3) { // left align
barpos = pos;
barsize = eX * 0.05 * mySize_x + eY * mySize_y * min(1, fuel/100);
} else {
return w_deathtypestring;
}
-float killnotify_times[10];
-float killnotify_deathtype[10];
-float killnotify_actiontype[10]; // 0 = "Y [used by] X", 1 = "X [did action to] Y"
-string killnotify_attackers[10];
-string killnotify_victims[10];
+#define KN_MAX_ENTRIES 10
+float kn_index;
+float killnotify_times[KN_MAX_ENTRIES];
+float killnotify_deathtype[KN_MAX_ENTRIES];
+float killnotify_actiontype[KN_MAX_ENTRIES]; // 0 = "Y [used by] X", 1 = "X [did action to] Y"
+string killnotify_attackers[KN_MAX_ENTRIES];
+string killnotify_victims[KN_MAX_ENTRIES];
void HUD_KillNotify_Push(string attacker, string victim, float actiontype, float wpn)
{
- float i;
- for (i = 9; i > 0; --i) {
- killnotify_times[i] = killnotify_times[i-1];
- killnotify_deathtype[i] = killnotify_deathtype[i-1];
- killnotify_actiontype[i] = killnotify_actiontype[i-1];
- if(killnotify_attackers[i])
- strunzone(killnotify_attackers[i]);
- killnotify_attackers[i] = strzone(killnotify_attackers[i-1]);
- if(killnotify_victims[i])
- strunzone(killnotify_victims[i]);
- killnotify_victims[i] = strzone(killnotify_victims[i-1]);
- }
- killnotify_times[0] = time;
- killnotify_deathtype[0] = wpn;
- killnotify_actiontype[0] = actiontype;
- if(killnotify_attackers[0])
- strunzone(killnotify_attackers[0]);
- killnotify_attackers[0] = strzone(attacker);
- if(killnotify_victims[0])
- strunzone(killnotify_victims[0]);
- killnotify_victims[0] = strzone(victim);
+ --kn_index;
+ if (kn_index == -1)
+ kn_index = KN_MAX_ENTRIES-1;
+ killnotify_times[kn_index] = time;
+ killnotify_deathtype[kn_index] = wpn;
+ killnotify_actiontype[kn_index] = actiontype;
+ if(killnotify_attackers[kn_index])
+ strunzone(killnotify_attackers[kn_index]);
+ killnotify_attackers[kn_index] = strzone(attacker);
+ if(killnotify_victims[kn_index])
+ strunzone(killnotify_victims[kn_index]);
+ killnotify_victims[kn_index] = strzone(victim);
}
void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s1 = attacker, s2 = victim
{
float w;
float alsoprint, gentle;
- alsoprint = (autocvar_hud_panel_notify_print || !panel_enabled); // print message to console if: notify panel disabled, or cvar to do so enabled
- gentle = (autocvar_cl_gentle || autocvar_cl_gentle_messages);
+ alsoprint = (cvar("hud_panel_notify_print") || !panel_enabled); // print message to console if: notify panel disabled, or cvar to do so enabled
+ gentle = (cvar("cl_gentle") || cvar("cl_gentle_messages"));
if ((msg == MSG_SUICIDE || msg == MSG_KILL || msg == MSG_KILL_ACTION) && gametype == GAME_CTS) // selfkill isn't interesting in CTS and only spams up the notify panel
return;
} else if(msg == MSG_KILL) {
w = DEATH_WEAPONOF(type);
if(WEP_VALID(w)) {
- HUD_KillNotify_Push(s1, s2, 1, type);
+ if((w == WEP_CAMPINGRIFLE || w == WEP_MINSTANEX) && type & HITTYPE_HEADSHOT) // all headshot weapons go here
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_HEADSHOT);
+ else
+ HUD_KillNotify_Push(s1, s2, 1, type);
+
if (alsoprint)
print("^1", sprintf(Weapon_KillMessage(type), strcat(s2, "^1"), strcat(s1, "^1")), "\n"); // default order: victim, killer
}
void HUD_Centerprint(string s1, string s2, float type, float msg)
{
float gentle;
- gentle = (autocvar_cl_gentle || autocvar_cl_gentle_messages);
+ gentle = (cvar("cl_gentle") || cvar("cl_gentle_messages"));
if(msg == MSG_SUICIDE) {
if (type == DEATH_TEAMCHANGE) {
centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "You are now on: ", s1));
}
float entries, height;
- entries = bound(1, floor(10 * mySize_y/mySize_x), 10);
+ entries = bound(1, floor(KN_MAX_ENTRIES * mySize_y/mySize_x), KN_MAX_ENTRIES);
height = mySize_y/entries;
vector fontsize;
float a;
float when;
- when = autocvar_hud_panel_notify_time;
+ when = cvar("hud_panel_notify_time");
float fadetime;
- fadetime = autocvar_hud_panel_notify_fadetime;
+ fadetime = cvar("hud_panel_notify_fadetime");
string s;
float width_attacker;
string attacker, victim;
- float i, j, w;
- for(j = 0; j < entries; ++j)
+ float i, j, w, step, limit;
+ if(cvar("hud_panel_notify_flip")) //order items from the top down
{
- s = "";
- if(autocvar_hud_panel_notify_flip)
- i = j;
- else // rather nasty hack for ordering items from the bottom up
- i = entries - j - 1;
+ i = 0;
+ step = +1;
+ limit = entries;
+ }
+ else //order items from the bottom up
+ {
+ i = entries - 1;
+ step = -1;
+ limit = -1;
+ }
- if(fadetime)
+ for(j = kn_index; i != limit; i += step, ++j)
+ {
+ if(autocvar__hud_configure)
{
- if(killnotify_times[j] + when > time)
- a = 1;
- else
- a = bound(0, (killnotify_times[j] + when + fadetime - time) / fadetime, 1);
+ if (step == +1)
+ a = i;
+ else // inverse order
+ a = entries - 1 - i;
+ attacker = textShortenToWidth(strcat("Player", ftos(a+1)), 0.48 * mySize_x - height, fontsize, stringwidth_colors);
+ victim = textShortenToWidth(strcat("Player", ftos(a+2)), 0.48 * mySize_x - height, fontsize, stringwidth_colors);
+ s = strcat("weapon", get_weaponinfo(WEP_FIRST + mod(floor(a*2.4), WEP_LAST)).netname);
+ a = bound(0, (when - a) / 4, 1);
+ goto hud_config_notifyprint;
+ }
+
+ if (j == KN_MAX_ENTRIES)
+ j = 0;
+
+ if(killnotify_times[j] + when > time)
+ a = 1;
+ else if(fadetime)
+ {
+ a = bound(0, (killnotify_times[j] + when + fadetime - time) / fadetime, 1);
+ if(!a)
+ {
+ break;
+ }
}
else
{
- if(killnotify_times[j] + when > time)
- a = 1;
- else
- a = 0;
+ break;
}
+ s = "";
+
w = -1;
w = DEATH_WEAPONOF(killnotify_deathtype[j]);
// TODO: maybe print in team colors?
//
// Y [used by] X
- if(killnotify_actiontype[j] == 0 && !autocvar__hud_configure)
+ if(killnotify_actiontype[j] == 0)
{
- attacker = textShortenToWidth(killnotify_attackers[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
- pos_attacker = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height);
- weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
-
if(killnotify_deathtype[j] == DEATH_GENERIC)
{
s = "notify_death";
s = "notify_blue_captured";
}
}
- if(s != "" && a)
+ attacker = textShortenToWidth(killnotify_attackers[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
+ pos_attacker = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height);
+ weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
+
+ if(s != "")
{
drawpic_aspect_skin(weap_pos, s, '2 1 0' * height, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
drawcolorcodedstring(pos_attacker, attacker, fontsize, panel_fg_alpha * a, DRAWFLAG_NORMAL);
// X [did action to] Y
else
{
- if(autocvar__hud_configure)
- {
- attacker = textShortenToWidth("Player1", 0.48 * mySize_x - height, fontsize, stringwidth_colors);
- victim = textShortenToWidth("Player2", 0.48 * mySize_x - height, fontsize, stringwidth_colors);
- a = bound(0, (when - j) / 4, 1);
- }
- else
- {
- attacker = textShortenToWidth(killnotify_attackers[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
- victim = textShortenToWidth(killnotify_victims[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
- }
- width_attacker = stringwidth(attacker, TRUE, fontsize);
- pos_attacker = pos + eX * (0.48 * mySize_x - height - width_attacker) + eY * (0.5 * fontsize_y + i * height);
- pos_victim = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height);
- weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
-
- if(autocvar__hud_configure) // example actions for config mode
- {
- s = "weaponelectro";
- }
- else if(killnotify_deathtype[j] & HITTYPE_SECONDARY && w == WEP_LASER)
+ if(killnotify_deathtype[j] & HITTYPE_SECONDARY && w == WEP_LASER)
{
s = "notify_melee_laser";
}
{
s = "notify_void";
}
+ else if(killnotify_deathtype[j] == DEATH_HEADSHOT)
+ {
+ s = "notify_headshot";
+ }
else if(killnotify_deathtype[j] == RACE_SERVER_RECORD)
{
s = "race_newrecordserver";
{
s = "race_newfail";
}
- if(s != "" && a)
+
+ attacker = textShortenToWidth(killnotify_attackers[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
+ victim = textShortenToWidth(killnotify_victims[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
+:hud_config_notifyprint
+ width_attacker = stringwidth(attacker, TRUE, fontsize);
+ pos_attacker = pos + eX * (0.48 * mySize_x - height - width_attacker) + eY * (0.5 * fontsize_y + i * height);
+ pos_victim = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height);
+ weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
+
+ if(s != "")
{
drawpic_aspect_skin(weap_pos, s, '2 1 0' * height, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
drawcolorcodedstring(pos_attacker, attacker, fontsize, panel_fg_alpha * a, DRAWFLAG_NORMAL);
if(!autocvar_hud_panel_vote && !autocvar__hud_configure)
return;
- active_panel = HUD_PANEL_VOTE;
- HUD_Panel_UpdateCvars(vote);
- if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE))
- {
- panel_pos = eX * 0.3 * vid_conwidth + eY * 0.1 * vid_conheight;
- panel_size = eX * 0.4 * vid_conwidth + eY * 0.3 * vid_conheight;
- }
- vector pos, mySize;
- pos = panel_pos;
- mySize = panel_size;
-
if(!autocvar__hud_configure)
{
panel_fg_alpha = autocvar_hud_panel_fg_alpha;
- panel_bg_alpha_str = autocvar_hud_panel_vote_bg_alpha;
+ panel_bg_alpha_str = cvar_string("hud_panel_vote_bg_alpha");
if(panel_bg_alpha_str == "") {
panel_bg_alpha_str = ftos(autocvar_hud_panel_bg_alpha);
if(!vote_alpha)
return;
- a = panel_bg_alpha * vote_alpha * bound(autocvar_hud_panel_vote_alreadyvoted_alpha, 1 - vote_highlighted, 1);
+ active_panel = HUD_PANEL_VOTE;
+ HUD_Panel_UpdateCvars(vote);
+ vector pos, mySize;
+ pos = panel_pos;
+ mySize = panel_size;
+
+ if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE))
+ {
+ panel_pos = eX * 0.3 * vid_conwidth + eY * 0.1 * vid_conheight;
+ panel_size = eX * 0.4 * vid_conwidth + eY * 0.3 * vid_conheight;
+ }
+
+ a = vote_alpha * bound(cvar("hud_panel_vote_alreadyvoted_alpha"), 1 - vote_highlighted, 1);
HUD_Panel_DrawBg(a);
- a = panel_fg_alpha * vote_alpha * bound(autocvar_hud_panel_vote_alreadyvoted_alpha, 1 - vote_highlighted, 1);
+ a = panel_fg_alpha * a;
+
if(panel_bg_padding)
{
pos += '1 1 0' * panel_bg_padding;
}
// force custom aspect
- if(autocvar_hud_panel_pressedkeys_aspect)
+ float aspect = cvar("hud_panel_pressedkeys_aspect");
+ if(aspect)
{
vector newSize;
- if(mySize_x/mySize_y > autocvar_hud_panel_pressedkeys_aspect)
+ if(mySize_x/mySize_y > aspect)
{
- newSize_x = autocvar_hud_panel_pressedkeys_aspect * mySize_y;
+ newSize_x = aspect * mySize_y;
newSize_y = mySize_y;
pos_x = pos_x + (mySize_x - newSize_x) / 2;
}
else
{
- newSize_y = 1/autocvar_hud_panel_pressedkeys_aspect * mySize_x;
+ newSize_y = 1/aspect * mySize_x;
newSize_x = mySize_x;
pos_y = pos_y + (mySize_y - newSize_y) / 2;
void HUD_Main (void)
{
float i;
-
- hud_skin_path = strcat("gfx/hud/", autocvar_hud_skin);
-
// global hud alpha fade
if(menu_enabled == 1)
hud_fade_alpha = 1;
return;
// Drawing stuff
+ if (hud_skin_path != cvar_string("hud_skin"))
+ {
+ if (hud_skin_path)
+ strunzone(hud_skin_path);
+ hud_skin_path = strzone(strcat("gfx/hud/", cvar_string("hud_skin")));
+ }
// HUD configure visible grid
if(autocvar__hud_configure && autocvar_hud_configure_grid && autocvar_hud_configure_grid_alpha)
{
float f;
vector color;
- if((teamplay) && autocvar_hud_dock_color_team) {
- f = stof(getplayerkey(player_localentnum - 1, "colors"));
- color = colormapPaletteColor(mod(f, 16), 1) * autocvar_hud_dock_color_team;
- }
- else if(autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && autocvar_hud_dock_color_team) {
- color = '1 0 0' * autocvar_hud_dock_color_team;
- }
- else if(autocvar_hud_dock_color == "shirt") {
+ float hud_dock_color_team = cvar("hud_dock_color_team");
+ if((teamplay) && hud_dock_color_team) {
f = stof(getplayerkey(player_localentnum - 1, "colors"));
- color = colormapPaletteColor(floor(f / 16), 0);
+ color = colormapPaletteColor(mod(f, 16), 1) * hud_dock_color_team;
}
- else if(autocvar_hud_dock_color == "pants") {
- f = stof(getplayerkey(player_localentnum - 1, "colors"));
- color = colormapPaletteColor(mod(f, 16), 1);
+ else if(autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && hud_dock_color_team) {
+ color = '1 0 0' * hud_dock_color_team;
}
else
- color = stov(autocvar_hud_dock_color);
+ {
+ string hud_dock_color = cvar_string("hud_dock_color");
+ if(hud_dock_color == "shirt") {
+ f = stof(getplayerkey(player_localentnum - 1, "colors"));
+ color = colormapPaletteColor(floor(f / 16), 0);
+ }
+ else if(hud_dock_color == "pants") {
+ f = stof(getplayerkey(player_localentnum - 1, "colors"));
+ color = colormapPaletteColor(mod(f, 16), 1);
+ }
+ else
+ color = stov(hud_dock_color);
+ }
string pic;
pic = strcat(hud_skin_path, "/", autocvar_hud_dock);
pic = "gfx/hud/default/dock_medium";
}
}
- drawpic('0 0 0', pic, eX * vid_conwidth + eY * vid_conheight, color, autocvar_hud_dock_alpha * hud_fade_alpha, DRAWFLAG_NORMAL); // no aspect ratio forcing on dock...
+ drawpic('0 0 0', pic, eX * vid_conwidth + eY * vid_conheight, color, cvar("hud_dock_alpha") * hud_fade_alpha, DRAWFLAG_NORMAL); // no aspect ratio forcing on dock...
}
// cache the panel order into the panel_order array
float weapon_hits[WEP_MAXCOUNT];
float weapon_fired[WEP_MAXCOUNT];
-#define acc_color(i) stov(cvar_string(strcat("hud_panel_weapons_accuracy_color", ftos(i))))
#define MAX_ACCURACY_LEVELS 10
float acc_lev[MAX_ACCURACY_LEVELS];
+vector acc_col[MAX_ACCURACY_LEVELS];
float acc_levels;
string acc_color_levels;
// Little help for the poor people who have to make sense of this: Start from the bottom ;)
#define HUD_Panel_GetProgressBarColor(item) \
- progressbar_color = autocvar_hud_progressbar_##item##_color
+ progressbar_color = stov(cvar_string("hud_progressbar_" #item "_color"))
#define HUD_Panel_GetProgressBarColorForString(item) \
switch(item) {\
case "strength": HUD_Panel_GetProgressBarColor(strength); break;\
// Update all common cvars of given panel name
#define HUD_Panel_UpdateCvars(name) \
panel_enabled = autocvar_hud_panel_##name; \
-panel_pos = autocvar_hud_panel_##name##_pos; \
-panel_size = autocvar_hud_panel_##name##_size; \
-panel_bg_str = autocvar_hud_panel_##name##_bg; \
-panel_bg_color_str = autocvar_hud_panel_##name##_bg_color; \
-panel_bg_color_team_str = autocvar_hud_panel_##name##_bg_color_team; \
-panel_bg_alpha_str = autocvar_hud_panel_##name##_bg_alpha; \
-panel_bg_border_str = autocvar_hud_panel_##name##_bg_border; \
-panel_bg_padding_str = autocvar_hud_panel_##name##_bg_padding; \
+panel_pos = stov(cvar_string("hud_panel_" #name "_pos")); \
+panel_size = stov(cvar_string("hud_panel_" #name "_size")); \
+panel_bg_str = cvar_string("hud_panel_" #name "_bg"); \
+panel_bg_color_str = cvar_string("hud_panel_" #name "_bg_color"); \
+panel_bg_color_team_str = cvar_string("hud_panel_" #name "_bg_color_team"); \
+panel_bg_alpha_str = cvar_string("hud_panel_" #name "_bg_alpha"); \
+panel_bg_border_str = cvar_string("hud_panel_" #name "_bg_border"); \
+panel_bg_padding_str = cvar_string("hud_panel_" #name "_bg_padding"); \
HUD_Panel_StringVars()\
if(menu_enabled == 2 && active_panel == highlightedPanel) {\
HUD_Panel_GetMenuSize()\
}
#define HUD_Panel_UpdatePosSize(name) \
-panel_pos = autocvar_hud_panel_##name##_pos; \
-panel_size = autocvar_hud_panel_##name##_size; \
+panel_pos = stov(cvar_string("hud_panel_" #name "_pos")); \
+panel_size = stov(cvar_string("hud_panel_" #name "_size")); \
HUD_Panel_GetScaledVectors()\
if(menu_enabled == 2 && active_panel == highlightedPanel) {\
HUD_Panel_GetMenuSize()\
HUD_Panel_GetMenuPos()\
}\
-panel_bg_border_str = autocvar_hud_panel_##name##_bg_border; \
+panel_bg_border_str = cvar_string("hud_panel_" #name "_bg_border"); \
HUD_Panel_GetBorder()
// Update pos and size of given panel id
vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
{
float i;
- float weapon_hit, weapon_damage, weapon_stats;
float weapon_cnt = WEP_COUNT - 3; // either minstanex/nex are hidden, no port-o-launch, no tuba
float rows;
if(cvar("scoreboard_accuracy_doublerows"))
if(getstati(STAT_SWITCHWEAPON) == WEP_MINSTANEX)
g_minstagib = 1; // TODO: real detection for minstagib?
+ float weapon_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);
+
if (!acc_levels)
rgb = '1 1 1';
+ else if (acc_col_x[0] == -1)
+ for (i = 0; i < acc_levels; ++i)
+ acc_col[i] = stov(cvar_string(strcat("accuracy_color", ftos(i))));
for(i = WEP_FIRST; i <= WEP_LAST; ++i)
{
continue;
weapon_hit = weapon_hits[i-WEP_FIRST];
weapon_damage = weapon_fired[i-WEP_FIRST];
- if(weapon_damage)
- weapon_stats = bound(0, floor(100 * weapon_hit / weapon_damage), 100);
- float weapon_alpha;
+ float weapon_alpha;
if(weapon_damage)
+ {
+ weapon_stats = bound(0, floor(100 * weapon_hit / weapon_damage), 100);
weapon_alpha = scoreboard_alpha_fg;
+ }
else
weapon_alpha = 0.2 * scoreboard_alpha_fg;
// inject color j+1 in color j, how much depending on how much weapon_stats is higher than level j
float factor;
factor = (weapon_stats - acc_lev[j]) / (acc_lev[j+1] - acc_lev[j]);
- rgb = acc_color(j);
- rgb = rgb + factor * (acc_color(j+1) - rgb);
+ rgb = acc_col[j];
+ rgb = rgb + factor * (acc_col[j+1] - rgb);
}
drawstring(pos + '1 0 0' * padding + '0 1 0' * weapon_height, s, '1 1 0' * fontsize, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
HUD_UpdatePlayerTeams();
- scoreboard_alpha_bg = cvar("scoreboard_alpha_bg") * scoreboard_fade_alpha * (1 - cvar("_menu_alpha"));
- scoreboard_alpha_fg = cvar_or("scoreboard_alpha_fg", 1.0) * scoreboard_fade_alpha * (1 - cvar("_menu_alpha"));
+ scoreboard_alpha_bg = cvar("scoreboard_alpha_bg") * scoreboard_fade_alpha * (1 - autocvar__menu_alpha);
+ scoreboard_alpha_fg = cvar_or("scoreboard_alpha_fg", 1.0) * scoreboard_fade_alpha * (1 - autocvar__menu_alpha);
scoreboard_highlight = cvar("scoreboard_highlight");
scoreboard_highlight_alpha = cvar_or("scoreboard_highlight_alpha", 0.10) * scoreboard_alpha_fg;
scoreboard_highlight_alpha_self = cvar_or("scoreboard_highlight_alpha_self", 0.25) * scoreboard_alpha_fg;
waypointsprite_distancefadealpha = cvar_or("g_waypointsprite_distancefadealpha", 1);
waypointsprite_distancefadescale = cvar_or("g_waypointsprite_distancefadescale", 1);
waypointsprite_distancefadedistance = vlen(mi_max - mi_min) * cvar_or("g_waypointsprite_distancefadedistancemultiplier", 1);
- waypointsprite_alpha = cvar_or("g_waypointsprite_alpha", 1) * (1 - cvar("_menu_alpha"));
+ waypointsprite_alpha = cvar_or("g_waypointsprite_alpha", 1) * (1 - autocvar__menu_alpha);
if(!waypointsprite_initialized)
{
float DEATH_FIRE = 10017;
float DEATH_TURRET = 10020;
float DEATH_QUIET = 10021;
+float DEATH_HEADSHOT = 10022;
float DEATH_SBMINIGUN = 10030;
float DEATH_SBROCKET = 10031;
string HUD_PANELNAME_INFOMESSAGES = "infomessages";
float HUD_MENU_ENABLE = 0;
+
+#define SERVERFLAG_ALLOW_FULLBRIGHT 1
return nearest;
}
#endif
+
+float vercmp_recursive(string v1, string v2)
+{
+ float dot1, dot2;
+ string s1, s2;
+ float r;
+
+ dot1 = strstrofs(v1, ".", 0);
+ dot2 = strstrofs(v2, ".", 0);
+ if(dot1 == -1)
+ s1 = v1;
+ else
+ s1 = substring(v1, 0, dot1);
+ if(dot2 == -1)
+ s2 = v2;
+ else
+ s2 = substring(v2, 0, dot2);
+
+ r = stof(s1) - stof(s2);
+ if(r != 0)
+ return r;
+
+ r = strcasecmp(s1, s2);
+ if(r != 0)
+ return r;
+
+ if(dot1 == -1)
+ if(dot2 == -1)
+ return 0;
+ else
+ return -1;
+ else
+ if(dot2 == -1)
+ return 1;
+ else
+ return vercmp_recursive(substring(v1, dot1 + 1, 999), substring(v2, dot2 + 1, 999));
+}
+
+float vercmp(string v1, string v2)
+{
+ if(strcasecmp(v1, v2) == 0) // early out check
+ return 0;
+
+ // "git" beats all
+ if(v1 == "git")
+ return 1;
+ if(v2 == "git")
+ return -1;
+
+ return vercmp_recursive(v1, v2);
+}
#ifndef MENUQC
vector NearestPointOnBox(entity box, vector org);
#endif
+
+float vercmp(string v1, string v2);
string(string in) uri_escape = #510;
string(string in) uri_unescape = #511;
+//DP_QC_URI_GET
+//idea: divVerent
+//darkplaces implementation: divVerent
+//loads text from an URL into a string
+//returns 1 on success of initiation, 0 if there are too many concurrent
+//connections already or if the URL is invalid
+//the following callback will receive the data and MUST exist!
+// void(float id, float status, string data) URI_Get_Callback;
+//status is either
+// negative for an internal error,
+// 0 for success, or
+// the HTTP response code on server error (e.g. 404)
+//if 1 is returned by uri_get, the callback will be called in the future
+float(string url, float id) uri_get = #513;
+
string(string, float) netaddress_resolve = #625;
string(string search, string replace, string subject) strreplace = #484;
return hsl_to_rgb(v_x * 6 * eX + eY + v_y / 0.875 * eZ);
}
+vector color_hslimage(vector v, vector margin)
+{
+ vector pos;
+ v = rgb_to_hsl(v);
+ if (v_y)
+ {
+ pos_x = v_x / 6;
+ pos_y = v_z * 0.875;
+ }
+ else // grey scale
+ {
+ pos_x = v_z;
+ pos_y = 0.875 + 0.07;
+ }
+ pos_x = margin_x + pos_x * (1 - 2 * margin_x);
+ pos_y = margin_y + pos_y * (1 - 2 * margin_y);
+ return pos;
+}
+
float XonoticColorpicker_mouseDrag(entity me, vector coords)
{
float i;
#ifdef INTERFACE
CLASS(XonoticColorpickerString) EXTENDS(Image)
- METHOD(XonoticColorpickerString, configureXonoticColorpickerString, void(entity, string))
+ METHOD(XonoticColorpickerString, configureXonoticColorpickerString, void(entity, string, string))
METHOD(XonoticColorpickerString, mousePress, float(entity, vector))
METHOD(XonoticColorpickerString, mouseRelease, float(entity, vector))
METHOD(XonoticColorpickerString, mouseDrag, float(entity, vector))
METHOD(XonoticColorpickerString, draw, void(entity))
ATTRIB(XonoticColorpickerString, disabledAlpha, float, 0.3)
ENDCLASS(XonoticColorpickerString)
-entity makeXonoticColorpickerString(string theCvar);
+entity makeXonoticColorpickerString(string theCvar, string theDefaultCvar);
#endif
#ifdef IMPLEMENTATION
-entity makeXonoticColorpickerString(string theCvar)
+entity makeXonoticColorpickerString(string theCvar, string theDefaultCvar)
{
entity me;
me = spawnXonoticColorpickerString();
- me.configureXonoticColorpickerString(me, theCvar);
+ me.configureXonoticColorpickerString(me, theCvar, theDefaultCvar);
return me;
}
-void XonoticColorpickerString_configureXonoticColorpickerString(entity me, string theCvar)
+void XonoticColorpickerString_configureXonoticColorpickerString(entity me, string theCvar, string theDefaultCvar)
{
me.cvarName = theCvar;
me.configureImage(me, me.image);
- me.prevcoords = '1 1 0';
+ if(cvar_string(theCvar) != "")
+ me.prevcoords = color_hslimage(stov(cvar_string(theCvar)), me.imagemargin);
+ else // use default
+ me.prevcoords = color_hslimage(stov(cvar_string(theDefaultCvar)), me.imagemargin);
}
float XonoticColorpickerString_mousePress(entity me, vector coords)
if(coords_x <= 1 - margin_x)
if(coords_y <= 1 - margin_y)
{
- cvar_set(me.cvarName, sprintf("%v", hslimage_color(coords, margin)));
me.prevcoords = coords;
}
sz = draw_PictureSize(strcat(me.src, "_selected"));
sz = globalToBoxSize(sz, draw_scale);
- if(me.disabled)
- me.prevcoords = '1 1 0';
- else
+ if(!me.disabled)
+ {
+ cvar_set(me.cvarName, sprintf("%v", hslimage_color(me.prevcoords, me.imagemargin)));
draw_Picture(me.imgOrigin + me.prevcoords - 0.5 * sz, strcat(me.src, "_selected"), sz, '1 1 1', 1);
+ }
draw_alpha = save;
}
#endif
me.loadCvars(me);
me.configureRadioButton(me, string_null, me.fontSize, me.image, theGroup, 0);
me.srcMulti = 1;
- me.src3 = strzone(strcat("/gfx/crosshair", ftos(me.cvarValueFloat)));
+ if(me.cvarValueFloat == -1)
+ me.src3 = strzone(strcat("/gfx/crosshair", cvar("crosshair")));
+ else
+ me.src3 = strzone(strcat("/gfx/crosshair", ftos(me.cvarValueFloat)));
me.src4 = "/gfx/crosshairdot";
}
void XonoticCrosshairButton_setChecked(entity me, float val)
{
+ if(me.cvarValueFloat != -1) // preview shouldn't work as a button
if(val != me.checked)
{
me.checked = val;
vector sz, rgb;
float a;
- rgb = eX * cvar("crosshair_color_red") + eY * cvar("crosshair_color_green") + eZ * cvar("crosshair_color_blue");
+ rgb = stov(cvar_string("crosshair_color"));
a = cvar("crosshair_alpha");
- if(!me.checked && !me.focused)
+ if(!me.checked && !me.focused && me.cvarValueFloat != -1)
{
a *= me.disabledAlpha;
rgb = '1 1 1';
}
+ if(me.cvarValueFloat == -1) // update the preview if this is the preview button
+ {
+ if(me.src3)
+ strunzone(me.src3);
+ me.src3 = strzone(strcat("/gfx/crosshair", cvar_string("crosshair")));
+ me.focused = 1;
+ me.checked = 0;
+ }
+
SUPER(XonoticCrosshairButton).draw(me);
sz = draw_PictureSize(me.src3);
sz = globalToBoxSize(sz, draw_scale);
- sz = (10 * '1 1 0' + sz * cvar("crosshair_size")) * 0.05; // (10 * '1 1 0' + ...) * 0.05 here to make visible size changes happen also at bigger sizes
- if(sz_x > 0.95)
- sz = sz * (0.95 / sz_x);
- if(sz_y > 0.95)
- sz = sz * (0.95 / sz_y);
+ if(me.cvarValueFloat == -1)
+ {
+ sz = (6 * '1 1 0' + sz * cvar("crosshair_size")) * 0.08; // (6 * '1 1 0' + ...) * 0.08 here to make visible size changes happen also at bigger sizes
+ if(sz_x > 0.95)
+ sz = sz * (0.95 / sz_x);
+ if(sz_y > 0.95)
+ sz = sz * (0.95 / sz_y);
+ }
+ else // show the crosshair picker at full size
+ sz = '0.95 0.95 0';
draw_Picture('0.5 0.5 0' - 0.5 * sz, me.src3, sz, rgb, a);
if(cvar("crosshair_dot"))
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
+ me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", cvar_string("hud_panel_bg_color"), strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Ammo bar color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_weapons_ammo_color"));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_weapons_ammo_color", "hud_panel_weapons_ammo_color"));
setDependent(e, "hud_panel_weapons_ammo", 1, 1);
me.TR(me);
me.TR(me);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_bg_color"));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_bg_color", "hud_panel_bg_color"));
me.TR(me);
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_dock_color"));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_dock_color", "hud_dock_color"));
me.TR(me);
me.TR(me);
me.TDempty(me, 0.2);
ATTRIB(XonoticMutatorsDialog, title, string, "Mutators")
ATTRIB(XonoticMutatorsDialog, color, vector, SKINCOLOR_DIALOG_MUTATORS)
ATTRIB(XonoticMutatorsDialog, intendedWidth, float, 0.9)
- ATTRIB(XonoticMutatorsDialog, rows, float, 18)
+ ATTRIB(XonoticMutatorsDialog, rows, float, 17)
ATTRIB(XonoticMutatorsDialog, columns, float, 6)
ATTRIB(XonoticMutatorsDialog, refilterEntity, entity, NULL)
ENDCLASS(XonoticMutatorsDialog)
s = strcat(s, ", Cloaked");
if(cvar("g_grappling_hook"))
s = strcat(s, ", Hook");
- if(cvar("g_laserguided_missile"))
- s = strcat(s, ", LG missiles");
if(cvar("g_midair"))
s = strcat(s, ", Midair");
if(cvar("g_vampire"))
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_jetpack", "Jet pack"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_laserguided_missile", "Laser guided missiles"));
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_rocket_flying", "Rocket Flying"));
e0.textEntity = main.weaponsDialog;
e0.allowCut = 1;
me.TR(me);
- me.TD(me, 1, 0.75, e = makeXonoticTextLabel(0, "Crosshair:"));
- me.TD(me, 1, 1.00, e = makeXonoticCheckBox(0, "crosshair_per_weapon", "Per weapon"));
- me.TD(me, 1, 1.25, e = makeXonoticCheckBox(1, "crosshair_color_override", "& Per weapon colors"));
- setDependent(e, "crosshair_per_weapon", 1, 1);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair:"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "crosshair_per_weapon", "Per weapon"));
me.TR(me);
- me.TDempty(me, 0.5);
+ me.TDempty(me, 0.2);
for(i = 1; i <= 10; ++i) {
me.TDNoMargin(me, 1, 2 / 10, e = makeXonoticCrosshairButton(3, i), '1 1 0');
setDependent(e, "crosshair_per_weapon", 0, 0);
}
+ // show a larger preview of the selected crosshair
+ me.TDempty(me, 0.2);
+ me.TDNoMargin(me, 2, 2 / 5, e = makeXonoticCrosshairButton(4, -1), '1 1 0'); // crosshair -1 makes this a preview
+ setDependent(e, "crosshair_per_weapon", 0, 0);
me.TR(me);
- me.TDempty(me, 0.5);
+ me.TDempty(me, 0.2);
for(i = 11; i <= 20; ++i) {
me.TDNoMargin(me, 1, 2 / 10, e = makeXonoticCrosshairButton(3, i), '1 1 0');
setDependent(e, "crosshair_per_weapon", 0, 0);
me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.1, "crosshair_alpha"));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair red:"));
- me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_red"));
- setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair color:"));
+ me.TD(me, 2, 1.8, e = makeXonoticColorpickerString("crosshair_color", "crosshair_color"));
+ setDependent(e, "crosshair_color_per_weapon", 0, 0);
me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair green:"));
- me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_green"));
- setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair blue:"));
- me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_blue"));
- setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
+ me.TDempty(me, 0.3);
+ me.TD(me, 1, 0.7, e = makeXonoticCheckBox(0, "crosshair_color_per_weapon", "Per weapon"));
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_dot", "Enable centered dot"));
me.TR(me);
setDependent(e, "crosshair_dot", 1, 1);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Hit test:"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "0", "None"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "1", "TrueAim"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "1.25", "Enemies"));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(5, "crosshair_hittest", "0", "None"));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(5, "crosshair_hittest", "1", "TrueAim"));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(5, "crosshair_hittest", "1.25", "Enemies"));
+ me.TR(me);
me.TR(me);
me.TDempty(me, 0.4);
me.TD(me, 1, 2.2, e = makeXonoticButton("Waypoints setup...", '0 0 0'));
me.TR(me);
#ifdef ALLOW_FORCEMODELS
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Force models:"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(2, string_null, string_null, "None"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(2, "cl_forceplayermodelsfromxonotic", string_null, "Custom"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(2, "cl_forceplayermodels", string_null, "All"));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, string_null, string_null, "None"));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, "cl_forceplayermodelsfromxonotic", string_null, "Custom"));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, "cl_forceplayermodels", string_null, "All"));
#endif
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_gentle", "Disable gore effects"));
me.TR(me);
METHOD(XonoticServerList, resizeNotify, void(entity, vector, vector, vector, vector))
METHOD(XonoticServerList, keyDown, float(entity, float, float, float))
+ ATTRIB(XonoticServerList, iconsSizeFactor, float, 0.85)
+
ATTRIB(XonoticServerList, realFontSize, vector, '0 0 0')
ATTRIB(XonoticServerList, realUpperMargin, float, 0)
ATTRIB(XonoticServerList, columnIconsOrigin, float, 0)
ATTRIB(XonoticServerList, lastClickedTime, float, 0)
ATTRIB(XonoticServerList, ipAddressBoxFocused, float, -1)
+
+ ATTRIB(XonoticServerList, seenIPv4, float, 0)
+ ATTRIB(XonoticServerList, seenIPv6, float, 0)
ENDCLASS(XonoticServerList)
entity makeXonoticServerList();
void ServerList_Connect_Click(entity btn, entity me);
me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
me.columnIconsOrigin = 0;
- me.columnIconsSize = me.realFontSize_x * 2;
- me.columnPingSize = me.realFontSize_x * 4;
- me.columnMapSize = me.realFontSize_x * 12;
+ me.columnIconsSize = me.realFontSize_x * 3 * me.iconsSizeFactor;
+ me.columnPingSize = me.realFontSize_x * 3;
+ me.columnMapSize = me.realFontSize_x * 10;
me.columnTypeSize = me.realFontSize_x * 4;
- me.columnPlayersSize = me.realFontSize_x * 6;
+ me.columnPlayersSize = me.realFontSize_x * 4;
me.columnNameSize = 1 - me.columnPlayersSize - me.columnMapSize - me.columnPingSize - me.columnIconsSize - me.columnTypeSize - 5 * me.realFontSize_x;
me.columnPingOrigin = me.columnIconsOrigin + me.columnIconsSize + me.realFontSize_x;
me.columnNameOrigin = me.columnPingOrigin + me.columnPingSize + me.realFontSize_x;
// layout: Ping, Server name, Map name, NP, TP, MP
string s;
float p, q;
+ float isv4, isv6;
vector theColor;
float theAlpha;
}
s = gethostcachestring(SLIST_FIELD_CNAME, i);
+
+ isv4 = isv6 = 0;
+ if(substring(s, 0, 1) == "[")
+ {
+ isv6 = 1;
+ me.seenIPv6 += 1;
+ }
+ else if(strstrofs("0123456789", substring(s, 0, 1), 0) >= 0)
+ {
+ isv4 = 1;
+ me.seenIPv4 += 1;
+ }
+
q = stof(substring(crypto_getencryptlevel(s), 0, 1));
if((q <= 0 && cvar("crypto_aeslevel") >= 3) || (q >= 3 && cvar("crypto_aeslevel") <= 0))
{
s = gethostcachestring(SLIST_FIELD_QCSTATUS, i);
{
vector iconSize;
- iconSize_y = 1;
- iconSize_x = iconSize_y * (absSize_y / absSize_x);
+ iconSize_y = me.realFontSize_y * me.iconsSizeFactor;
+ iconSize_x = me.realFontSize_x * me.iconsSizeFactor;
vector iconPos;
- iconPos_x = (me.columnIconsSize - 2 * iconSize_x) * 0.5;
+ iconPos_x = (me.columnIconsSize - 3 * iconSize_x) * 0.5;
iconPos_y = (1 - iconSize_y) * 0.5;
- draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_pure", ftos(strstrofs(s, ":P0:", 0) >= 0)), iconSize, '1 1 1', 1);
+ if not(me.seenIPv4 && me.seenIPv6)
+ {
+ iconPos_x += iconSize_x * 0.5;
+ }
+ else if(me.seenIPv4 && me.seenIPv6)
+ {
+ if(isv6)
+ draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_ipv6"), iconSize, '1 1 1', 1);
+ else if(isv4)
+ draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_ipv4"), iconSize, '1 1 1', 1);
+ iconPos_x += iconSize_x;
+ }
- iconPos_x += iconSize_x;
draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_aeslevel", ftos(q)), iconSize, '1 1 1', 1);
+ iconPos_x += iconSize_x;
+
+ draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_pure", ftos(strstrofs(s, ":P0:", 0) >= 0)), iconSize, '1 1 1', 1);
+ iconPos_x += iconSize_x;
}
s = ftos(p);
- draw_Text(me.realUpperMargin * eY + (me.columnPingSize - draw_TextWidth(s, 0, me.realFontSize)) * eX, s, me.realFontSize, theColor, theAlpha, 0);
+ draw_Text(me.realUpperMargin * eY + (me.columnPingOrigin + me.columnPingSize - draw_TextWidth(s, 0, me.realFontSize)) * eX, s, me.realFontSize, theColor, theAlpha, 0);
s = draw_TextShortenToWidth(gethostcachestring(SLIST_FIELD_NAME, i), me.columnNameSize, 0, me.realFontSize);
draw_Text(me.realUpperMargin * eY + me.columnNameOrigin * eX, s, me.realFontSize, theColor, theAlpha, 0);
s = draw_TextShortenToWidth(gethostcachestring(SLIST_FIELD_MAP, i), me.columnMapSize, 0, me.realFontSize);
setDependent_Check(e);
}
-// EXTRESPONSE SYSTEM ////////////////////////////////////////////////////////
+// URI SYSTEM ////////////////////////////////////////////////////////
-float _Nex_ExtResponseSystem_RequestsSent;
-float _Nex_ExtResponseSystem_VersionHandled;
+float _Nex_ExtResponseSystem_Queried;
string _Nex_ExtResponseSystem_UpdateTo;
-float _Nex_ExtResponseSystem_RetryTime;
-float _Nex_ExtResponseSystem_RetryTime_LastDelay;
-void() Item_Nex_ExtResponseSystem_SendQuery =
+float URI_GET_DISCARD = 0;
+
+float URI_GET_UPDATENOTIFICATION = 1;
+void UpdateNotification_URI_Get_Callback(float id, float status, string data);
+
+void URI_Get_Callback(float id, float status, string data)
{
- dprint("Sending extended response requests...\n");
- localcmd(strcat("packet 64.22.107.122:27950 \"getExtResponse checkUpdates xonotic ", cvar_string("g_xonoticversion"), "\"\n"));
- _Nex_ExtResponseSystem_RequestsSent = TRUE;
- _Nex_ExtResponseSystem_RetryTime_LastDelay = _Nex_ExtResponseSystem_RetryTime_LastDelay * 2 + 1;
- _Nex_ExtResponseSystem_RetryTime = time + _Nex_ExtResponseSystem_RetryTime_LastDelay;
+ if (id == URI_GET_DISCARD)
+ {
+ // discard
+ }
+ else if(id == URI_GET_UPDATENOTIFICATION)
+ {
+ // online ban list
+ UpdateNotification_URI_Get_Callback(id, status, data);
+ }
+ else
+ {
+ print("Received HTTP request data for an invalid id ", ftos(id), ".\n");
+ }
}
-void(float argc) Item_Nex_ExtResponseSystem_Parse =
+void UpdateNotification_URI_Get_Callback(float id, float status, string data)
{
- dprint("Received extended response packet from ", argv(0), "\n");
- if(!_Nex_ExtResponseSystem_RequestsSent)
+ float n;
+
+ if(_Nex_ExtResponseSystem_UpdateTo)
{
- dprint(" But I haven't sent a request yet! Ignoring.\n");
+ print("error: UpdateNotification_URI_Get_Callback has been called before\n");
return;
}
- if(argv(1) == "noUpdateAvailable")
+ if(status != 0)
{
- if(_Nex_ExtResponseSystem_VersionHandled)
- {
- dprint(" duplicated update notice, ignored\n");
- return;
- }
- _Nex_ExtResponseSystem_VersionHandled = 1;
+ print(sprintf("error receiving update notification: status is %d\n", status));
+ return;
}
- else if(argv(1) == "updateAvailable")
+ if(substring(data, 0, 1) == "<")
{
- if(_Nex_ExtResponseSystem_VersionHandled)
- {
- dprint(" duplicated update notice, ignored\n");
- return;
- }
- _Nex_ExtResponseSystem_VersionHandled = 1;
- _Nex_ExtResponseSystem_UpdateTo = strzone(argv(2)); // note: only one packet can be handled, so this can't be a leak
+ print("error: received HTML instead of an update notification\n");
+ return;
+ }
+ if(strstrofs(data, "\r", 0) != -1)
+ {
+ print("error: received carriage returns from update notification server\n");
+ return;
}
- else
- dprint(" UNKNOWN RESPONSE TYPE: ", argv(1), "\n");
-}
-void() Item_Nex_ExtResponseSystem_CheckForResponse =
-{
- local string s;
- local float argc;
- while(strlen((s = getextresponse())))
+ if(data == "")
+ n = 0;
+ else
+ n = tokenizebyseparator(data, "\n");
+
+ if(n >= 1)
{
- argc = tokenize_console(s);
- Item_Nex_ExtResponseSystem_Parse(argc);
+ _Nex_ExtResponseSystem_UpdateTo = argv(0);
+
+ if(vercmp(cvar_string("g_xonoticversion"), _Nex_ExtResponseSystem_UpdateTo) >= 0)
+ {
+ _Nex_ExtResponseSystem_UpdateTo = ""; // no update needed
+ }
+ else
+ {
+ // update needed
+ if(n >= 2)
+ print(sprintf("Update can be downloaded at:\n%s\n", argv(1)));
+ }
+
+ _Nex_ExtResponseSystem_UpdateTo = strzone(_Nex_ExtResponseSystem_UpdateTo);
}
}
-// END OF EXTRESPONSE SYSTEM /////////////////////////////////////////////////
+// END OF URI SYSTEM ////////////////////////////////////////////////////////
float preMenuInit()
{
if(cvar("menu_updatecheck"))
{
- Item_Nex_ExtResponseSystem_CheckForResponse();
- if(!_Nex_ExtResponseSystem_VersionHandled)
- if(time > _Nex_ExtResponseSystem_RetryTime)
- Item_Nex_ExtResponseSystem_SendQuery();
+ if(!_Nex_ExtResponseSystem_Queried)
+ {
+ _Nex_ExtResponseSystem_Queried = 1;
+ uri_get(sprintf("http://www.xonotic.org/dl/checkupdate.txt?version=%s", uri_escape(cvar_string("g_xonoticversion"))), URI_GET_UPDATENOTIFICATION);
+ }
}
if(_Nex_ExtResponseSystem_UpdateTo != "")
{
+ // TODO rather turn this into a dialog
fs = ((1/draw_scale_x) * eX + (1/draw_scale_y) * eY) * 12;
line = eY * fs_y;
sz_x = draw_TextWidth(" http://www.xonotic.com/ ", 0, fs);
sz_y = 3 * fs_y;
- draw_alpha = sin(time * 0.112 - 0.3) * 0.7;
+ draw_alpha = sin(time * 0.112 - 0.3) * 10;
mid = eX * (0.5 + 0.5 * (1 - sz_x) * cos(time * 0.071))
+ eY * (0.5 + 0.5 * (1 - sz_y) * sin(time * 0.071));
draw_Fill(mid - 0.5 * sz, sz, '1 1 0', 1);
draw_CenterText(mid - 1 * line, strcat("Update to ", _Nex_ExtResponseSystem_UpdateTo, " now!"), fs, '1 0 0', 1, 0);
- draw_CenterText(mid - 0 * line, "http://www.xonotic.com/", fs, '0 0 1', 1, 0);
+ draw_CenterText(mid - 0 * line, "http://www.xonotic.org/", fs, '0 0 1', 1, 0);
}
if not(campaign_name_previous)
campaign_name_previous = strzone(strcat(campaign_name, "x")); // force unequal
}
if(g_weaponarena_random)
+ {
+ if(g_weaponarena_random_with_laser)
+ self.weapons &~= WEPBIT_LASER;
self.weapons = randombits(self.weapons, g_weaponarena_random, FALSE);
+ if(g_weaponarena_random_with_laser)
+ self.weapons |= WEPBIT_LASER;
+ }
self.items = start_items;
self.jump_interval = time;
WriteString(MSG_ENTITY, "");
WriteByte(MSG_ENTITY, self.count * 255.0); // g_balance_armor_blockpercent
WriteByte(MSG_ENTITY, self.cnt * 255.0); // g_balance_weaponswitchdelay
- WriteCoord(MSG_ENTITY, self.bouncefactor); // g_balance_grenadelauncher_secondary_bouncefactor
- WriteCoord(MSG_ENTITY, self.bouncestop); // g_balance_grenadelauncher_secondary_bouncestop
+ WriteCoord(MSG_ENTITY, self.bouncefactor); // g_balance_grenadelauncher_bouncefactor
+ WriteCoord(MSG_ENTITY, self.bouncestop); // g_balance_grenadelauncher_bouncestop
WriteByte(MSG_ENTITY, cvar("g_balance_nex_secondary")); // client has to know if it should zoom or not
WriteByte(MSG_ENTITY, cvar("g_balance_campingrifle_secondary")); // client has to know if it should zoom or not
+ WriteByte(MSG_ENTITY, serverflags); // client has to know if it should zoom or not
return TRUE;
}
self.cnt = cvar("g_balance_weaponswitchdelay");
self.SendFlags |= 1;
}
- if(self.bouncefactor != cvar("g_balance_grenadelauncher_secondary_bouncefactor"))
+ if(self.bouncefactor != cvar("g_balance_grenadelauncher_bouncefactor"))
{
- self.bouncefactor = cvar("g_balance_grenadelauncher_secondary_bouncefactor");
+ self.bouncefactor = cvar("g_balance_grenadelauncher_bouncefactor");
self.SendFlags |= 1;
}
- if(self.bouncestop != cvar("g_balance_grenadelauncher_secondary_bouncestop"))
+ if(self.bouncestop != cvar("g_balance_grenadelauncher_bouncestop"))
{
- self.bouncestop = cvar("g_balance_grenadelauncher_secondary_bouncestop");
+ self.bouncestop = cvar("g_balance_grenadelauncher_bouncestop");
self.SendFlags |= 1;
}
}
*/
}
+float PlayerInIDList(entity p, string idlist)
+{
+ float n, i;
+ string s;
+
+ // NOTE: we do NOT check crypto_keyfp here, an unsigned ID is fine too for this
+ if not(p.crypto_idfp)
+ return 0;
+
+ // this function allows abbreviated player IDs too!
+ n = tokenize_console(idlist);
+ for(i = 0; i < n; ++i)
+ {
+ s = argv(i);
+ if(s == substring(p.crypto_idfp, 0, strlen(s)))
+ return 1;
+ }
+
+ return 0;
+}
+
/*
=============
ClientConnect
//if(g_domination)
// dom_player_join_team(self);
+ // identify the right forced team
+ if(PlayerInIDList(self, cvar_string("g_forced_team_red")))
+ self.team_forced = COLOR_TEAM1;
+ else if(PlayerInIDList(self, cvar_string("g_forced_team_blue")))
+ self.team_forced = COLOR_TEAM2;
+ else if(PlayerInIDList(self, cvar_string("g_forced_team_yellow")))
+ self.team_forced = COLOR_TEAM3;
+ else if(PlayerInIDList(self, cvar_string("g_forced_team_pink")))
+ self.team_forced = COLOR_TEAM4;
+ else if(cvar_string("g_forced_team_otherwise") == "red")
+ self.team_forced = COLOR_TEAM1;
+ else if(cvar_string("g_forced_team_otherwise") == "blue")
+ self.team_forced = COLOR_TEAM2;
+ else if(cvar_string("g_forced_team_otherwise") == "yellow")
+ self.team_forced = COLOR_TEAM3;
+ else if(cvar_string("g_forced_team_otherwise") == "pink")
+ self.team_forced = COLOR_TEAM4;
+ else if(cvar_string("g_forced_team_otherwise") == "spectate")
+ self.team_forced = -1;
+ else if(cvar_string("g_forced_team_otherwise") == "spectator")
+ self.team_forced = -1;
+ else
+ self.team_forced = 0;
+
+ if(!teams_matter)
+ if(self.team_forced > 0)
+ self.team_forced = 0;
+
JoinBestTeam(self, FALSE, FALSE); // if the team number is valid, keep it
- if((cvar("sv_spectate") == 1 && !g_lms) || cvar("g_campaign")) {
+ if((cvar("sv_spectate") == 1 && !g_lms) || cvar("g_campaign") || self.team_forced < 0) {
self.classname = "observer";
} else {
if(teams_matter)
bot_relinkplayerlist();
- // remove laserdot
- if(self.weaponentity)
- if(self.weaponentity.lasertarget)
- remove(self.weaponentity.lasertarget);
-
if(g_arena)
{
Spawnqueue_Unmark(self);
void LeaveSpectatorMode()
{
if(isJoinAllowed()) {
- if(!teams_matter || cvar("g_campaign") || cvar("g_balance_teams") || (self.wasplayer && cvar("g_changeteam_banned"))) {
+ if(!teams_matter || cvar("g_campaign") || cvar("g_balance_teams") || (self.wasplayer && cvar("g_changeteam_banned")) || self.team_forced > 0) {
self.classname = "player";
if(cvar("g_campaign") || cvar("g_balance_teams") || cvar("g_balance_teams_force"))
* @return bool TRUE if the player is allowed to join, false otherwise
*/
float isJoinAllowed() {
+ if(self.team_forced < 0)
+ return FALSE; // forced spectators can never join
+
if (!cvar("g_maxplayers"))
return TRUE;
}
}
-float vercmp_recursive(string v1, string v2)
-{
- float dot1, dot2;
- string s1, s2;
- float r;
-
- dot1 = strstrofs(v1, ".", 0);
- dot2 = strstrofs(v2, ".", 0);
- if(dot1 == -1)
- s1 = v1;
- else
- s1 = substring(v1, 0, dot1);
- if(dot2 == -1)
- s2 = v2;
- else
- s2 = substring(v2, 0, dot2);
-
- r = stof(s1) - stof(s2);
- if(r != 0)
- return r;
-
- r = strcasecmp(s1, s2);
- if(r != 0)
- return r;
-
- if(dot1 == -1)
- if(dot2 == -1)
- return 0;
- else
- return -1;
- else
- if(dot2 == -1)
- return 1;
- else
- return vercmp_recursive(substring(v1, dot1 + 1, 999), substring(v2, dot2 + 1, 999));
-}
-
-float vercmp(string v1, string v2)
-{
- if(strcasecmp(v1, v2) == 0) // early out check
- return 0;
- return vercmp_recursive(v1, v2);
-}
-
void ObserverThink()
{
if (self.flags & FL_JUMPRELEASED) {
player_regen();
// rot nex charge to the charge limit
- if(cvar("g_balance_nex_charge_rot_rate") && self.nex_charge > cvar("g_balance_nex_charge_limit"))
+ if(cvar("g_balance_nex_charge_rot_rate") && self.nex_charge > cvar("g_balance_nex_charge_limit") && self.nex_charge_rottime < time)
self.nex_charge = bound(cvar("g_balance_nex_charge_limit"), self.nex_charge - cvar("g_balance_nex_charge_rot_rate") * frametime / W_TICSPERFRAME, 1);
if(frametime)
take = damage;
}
+ frag_inflictor = inflictor;
+ frag_attacker = attacker;
+ frag_target = self;
+ damage_take = take;
+ damage_save = save;
+ damage_force = force;
+ MUTATOR_CALLHOOK(PlayerDamage);
+ take = bound(0, damage_take, self.health);
+ save = bound(0, damage_save, self.armorvalue);
+
if(sound_allowed(MSG_BROADCAST, attacker))
{
if (save > 10)
// set up to fade out later
SUB_SetFade (self, time + 6 + random (), 1);
- // remove laserdot
- if(self.weaponentity)
- if(self.weaponentity.lasertarget)
- remove(self.weaponentity.lasertarget);
-
if(clienttype(self) == CLIENTTYPE_REAL)
{
self.fixangle = TRUE;
#define W_SetupShot(ent,antilag,recoil,snd,maxdamage) W_SetupShot_ProjectileSize(ent, '0 0 0', '0 0 0', antilag, recoil, snd, maxdamage)
#define W_SetupShot_Range(ent,antilag,recoil,snd,maxdamage,range) W_SetupShot_Dir_ProjectileSize_Range(ent, v_forward, '0 0 0', '0 0 0', antilag, recoil, snd, maxdamage, range)
-void LaserTarget_Think()
-{
- entity e;
- vector offset;
- float uselaser;
- uselaser = 0;
-
- // list of weapons that will use the laser, and the options that enable it
- if(self.owner.laser_on && self.owner.weapon == WEP_ROCKET_LAUNCHER && g_laserguided_missile)
- uselaser = 1;
- // example
- //if(self.owner.weapon == WEP_ELECTRO && cvar("g_laserguided_electro"))
- // uselaser = 1;
-
-
-
- // if a laser-enabled weapon isn't selected, delete any existing laser and quit
- if(!uselaser)
- {
- // rocket launcher isn't selected, so no laser target.
- if(self.lasertarget != world)
- {
- remove(self.lasertarget);
- self.lasertarget = world;
- }
- return;
- }
-
- if(!self.lasertarget)
- {
- // we don't have a lasertarget entity, so spawn one
- //bprint("create laser target\n");
- e = self.lasertarget = spawn();
- e.owner = self.owner; // Its owner is my owner
- e.classname = "laser_target";
- e.movetype = MOVETYPE_NOCLIP; // don't touch things
- setmodel(e, "models/laser_dot.mdl"); // what it looks like, precision set below
- e.scale = 1.25; // make it larger
- e.alpha = 0.25; // transparency
- e.colormod = '255 0 0' * (1/255) * 8; // change colors
- e.effects = EF_FULLBRIGHT | EF_LOWPRECISION;
- // make it dynamically glow
- // you should avoid over-using this, as it can slow down the player's computer.
- e.glow_color = 251; // red color
- e.glow_size = 12;
- }
- else
- e = self.lasertarget;
-
- // move the laser dot to where the player is looking
-
- makevectors(self.owner.v_angle); // set v_forward etc to the direction the player is looking
- offset = '0 0 26' + v_right*3;
- traceline(self.owner.origin + offset, self.owner.origin + offset + v_forward * MAX_SHOT_DISTANCE, FALSE, self); // trace forward until you hit something, like a player or wall
- setorigin(e, trace_endpos + v_forward*8); // move me to where the traceline ended
- if(trace_plane_normal != '0 0 0')
- e.angles = vectoangles(trace_plane_normal);
- else
- e.angles = vectoangles(v_forward);
-}
-
float CL_Weaponentity_CustomizeEntityForClient()
{
self.viewmodelforclient = self.owner;
self.owner.weapon_morph4origin = QCWEAPONANIMATION_ORIGIN(self);
}
-
- // create or update the lasertarget entity
- LaserTarget_Think();
};
void CL_ExteriorWeaponentity_Think()
if(ww)
W_SwitchWeapon_Force(pl, ww);
}
+.float prevdryfire;
float weapon_prepareattack_checkammo(float secondary)
{
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.owner == self)
return FALSE;
- if(self.weapon == self.switchweapon) // only play once BEFORE starting to switch weapons
+ if(self.weapon == self.switchweapon && time - self.prevdryfire > 1) // only play once BEFORE starting to switch weapons
+ {
sound (self, CHAN_AUTO, "weapons/dryfire.wav", VOL_BASE, ATTN_NORM);
+ self.prevdryfire = time;
+ }
W_SwitchToOtherWeapon(self);
return FALSE;
PutClientInServer();
} else if(cvar("g_campaign") || cvar("g_balance_teams") || cvar("g_balance_teams_force")) {
//JoinBestTeam(self, FALSE, TRUE);
- } else if(teams_matter && !cvar("sv_spectate")) {
+ } else if(teams_matter && !cvar("sv_spectate") && !(self.team_forced > 0)) {
self.classname = "observer";
stuffcmd(self,"menu_showteamselect\n");
}
if not(self.flags & FL_CLIENT)
return;
if( !teams_matter ) {
- sprint( self, "selecteam can only be used in teamgames\n");
+ sprint( self, "selectteam can only be used in teamgames\n");
} else if(cvar("g_campaign")) {
//JoinBestTeam(self, 0);
+ } else if(self.team_forced > 0) {
+ sprint( self, "selectteam can not be used as your team is forced\n");
} else if(lockteams) {
sprint( self, "^7The game has already begun, you must wait until the next map to be able to join a team.\n");
} else if( argv(1) == "red" ) {
if(self.flags & FL_ONGROUND)
sf |= 0x40;
- if(self.fade_time != 0 && self.fade_rate != 0)
+ if(self.fade_time != 0 || self.fade_rate != 0)
{
ft = (self.fade_time - time) / sys_frametime;
fr = (1 / self.fade_rate) / sys_frametime;
float ctf_score_value(string parameter);
float g_dm, g_domination, g_ctf, g_tdm, g_keyhunt, g_onslaught, g_assault, g_arena, g_ca, g_lms, g_runematch, g_race, g_nexball, g_cts;
-float g_cloaked, g_footsteps, g_jump_grunt, g_grappling_hook, g_laserguided_missile, g_midair, g_minstagib, g_pinata, g_norecoil, g_vampire, g_minstagib_invis_alpha, g_bloodloss;
+float g_cloaked, g_footsteps, g_jump_grunt, g_grappling_hook, g_midair, g_minstagib, g_pinata, g_norecoil, g_minstagib_invis_alpha, g_bloodloss;
float g_warmup_limit;
float g_warmup_allguns;
float g_warmup_allow_timeout;
.float welcomemessage_time;
.float version;
-// Laser target for laser-guided weapons
-.entity lasertarget;
-.float laser_on;
-
// minstagib vars
.float jump_interval; // laser refire
.entity realowner;
.float nex_charge;
+.float nex_charge_rottime;
float allowed_to_spawn; // boolean variable used by the clan arena code to determine if a player can spawn (after the round has ended)
+
+float serverflags;
+
+.float team_forced; // can be a team number to force a team, or 0 for default action, or -1 for forced spectator
if(targ.classname == "player" && attacker.classname == "player" && attacker != targ && attacker.health > 2)
{
- // Savage: vampire mode
- if (g_vampire)
- if (!g_minstagib)
- if (time >= self.spawnshieldtime)
- {
- attacker.health += damage;
- }
if(g_runematch)
{
if (attacker.runes & RUNE_VAMPIRE)
BADCVAR("bgmvolume");
// private
+ BADCVAR("developer");
+ BADCVAR("g_banned_list");
+ BADCVAR("log_dest_udp");
+ BADCVAR("log_file");
+ BADCVAR("net_address");
+ BADCVAR("net_address_ipv6");
+ BADCVAR("port");
+ BADCVAR("savedgamecfg");
BADCVAR("serverconfig");
+ BADCVAR("sv_heartbeatperiod");
+ BADCVAR("sv_vote_master_password");
+ BADCVAR("sys_colortranslation");
+ BADCVAR("sys_specialcharactertranslation");
+ BADCVAR("timestamps");
+ BADPREFIX("developer_");
BADPREFIX("g_ban_");
BADPREFIX("g_chat_flood_");
BADPREFIX("g_voice_flood_");
BADPREFIX("sv_eventlog");
BADPREFIX("sv_logscores_");
BADPREFIX("sv_master");
- BADCVAR("g_banned_list");
- BADCVAR("log_dest_udp");
- BADCVAR("log_file");
- BADCVAR("net_address");
- BADCVAR("port");
- BADCVAR("savedgamecfg");
- BADCVAR("sv_heartbeatperiod");
- BADCVAR("sv_vote_master_password");
- BADCVAR("sys_colortranslation");
- BADCVAR("sys_specialcharactertranslation");
- BADCVAR("timestamps");
- BADCVAR("net_address");
- BADCVAR("net_address_ipv6");
BADPREFIX("sv_weaponstats_");
- BADCVAR("developer");
- BADPREFIX("developer_");
+
+ // these can contain player IDs, so better hide
+ BADCVAR("g_forced_team_red");
+ BADCVAR("g_forced_team_blue");
+ BADCVAR("g_forced_team_yellow");
+ BADCVAR("g_forced_team_pink");
// mapinfo
BADCVAR("timelimit");
BADCVAR("sv_checkforpacketsduringsleep");
BADPREFIX("crypto_");
BADPREFIX("g_chat_");
+ BADPREFIX("net_");
BADPREFIX("prvm_");
BADPREFIX("sv_fragmessage_");
BADPREFIX("sv_vote_");
BADCVAR("g_maplist_votable_abstain");
BADCVAR("g_maplist_votable_nodetail");
BADCVAR("g_maplist_votable_suggestions");
+ BADCVAR("g_minstagib");
BADCVAR("g_nexball_goallimit");
BADCVAR("g_runematch_point_limit");
BADCVAR("g_start_delay");
BADCVAR("sv_vote_master_password");
BADCVAR("sv_vote_simple_majority_factor");
BADCVAR("timelimit_override");
+
+ if(cvar("g_minstagib"))
+ {
+ BADCVAR("g_grappling_hook");
+ BADCVAR("g_jetpack");
+ }
#undef BADPREFIX
#undef BADCVAR
}
}
++cvar_purechanges_count;
+ // WARNING: this variable is used for the server list
+ // NEVER dare to skip this code!
+ // Hacks to intentionally appearing as "pure server" even though you DO have
+ // modified settings may be punished by removal from the server list.
+ // You can do to the variables cvar_changes and cvar_purechanges all you want,
+ // though.
}
buf_del(h);
if(cvar_changes == "")
MUTATOR_CALLHOOK(BuildMutatorsString);
s = ret_string;
+ // simple, probably not good in the mutator system
if(cvar("g_grappling_hook"))
s = strcat(s, ":grappling_hook");
+
+ // initialiation stuff, not good in the mutator system
if(!cvar("g_use_ammunition"))
s = strcat(s, ":no_use_ammunition");
+
+ // initialiation stuff, not good in the mutator system
if(!cvar("g_pickup_items"))
s = strcat(s, ":no_pickup_items");
+
+ // initialiation stuff, not good in the mutator system
if(cvar_string("g_weaponarena") != "0")
s = strcat(s, ":", cvar_string("g_weaponarena"), " arena");
- if(cvar("g_vampire"))
- s = strcat(s, ":vampire");
- if(cvar("g_laserguided_missile"))
- s = strcat(s, ":laserguided_missile");
+
+ // TODO to mutator system
if(cvar("g_norecoil"))
s = strcat(s, ":norecoil");
+
+ // TODO to mutator system
if(cvar("g_midair"))
s = strcat(s, ":midair");
+
+ // TODO to mutator system
if(cvar("g_minstagib"))
s = strcat(s, ":minstagib");
+
GameLogEcho(s);
GameLogEcho(":gameinfo:end");
}
bprint("That command can only be used in a team-based gamemode.\n");
return;
}
- if(argv(0) == "movetoteam")
- if(argc == 3 || argc == 4) {
-// sv_cmd movetoteam player_id team_colour
-// sv_cmd movetoteam player_id team_colour type_of_move
+ if(argv(0) == "movetoteam") if(argc == 3 || argc == 4) {
+ // sv_cmd movetoteam player_id team_colour
+ // sv_cmd movetoteam player_id team_colour type_of_move
-// type of move
-// 0 (00) automove centerprint, admin message
-// 1 (01) automove centerprint, no admin message
-// 2 (10) no centerprint, admin message
-// 3 (11) no centerprint, no admin message
+ // type of move
+ // 0 (00) automove centerprint, admin message
+ // 1 (01) automove centerprint, no admin message
+ // 2 (10) no centerprint, admin message
+ // 3 (11) no centerprint, no admin message
if(!teams_matter) { // death match
print("Currently not playing a team game\n");
return;
}
- client = edict_num(entno);
+ client = edict_num(entno);
// player entity is not a client
if not(client.flags & FL_CLIENT) {
// find the team to move the player to
float team_colour;
+ float save;
+
+ save = client.team_forced;
+ client.team_forced = 0;
team_colour = ColourToNumber(argv(2));
if(team_colour == client.team) { // player already on the team
print("Player ", argv(1), " (", client.netname, ") is already on the ", ColoredTeamName(client.team), "\n");
+ // keep the forcing undone
return;
} else if(team_colour == 0) // auto team
team_colour = NumberToTeamNumber(FindSmallestTeam(client, FALSE));
+ else
+ CheckAllowedTeams(client);
+
+ client.team_forced = save;
switch(team_colour) {
case COLOR_TEAM1:
if(c1 == -1) {
print("Sorry, there isn't a red team\n");
return;
- }
- break;
+ }
+ break;
case COLOR_TEAM2:
if(c2 == -1) {
print("Sorry, there isn't a blue team\n");
- return;
- }
- break;
+ return;
+ }
+ break;
case COLOR_TEAM3:
if(c3 == -1) {
print("Sorry, there isn't a yellow team\n");
return;
}
- break;
+ break;
case COLOR_TEAM4:
if(c4 == -1) {
print("Sorry, there isn't a pink team\n");
return;
}
- break;
+ break;
default:
print("Sorry, team ", argv(2), " doesn't exist\n");
}
print("Player ", argv(1), " (", client.netname, ") has been moved to the ", ColoredTeamName(team_colour), "\n");
+ client.team_forced = 0;
MoveToTeam(client, team_colour, 6, stof(argv(3)));
return;
float g_pickup_weapons_anyway;
float g_weaponarena;
float g_weaponarena_random;
+float g_weaponarena_random_with_laser;
string g_weaponarena_list;
float g_weaponspeedfactor;
float g_weaponratefactor;
g_weaponarena_random = cvar("g_weaponarena_random");
else
g_weaponarena_random = 0;
+ g_weaponarena_random_with_laser = cvar("g_weaponarena_random_with_laser");
if (g_weaponarena)
{
MUTATOR_ADD(mutator_nix);
if(cvar("g_dodging"))
MUTATOR_ADD(mutator_dodging);
- if(cvar("g_rocket_flying") || (cvar("g_balance_rocketlauncher_detonatedelay") == 0 && stof(cvar_defstring("g_balance_rocketlauncher_detonatedelay")) != 0))
+ if(cvar("g_rocket_flying"))
MUTATOR_ADD(mutator_rocketflying);
+ if(cvar("g_vampire"))
+ MUTATOR_ADD(mutator_vampire);
+
+ serverflags = 0;
+ if(cvar("sv_allow_fullbright"))
+ serverflags |= SERVERFLAG_ALLOW_FULLBRIGHT;
g_bugrigs = cvar("g_bugrigs");
g_bugrigs_planar_movement = cvar("g_bugrigs_planar_movement");
g_footsteps = cvar("g_footsteps");
g_grappling_hook = cvar("g_grappling_hook");
g_jetpack = cvar("g_jetpack");
- g_laserguided_missile = cvar("g_laserguided_missile");
g_midair = cvar("g_midair");
g_minstagib = cvar("g_minstagib");
g_norecoil = cvar("g_norecoil");
- g_vampire = cvar("g_vampire");
g_bloodloss = cvar("g_bloodloss");
sv_maxidle = cvar("sv_maxidle");
sv_maxidle_spectatorsareidle = cvar("sv_maxidle_spectatorsareidle");
// INPUT:
entity self;
entity other;
+
+MUTATOR_HOOKABLE(PlayerDamage);
+ // called when a player gets damaged to e.g. remove stuff he was carrying.
+ // INPUT:
+ entity frag_inflictor;
+ entity frag_attacker;
+ entity frag_target; // same as self
+ vector damage_force; // NOTE: this force already HAS been applied (create and use a Damage hook to change that one)
+ // INPUT, OUTPUT:
+ float damage_take;
+ float damage_save;
MUTATOR_HOOKFUNCTION(rocketflying_EditProjectile)
{
- if(other.classname == "rocket")
+ if(other.classname == "rocket" || other.classname == "mine")
{
// kill detonate delay of rockets
other.spawnshieldtime = time;
--- /dev/null
+MUTATOR_HOOKFUNCTION(vampire_PlayerDamage)
+{
+ if(time < self.spawnshieldtime)
+ return 0;
+ if(g_minstagib)
+ {
+ // minstagib: each hit means +1 ammo
+ frag_attacker.ammo_cells += 2; // note: 1 cell was deducted for the shot
+ }
+ else
+ {
+ // otherwise: each hit gets damage back
+ frag_attacker.health += damage_take;
+ }
+ return 0;
+}
+
+MUTATOR_HOOKFUNCTION(vampire_BuildMutatorsString)
+{
+ ret_string = strcat(ret_string, ":Vampire");
+ return 0;
+}
+
+MUTATOR_HOOKFUNCTION(vampire_BuildMutatorsPrettyString)
+{
+ ret_string = strcat(ret_string, ", Vampire");
+ return 0;
+}
+
+MUTATOR_DEFINITION(mutator_vampire)
+{
+ MUTATOR_HOOK(PlayerDamage, vampire_PlayerDamage, CBC_ORDER_ANY);
+ MUTATOR_HOOK(BuildMutatorsString, vampire_BuildMutatorsString, CBC_ORDER_ANY);
+ MUTATOR_HOOK(BuildMutatorsPrettyString, vampire_BuildMutatorsPrettyString, CBC_ORDER_ANY);
+
+ return 0;
+}
MUTATOR_DECLARATION(mutator_nix);
MUTATOR_DECLARATION(mutator_dodging);
MUTATOR_DECLARATION(mutator_rocketflying);
+MUTATOR_DECLARATION(mutator_vampire);
mutators/mutator_nix.qc
mutators/mutator_dodging.qc
mutators/mutator_rocketflying.qc
+mutators/mutator_vampire.qc
../warpzonelib/anglestransform.qc
../warpzonelib/mathlib.qc
modifications = strcat(modifications, ", Cloaked");
if(g_grappling_hook)
modifications = strcat(modifications, ", Hook");
- if(g_laserguided_missile)
- modifications = strcat(modifications, ", LG missiles");
if(g_midair)
modifications = strcat(modifications, ", Midair");
- if(g_vampire)
- modifications = strcat(modifications, ", Vampire");
if(g_pinata)
modifications = strcat(modifications, ", Pinata");
if(g_weapon_stay)
c1 = -1;
}
}
+
+ // if player has a forced team, ONLY allow that one
+ if(self.team_forced == COLOR_TEAM1 && c1 >= 0)
+ c2 = c3 = c4 = -1;
+ else if(self.team_forced == COLOR_TEAM2 && c2 >= 0)
+ c1 = c3 = c4 = -1;
+ else if(self.team_forced == COLOR_TEAM3 && c3 >= 0)
+ c1 = c2 = c4 = -1;
+ else if(self.team_forced == COLOR_TEAM4 && c4 >= 0)
+ c1 = c2 = c3 = -1;
}
float PlayerValue(entity p)
if(c4 >= 0)
totalteams = totalteams + 1;
- if(cvar("bot_vs_human") && totalteams == 1)
+ if((cvar("bot_vs_human") || pl.team_forced > 0) && totalteams == 1)
totalteams += 1;
if(totalteams <= 1)
#else
#ifdef SVQC
.float gravity;
+.float crylink_waitrelease;
+.entity crylink_lastgroup;
.entity queuenext;
.entity queueprev;
+void W_Crylink_Dequeue_Raw(entity own, entity prev, entity me, entity next)
+{
+ if(me == own.crylink_lastgroup)
+ own.crylink_lastgroup = ((me == next) ? world : next);
+ prev.queuenext = next;
+ next.queueprev = prev;
+}
+
+void W_Crylink_Dequeue(entity e)
+{
+ W_Crylink_Dequeue_Raw(e.realowner, e.queueprev, e, e.queuenext);
+}
+
// force projectile to explode
void W_Crylink_LinkExplode (entity e, entity e2)
{
float a;
a = bound(0, 1 - (time - e.fade_time) * e.fade_rate, 1);
+ if(e == e.realowner.crylink_lastgroup)
+ e.realowner.crylink_lastgroup = world;
+
RadiusDamage (e, e.realowner, cvar("g_balance_crylink_primary_damage") * a, cvar("g_balance_crylink_primary_edgedamage") * a, cvar("g_balance_crylink_primary_radius"), world, cvar("g_balance_crylink_primary_force") * a, e.projectiledeathtype, other);
if(e.queuenext != e2)
W_Crylink_LinkExplode(e.queuenext, e2);
+
remove (e);
}
+// adjust towards center
+// returns the origin where they will meet... and the time till the meeting is
+// stored in w_crylink_linkjoin_time.
+// could possibly network this origin and time, and display a special particle
+// effect when projectiles meet there :P
+// jspeed: MINIMUM jing speed
+// jtime: MAXIMUM jing time (0: none)
+float w_crylink_linkjoin_time;
+vector W_Crylink_LinkJoin(entity e, float jspeed, float jtime)
+{
+ vector avg_origin, avg_velocity;
+ vector targ_origin;
+ float avg_dist, n;
+ entity p;
+
+ w_crylink_linkjoin_time = 0;
+
+ avg_origin = e.origin;
+ avg_velocity = e.velocity;
+ n = 1;
+ for(p = e; (p = p.queuenext) != e; )
+ {
+ avg_origin += WarpZone_RefSys_TransformOrigin(p, e, p.origin);
+ avg_velocity += WarpZone_RefSys_TransformVelocity(p, e, p.velocity);
+ ++n;
+ }
+ avg_origin *= (1.0 / n);
+ avg_velocity *= (1.0 / n);
+
+ if(n < 2)
+ return avg_origin; // nothing to do
+
+ // yes, mathematically we can do this in ONE step, but beware of 32bit floats...
+ avg_dist = pow(vlen(e.origin - avg_origin), 2);
+ for(p = e; (p = p.queuenext) != e; )
+ avg_dist += pow(vlen(WarpZone_RefSys_TransformOrigin(p, e, p.origin) - avg_origin), 2);
+ avg_dist *= (1.0 / n);
+ avg_dist = sqrt(avg_dist);
+
+ if(avg_dist == 0)
+ return avg_origin; // no change needed
+
+ if(jspeed == 0 && jtime == 0)
+ {
+ e.velocity = avg_velocity;
+ UpdateCSQCProjectile(e);
+ for(p = e; (p = p.queuenext) != e; )
+ {
+ p.velocity = WarpZone_RefSys_TransformVelocity(e, p, avg_velocity);
+ UpdateCSQCProjectile(p);
+ }
+ }
+ else
+ {
+ if(jtime)
+ {
+ if(jspeed)
+ w_crylink_linkjoin_time = min(jtime, avg_dist / jspeed);
+ else
+ w_crylink_linkjoin_time = jtime;
+ }
+ else
+ w_crylink_linkjoin_time = avg_dist / jspeed;
+ targ_origin = avg_origin + w_crylink_linkjoin_time * avg_velocity;
+
+ e.velocity = (targ_origin - e.origin) * (1.0 / w_crylink_linkjoin_time);
+ UpdateCSQCProjectile(e);
+ for(p = e; (p = p.queuenext) != e; )
+ {
+ p.velocity = WarpZone_RefSys_TransformVelocity(e, p, (targ_origin - WarpZone_RefSys_TransformOrigin(p, e, p.origin)) * (1.0 / w_crylink_linkjoin_time));
+ UpdateCSQCProjectile(p);
+ }
+
+ // analysis:
+ // jspeed -> +infinity:
+ // w_crylink_linkjoin_time -> +0
+ // targ_origin -> avg_origin
+ // p->velocity -> HUEG towards center
+ // jspeed -> 0:
+ // w_crylink_linkjoin_time -> +/- infinity
+ // targ_origin -> avg_velocity * +/- infinity
+ // p->velocity -> avg_velocity
+ // jspeed -> -infinity:
+ // w_crylink_linkjoin_time -> -0
+ // targ_origin -> avg_origin
+ // p->velocity -> HUEG away from center
+ }
+
+ return targ_origin;
+}
+
+void W_Crylink_LinkJoinEffect_Think()
+{
+ // is there at least 2 projectiles very close?
+ entity e, p;
+ float n;
+ e = self.owner.crylink_lastgroup;
+ n = 0;
+ if(e)
+ {
+ if(vlen(e.origin - self.origin) < vlen(e.velocity) * frametime)
+ ++n;
+ for(p = e; (p = p.queuenext) != e; )
+ {
+ if(vlen(p.origin - self.origin) < vlen(p.velocity) * frametime)
+ ++n;
+ }
+ if(n >= 2)
+ {
+ if(e.projectiledeathtype & HITTYPE_SECONDARY)
+ {
+ if(cvar("g_balance_crylink_secondary_joinexplode"))
+ {
+ n = n / cvar("g_balance_crylink_secondary_shots");
+ RadiusDamage (e, e.realowner, cvar("g_balance_crylink_secondary_joinexplode_damage") * n,
+ cvar("g_balance_crylink_secondary_joinexplode_edgedamage") * n,
+ cvar("g_balance_crylink_secondary_joinexplode_radius") * n, world,
+ cvar("g_balance_crylink_secondary_joinexplode_force") * n, e.projectiledeathtype, other);
+
+ pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
+ }
+ }
+ else
+ {
+ if(cvar("g_balance_crylink_primary_joinexplode"))
+ {
+ n = n / cvar("g_balance_crylink_primary_shots");
+ RadiusDamage (e, e.realowner, cvar("g_balance_crylink_primary_joinexplode_damage") * n,
+ cvar("g_balance_crylink_primary_joinexplode_edgedamage") * n,
+ cvar("g_balance_crylink_primary_joinexplode_radius") * n, world,
+ cvar("g_balance_crylink_primary_joinexplode_force") * n, e.projectiledeathtype, other);
+
+ pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
+ }
+ }
+ }
+ }
+ remove(self);
+}
+
+
// NO bounce protection, as bounces are limited!
void W_Crylink_Touch (void)
{
float finalhit;
float f;
//PROJECTILE_TOUCH;
- local entity savenext, saveprev;
+ local entity savenext, saveprev, saveown;
+ saveown = self.realowner;
savenext = self.queuenext;
saveprev = self.queueprev;
if(WarpZone_Projectile_Touch())
{
if(wasfreed(self))
- {
- savenext.queueprev = saveprev;
- saveprev.queuenext = savenext;
- }
+ W_Crylink_Dequeue_Raw(saveown, saveprev, self, savenext);
return;
}
f = cvar("g_balance_crylink_primary_bouncedamagefactor");
if(a)
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) || finalhit)
+ 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"))
{
W_Crylink_LinkExplode(self.queuenext, self);
remove (self);
return;
}
+ else if(finalhit)
+ {
+ // just unlink
+ W_Crylink_Dequeue(self);
+ remove(self);
+ return;
+ }
self.cnt = self.cnt - 1;
self.angles = vectoangles(self.velocity);
self.owner = world;
float finalhit;
float f;
//PROJECTILE_TOUCH;
- local entity savenext, saveprev;
+ local entity savenext, saveprev, saveown;
savenext = self.queuenext;
saveprev = self.queueprev;
+ saveown = self.realowner;
if(WarpZone_Projectile_Touch())
{
if(wasfreed(self))
- {
- savenext.queueprev = saveprev;
- saveprev.queuenext = savenext;
- }
+ W_Crylink_Dequeue_Raw(saveown, saveprev, self, savenext);
return;
}
f = cvar("g_balance_crylink_secondary_bouncedamagefactor");
if(a)
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) || finalhit)
+ 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"))
{
W_Crylink_LinkExplode(self.queuenext, self);
remove (self);
return;
}
+ else if(finalhit)
+ {
+ // just unlink
+ W_Crylink_Dequeue(self);
+ remove(self);
+ return;
+ }
self.cnt = self.cnt - 1;
self.angles = vectoangles(self.velocity);
self.owner = world;
void W_Crylink_Fadethink (void)
{
- self.queuenext.queueprev = self.queueprev;
- self.queueprev.queuenext = self.queuenext;
+ W_Crylink_Dequeue(self);
remove(self);
}
shots = cvar("g_balance_crylink_primary_shots");
pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
+ proj = world;
while (counter < shots)
{
proj = spawn ();
proj.classname = "spike";
proj.bot_dodge = TRUE;
proj.bot_dodgerating = cvar("g_balance_crylink_primary_damage");
- if(counter == 0) { // first projectile, store in firstproj for now
+ if(shots == 1) {
+ proj.queuenext = proj;
+ proj.queueprev = proj;
+ }
+ else if(counter == 0) { // first projectile, store in firstproj for now
firstproj = proj;
}
else if(counter == shots - 1) { // last projectile, link up with first projectile
if(counter == 0)
{
proj.fade_time = time + cvar("g_balance_crylink_primary_middle_lifetime");
- self.fade_rate = 1 / cvar("g_balance_crylink_primary_middle_fadetime");
+ proj.fade_rate = 1 / cvar("g_balance_crylink_primary_middle_fadetime");
proj.nextthink = time + cvar("g_balance_crylink_primary_middle_lifetime") + cvar("g_balance_crylink_primary_middle_fadetime");
}
- else if(counter <= 3)
- {
- proj.fade_time = time + cvar("g_balance_crylink_primary_star_lifetime");
- self.fade_rate = 1 / cvar("g_balance_crylink_primary_star_fadetime");
- proj.nextthink = time + cvar("g_balance_crylink_primary_star_lifetime") + cvar("g_balance_crylink_primary_star_fadetime");
- }
else
{
proj.fade_time = time + cvar("g_balance_crylink_primary_other_lifetime");
- self.fade_rate = 1 / cvar("g_balance_crylink_primary_other_fadetime");
+ proj.fade_rate = 1 / cvar("g_balance_crylink_primary_other_fadetime");
proj.nextthink = time + cvar("g_balance_crylink_primary_other_lifetime") + cvar("g_balance_crylink_primary_other_fadetime");
}
proj.cnt = cvar("g_balance_crylink_primary_bounces");
counter = counter + 1;
}
+ self.crylink_lastgroup = proj;
}
void W_Crylink_Attack2 (void)
shots = cvar("g_balance_crylink_secondary_shots");
pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
+ proj = world;
while (counter < shots)
{
proj = spawn ();
proj.classname = "spike";
proj.bot_dodge = TRUE;
proj.bot_dodgerating = cvar("g_balance_crylink_secondary_damage");
- if(counter == 0) { // first projectile, store in firstproj for now
+ if(shots == 1) {
+ proj.queuenext = proj;
+ proj.queueprev = proj;
+ }
+ else if(counter == 0) { // first projectile, store in firstproj for now
firstproj = proj;
}
else if(counter == shots - 1) { // last projectile, link up with first projectile
if(counter == (shots - 1) / 2)
{
proj.fade_time = time + cvar("g_balance_crylink_secondary_middle_lifetime");
- self.fade_rate = 1 / cvar("g_balance_crylink_secondary_middle_fadetime");
+ proj.fade_rate = 1 / cvar("g_balance_crylink_secondary_middle_fadetime");
proj.nextthink = time + cvar("g_balance_crylink_secondary_middle_lifetime") + cvar("g_balance_crylink_secondary_middle_fadetime");
}
else
{
proj.fade_time = time + cvar("g_balance_crylink_secondary_line_lifetime");
- self.fade_rate = 1 / cvar("g_balance_crylink_secondary_line_fadetime");
+ proj.fade_rate = 1 / cvar("g_balance_crylink_secondary_line_fadetime");
proj.nextthink = time + cvar("g_balance_crylink_secondary_line_lifetime") + cvar("g_balance_crylink_secondary_line_fadetime");
}
proj.cnt = cvar("g_balance_crylink_secondary_bounces");
counter = counter + 1;
}
+ self.crylink_lastgroup = proj;
}
void spawnfunc_weapon_crylink (void)
else if (req == WR_THINK)
{
if (self.BUTTON_ATCK)
- if (weapon_prepareattack(0, cvar("g_balance_crylink_primary_refire")))
{
- W_Crylink_Attack();
- weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_crylink_primary_animtime"), w_ready);
+ if (!self.crylink_waitrelease)
+ if (weapon_prepareattack(0, cvar("g_balance_crylink_primary_refire")))
+ {
+ 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)
+ self.crylink_waitrelease = 1;
+ }
+ }
+ else if(self.BUTTON_ATCK2 && cvar("g_balance_crylink_secondary"))
+ {
+ if (!self.crylink_waitrelease)
+ if (weapon_prepareattack(1, cvar("g_balance_crylink_secondary_refire")))
+ {
+ 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)
+ self.crylink_waitrelease = 2;
+ }
}
- if (self.BUTTON_ATCK2 && cvar("g_balance_crylink_secondary"))
- if (weapon_prepareattack(1, cvar("g_balance_crylink_secondary_refire")))
+ else
{
- W_Crylink_Attack2();
- weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_crylink_secondary_animtime"), w_ready);
+ if (self.crylink_waitrelease)
+ {
+ // fired and released now!
+ if(self.crylink_lastgroup)
+ {
+ vector pos;
+ entity linkjoineffect;
+
+
+ if(self.crylink_waitrelease == 1)
+ {
+ pos = W_Crylink_LinkJoin(self.crylink_lastgroup, cvar("g_balance_crylink_primary_joinspeed"), 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"));
+ }
+
+ linkjoineffect = spawn();
+ linkjoineffect.think = W_Crylink_LinkJoinEffect_Think;
+ linkjoineffect.classname = "linkjoineffect";
+ linkjoineffect.nextthink = time + w_crylink_linkjoin_time;
+ linkjoineffect.owner = self;
+ setorigin(linkjoineffect, pos);
+
+
+ }
+ self.crylink_waitrelease = 0;
+ if(!w_crylink(WR_CHECKAMMO1) && !w_crylink(WR_CHECKAMMO2))
+ {
+ // ran out of ammo!
+ self.cnt = WEP_CRYLINK;
+ self.switchweapon = w_getbestweapon(self);
+ }
+ }
}
}
else if (req == WR_PRECACHE)
precache_model ("models/weapons/h_crylink.iqm");
precache_sound ("weapons/crylink_fire.wav");
precache_sound ("weapons/crylink_fire2.wav");
+ precache_sound ("weapons/crylink_linkjoin.wav");
}
else if (req == WR_SETUP)
weapon_setup(WEP_CRYLINK);
else if (req == WR_CHECKAMMO1)
+ {
+ // don't "run out of ammo" and switch weapons while waiting for release
+ if(self.crylink_lastgroup && self.crylink_waitrelease)
+ return TRUE;
return self.ammo_cells >= cvar("g_balance_crylink_primary_ammo");
+ }
else if (req == WR_CHECKAMMO2)
+ {
+ // don't "run out of ammo" and switch weapons while waiting for release
+ if(self.crylink_lastgroup && self.crylink_waitrelease)
+ return TRUE;
return self.ammo_cells >= cvar("g_balance_crylink_secondary_ammo");
+ }
return TRUE;
};
#endif
void W_Plasma_Touch (void)
{
+ //self.velocity = self.velocity * 0.1;
+
PROJECTILE_TOUCH;
if (other.takedamage == DAMAGE_AIM) {
W_Plasma_Explode ();
} else {
+ //UpdateCSQCProjectile(self);
spamsound (self, CHAN_PROJECTILE, "weapons/electro_bounce.wav", VOL_BASE, ATTN_NORM);
self.projectiledeathtype |= HITTYPE_BOUNCE;
}
proj.health = cvar("g_balance_electro_secondary_health");
proj.event_damage = W_Plasma_Damage;
proj.flags = FL_PROJECTILE;
-
+
+ //proj.bouncefactor = cvar("g_balance_electro_secondary_bouncefactor");
+ //proj.bouncestop = cvar("g_balance_electro_secondary_bouncestop");
+
#if 0
entity p2;
p2 = spawn();
CSQCProjectile(proj, TRUE, PROJECTILE_ELECTRO, FALSE); // no culling, it has sound
other = proj; MUTATOR_CALLHOOK(EditProjectile);
-}
+ }
.vector hook_start, hook_end;
float lgbeam_send(entity to, float sf)
gren.bot_dodge = TRUE;
gren.bot_dodgerating = cvar("g_balance_grenadelauncher_primary_damage");
gren.movetype = MOVETYPE_BOUNCE;
- gren.bouncefactor = cvar("g_balance_grenadelauncher_primary_bouncefactor");
- gren.bouncestop = cvar("g_balance_grenadelauncher_primary_bouncestop");
+ gren.bouncefactor = cvar("g_balance_grenadelauncher_bouncefactor");
+ gren.bouncestop = cvar("g_balance_grenadelauncher_bouncestop");
PROJECTILE_MAKETRIGGER(gren);
gren.projectiledeathtype = WEP_GRENADE_LAUNCHER;
setorigin(gren, w_shotorg);
gren.bot_dodge = TRUE;
gren.bot_dodgerating = cvar("g_balance_grenadelauncher_secondary_damage");
gren.movetype = MOVETYPE_BOUNCE;
- gren.bouncefactor = cvar("g_balance_grenadelauncher_secondary_bouncefactor");
- gren.bouncestop = cvar("g_balance_grenadelauncher_secondary_bouncestop");
+ gren.bouncefactor = cvar("g_balance_grenadelauncher_bouncefactor");
+ gren.bouncestop = cvar("g_balance_grenadelauncher_bouncestop");
PROJECTILE_MAKETRIGGER(gren);
gren.projectiledeathtype = WEP_GRENADE_LAUNCHER | HITTYPE_SECONDARY;
setorigin(gren, w_shotorg);
if(self.owner.deadflag == DEAD_NO)
if((self.spawnshieldtime >= 0)
? (time >= self.spawnshieldtime) // timer
- : (vlen(NearestPointOnBox(self.owner, self.origin) - self.origin) > cvar("g_balance_minelayer_radius")) // safety device
+ : (vlen(NearestPointOnBox(self.owner, self.origin) - self.origin) > cvar("g_balance_minelayer_remote_radius")) // safety device
)
{
W_Mine_DoRemoteExplode();
if (self.owner.deadflag == DEAD_NO)
if (self.minelayer_detonate)
W_Mine_RemoteExplode();
-
- if(self.csqcprojectile_clientanimate == 0)
- UpdateCSQCProjectile(self);
}
void W_Mine_Touch (void)
mine.cnt = time + cvar("g_balance_minelayer_lifetime");
mine.flags = FL_PROJECTILE;
- CSQCProjectile(mine, FALSE, PROJECTILE_MINE, TRUE);
+ CSQCProjectile(mine, TRUE, PROJECTILE_MINE, TRUE);
// muzzle flash for 1st person view
flash = spawn ();
if(headshot)
{
AnnounceTo(self, "headshot");
- print("h\n");
}
if(damage_goodhits && self.minstanex_lasthit)
{
{
if (self.jump_interval <= time)
{
- self.jump_interval = time + 0.9 * W_WeaponRateFactor();
+ self.jump_interval = time + cvar("g_balance_laser_primary_refire") * W_WeaponRateFactor();
// ugly minstagib hack to reuse the fire mode of the laser
float w;
{
if(cvar("g_balance_nex_secondary_charge"))
{
+ self.nex_charge_rottime = time + cvar("g_balance_nex_charge_rot_pause");
dt = frametime / W_TICSPERFRAME;
if(self.nex_charge < 1)
{
ATTACK_FINISHED(self.owner) = time;
self.owner.switchweapon = w_getbestweapon(self.owner);
}
- if(g_laserguided_missile)
- ATTACK_FINISHED(self.owner) = time + cvar("g_balance_rocketlauncher_refire") * W_WeaponRateFactor();
}
remove (self);
}
ATTACK_FINISHED(self.owner) = time;
self.owner.switchweapon = w_getbestweapon(self.owner);
}
- if(g_laserguided_missile)
- ATTACK_FINISHED(self.owner) = time + cvar("g_balance_rocketlauncher_refire") * W_WeaponRateFactor();
}
remove (self);
}
{
if((self.spawnshieldtime >= 0)
? (time >= self.spawnshieldtime) // timer
- : (vlen(NearestPointOnBox(self.owner, self.origin) - self.origin) > cvar("g_balance_rocketlauncher_radius")) // safety device
+ : (vlen(NearestPointOnBox(self.owner, self.origin) - self.origin) > cvar("g_balance_rocketlauncher_remote_radius")) // safety device
)
{
W_Rocket_DoRemoteExplode();
void W_Rocket_Think (void)
{
- entity e;
vector desireddir, olddir, newdir, desiredorigin, goal;
#if 0
float cosminang, cosmaxang, cosang;
#endif
- float turnrate, velspeed, f;
+ float velspeed, f;
self.nextthink = time;
if (time > self.cnt)
{
return;
}
- if(g_laserguided_missile)
- {
- // accelerate
- makevectors(self.angles_x * '-1 0 0' + self.angles_y * '0 1 0');
- velspeed = cvar("g_balance_rocketlauncher_laserguided_speed") * g_weaponspeedfactor - (self.velocity * v_forward);
- if (velspeed > 0)
- self.velocity = self.velocity + v_forward * min(cvar("g_balance_rocketlauncher_laserguided_speedaccel") * frametime, velspeed);
- }
- else
- {
- // accelerate
- makevectors(self.angles_x * '-1 0 0' + self.angles_y * '0 1 0');
- velspeed = cvar("g_balance_rocketlauncher_speed") * g_weaponspeedfactor - (self.velocity * v_forward);
- if (velspeed > 0)
- self.velocity = self.velocity + v_forward * min(cvar("g_balance_rocketlauncher_speedaccel") * g_weaponspeedfactor * frametime, velspeed);
- }
+ // accelerate
+ makevectors(self.angles_x * '-1 0 0' + self.angles_y * '0 1 0');
+ velspeed = cvar("g_balance_rocketlauncher_speed") * g_weaponspeedfactor - (self.velocity * v_forward);
+ if (velspeed > 0)
+ self.velocity = self.velocity + v_forward * min(cvar("g_balance_rocketlauncher_speedaccel") * g_weaponspeedfactor * frametime, velspeed);
// laser guided, or remote detonation
if (self.owner.weapon == WEP_ROCKET_LAUNCHER)
{
- if(g_laserguided_missile)
+ if(self == self.owner.lastrocket)
+ if not(self.owner.rl_release)
+ if not(self.BUTTON_ATCK2)
+ if(cvar("g_balance_rocketlauncher_guiderate"))
+ if(time > self.pushltime)
+ if(self.owner.deadflag == DEAD_NO)
{
- if(self.rl_detonate_later)
- W_Rocket_RemoteExplode();
-
- if(cvar("g_balance_rocketlauncher_laserguided_allow_steal"))
- {
- if(self.owner.laser_on)
- {
- if(self.attack_finished_single < time)
- {
- self.attack_finished_single = time + 0.2 + random()*0.3;
- self.enemy = FindLaserTarget(self, 0.7, 0.7);
- }
-
- if(!self.enemy)
- self.enemy = self.owner.weaponentity.lasertarget;
- }
- else self.enemy = world;
- }
- else // don't allow stealing: always target my owner's laser (if it exists)
- self.enemy = self.owner.weaponentity.lasertarget;
-
- if(self.enemy != world)
- {
- //bprint("Targeting ", self.enemy.owner.netname, "'s laser\n");
- velspeed = vlen(self.velocity);
- e = self.enemy;//self.owner.weaponentity.lasertarget;
- turnrate = cvar("g_balance_rocketlauncher_laserguided_turnrate");//0.65; // how fast to turn
- desireddir = normalize(e.origin - self.origin); // get direction from my position to the laser target
- olddir = normalize(self.velocity); // get my current direction
- newdir = normalize(olddir + desireddir * turnrate); // take the average of the 2 directions; not the best method but simple & easy
- self.velocity = newdir * velspeed; // make me fly in the new direction at my flight speed
- self.angles = vectoangles(self.velocity); // turn model in the new flight direction
-
- ATTACK_FINISHED(self.owner) = time + 0.2 * W_WeaponRateFactor();
- }
- }
- else
- {
- if(self == self.owner.lastrocket)
- if not(self.owner.rl_release)
- if not(self.BUTTON_ATCK2)
- if(cvar("g_balance_rocketlauncher_guiderate"))
- if(time > self.pushltime)
- if(self.owner.deadflag == DEAD_NO)
- {
- f = cvar("g_balance_rocketlauncher_guideratedelay");
- if(f)
- f = bound(0, (time - self.pushltime) / f, 1);
- else
- f = 1;
+ f = cvar("g_balance_rocketlauncher_guideratedelay");
+ if(f)
+ f = bound(0, (time - self.pushltime) / f, 1);
+ else
+ f = 1;
- velspeed = vlen(self.velocity);
+ velspeed = vlen(self.velocity);
- makevectors(self.owner.v_angle);
- desireddir = WarpZone_RefSys_TransformVelocity(self.owner, self, v_forward);
- desiredorigin = WarpZone_RefSys_TransformOrigin(self.owner, self, self.owner.origin + self.owner.view_ofs);
- olddir = normalize(self.velocity);
+ makevectors(self.owner.v_angle);
+ desireddir = WarpZone_RefSys_TransformVelocity(self.owner, self, v_forward);
+ desiredorigin = WarpZone_RefSys_TransformOrigin(self.owner, self, self.owner.origin + self.owner.view_ofs);
+ olddir = normalize(self.velocity);
#if 0
- // disabled this code because it doesn't do what I want it to do :P
- cosminang = cos(cvar("g_balance_rocketlauncher_guidefadeangle") * DEG2RAD);
- cosmaxang = cos(cvar("g_balance_rocketlauncher_guidemaxangle") * DEG2RAD);
- cosang = desireddir * normalize(self.origin - desiredorigin);
- if(cosminang == cosmaxang)
- f *= (cosang >= cosminang);
- else
- f *= bound(0, (cosang - cosmaxang) / (cosminang - cosmaxang), 1);
+ // disabled this code because it doesn't do what I want it to do :P
+ cosminang = cos(cvar("g_balance_rocketlauncher_guidefadeangle") * DEG2RAD);
+ cosmaxang = cos(cvar("g_balance_rocketlauncher_guidemaxangle") * DEG2RAD);
+ cosang = desireddir * normalize(self.origin - desiredorigin);
+ if(cosminang == cosmaxang)
+ f *= (cosang >= cosminang);
+ else
+ f *= bound(0, (cosang - cosmaxang) / (cosminang - cosmaxang), 1);
#endif
- // now it gets tricky... we want to move like some curve to approximate the target direction
- // but we are limiting the rate at which we can turn!
- goal = desiredorigin + ((self.origin - desiredorigin) * desireddir + cvar("g_balance_rocketlauncher_guidegoal")) * desireddir;
- newdir = rocket_steerto(olddir, normalize(goal - self.origin), cos(cvar("g_balance_rocketlauncher_guiderate") * f * frametime * DEG2RAD));
+ // now it gets tricky... we want to move like some curve to approximate the target direction
+ // but we are limiting the rate at which we can turn!
+ goal = desiredorigin + ((self.origin - desiredorigin) * desireddir + cvar("g_balance_rocketlauncher_guidegoal")) * desireddir;
+ newdir = rocket_steerto(olddir, normalize(goal - self.origin), cos(cvar("g_balance_rocketlauncher_guiderate") * f * frametime * DEG2RAD));
- self.velocity = newdir * velspeed;
- self.angles = vectoangles(self.velocity);
+ self.velocity = newdir * velspeed;
+ self.angles = vectoangles(self.velocity);
- if(!self.count)
- {
- pointparticles(particleeffectnum("rocket_guide"), self.origin, self.velocity, 1);
- // TODO add a better sound here
- sound (self.owner, CHAN_WEAPON2, "weapons/rocket_mode.wav", VOL_BASE, ATTN_NORM);
- self.count = 1;
- }
+ if(!self.count)
+ {
+ pointparticles(particleeffectnum("rocket_guide"), self.origin, self.velocity, 1);
+ // TODO add a better sound here
+ sound (self.owner, CHAN_WEAPON2, "weapons/rocket_mode.wav", VOL_BASE, ATTN_NORM);
+ self.count = 1;
}
-
- if(self.rl_detonate_later)
- W_Rocket_RemoteExplode();
}
+
+ if(self.rl_detonate_later)
+ W_Rocket_RemoteExplode();
}
if(self.csqcprojectile_clientanimate == 0)
setsize (missile, '-3 -3 -3', '3 3 3'); // give it some size so it can be shot
setorigin (missile, w_shotorg - v_forward * 3); // move it back so it hits the wall at the right point
- if(g_laserguided_missile && self.laser_on)
- W_SetupProjectileVelocity(missile, cvar("g_balance_rocketlauncher_laserguided_speedstart"), 0);
- else
- W_SetupProjectileVelocity(missile, cvar("g_balance_rocketlauncher_speedstart"), 0);
+ W_SetupProjectileVelocity(missile, cvar("g_balance_rocketlauncher_speedstart"), 0);
missile.angles = vectoangles (missile.velocity);
missile.touch = W_Rocket_Touch;
missile.cnt = time + cvar("g_balance_rocketlauncher_lifetime");
missile.flags = FL_PROJECTILE;
- CSQCProjectile(missile, cvar("g_balance_rocketlauncher_guiderate") == 0 && cvar("g_balance_rocketlauncher_speedaccel") == 0 && !g_laserguided_missile, PROJECTILE_ROCKET, FALSE); // because of fly sound
+ CSQCProjectile(missile, cvar("g_balance_rocketlauncher_guiderate") == 0 && cvar("g_balance_rocketlauncher_speedaccel") == 0, PROJECTILE_ROCKET, FALSE); // because of fly sound
// muzzle flash for 1st person view
flash = spawn ();
}
else if (req == WR_THINK)
{
- if(g_laserguided_missile)
+ if (self.BUTTON_ATCK)
{
- if (self.BUTTON_ATCK && self.rl_release)
+ if(self.rl_release || cvar("g_balance_rocketlauncher_guidestop"))
+ if(weapon_prepareattack(0, cvar("g_balance_rocketlauncher_refire")))
{
- rockfound = 0;
- for(rock = world; (rock = find(rock, classname, "rocket")); ) if(rock.owner == self)
- {
- if(!rock.rl_detonate_later)
- {
- rock.rl_detonate_later = TRUE;
- rockfound = 1;
- }
- }
- if(rockfound)
- sound (self, CHAN_WEAPON2, "weapons/rocket_det.wav", VOL_BASE, ATTN_NORM);
- else
- {
- if (weapon_prepareattack(0, cvar("g_balance_rocketlauncher_refire")))
- {
- W_Rocket_Attack();
- weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_rocketlauncher_animtime"), w_ready);
- }
- }
+ W_Rocket_Attack();
+ weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_rocketlauncher_animtime"), w_ready);
self.rl_release = 0;
}
- if (!self.BUTTON_ATCK)
- self.rl_release = 1;
- if (self.BUTTON_ATCK2)
- if(self.exteriorweaponentity.attack_finished_single < time)
- {
- self.exteriorweaponentity.attack_finished_single = time + 0.4;
- self.laser_on = !self.laser_on;
- // UGLY WORKAROUND: play this on CHAN_WEAPON2 so it can't cut off fire sounds
- sound (self, CHAN_WEAPON2, "weapons/rocket_mode.wav", VOL_BASE, ATTN_NORM);
- }
}
else
- {
- if (self.BUTTON_ATCK)
- {
- if(self.rl_release || cvar("g_balance_rocketlauncher_guidestop"))
- if(weapon_prepareattack(0, cvar("g_balance_rocketlauncher_refire")))
- {
- W_Rocket_Attack();
- weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_rocketlauncher_animtime"), w_ready);
- self.rl_release = 0;
- }
- }
- else
- self.rl_release = 1;
+ self.rl_release = 1;
- if (self.BUTTON_ATCK2)
+ if (self.BUTTON_ATCK2)
+ {
+ rockfound = 0;
+ for(rock = world; (rock = find(rock, classname, "rocket")); ) if(rock.owner == self)
{
- rockfound = 0;
- for(rock = world; (rock = find(rock, classname, "rocket")); ) if(rock.owner == self)
+ if(!rock.rl_detonate_later)
{
- if(!rock.rl_detonate_later)
- {
- rock.rl_detonate_later = TRUE;
- rockfound = 1;
- }
+ rock.rl_detonate_later = TRUE;
+ rockfound = 1;
}
- if(rockfound)
- sound (self, CHAN_WEAPON2, "weapons/rocket_det.wav", VOL_BASE, ATTN_NORM);
}
+ if(rockfound)
+ sound (self, CHAN_WEAPON2, "weapons/rocket_det.wav", VOL_BASE, ATTN_NORM);
}
}
else if (req == WR_PRECACHE)
precache_sound ("weapons/rocket_det.wav");
precache_sound ("weapons/rocket_fire.wav");
precache_sound ("weapons/rocket_mode.wav");
- if (g_laserguided_missile)
- {
- precache_model ("models/laser_dot.mdl"); // rocket launcher
- }
}
else if (req == WR_SETUP)
{
self.muzzle_flash.angles_z = random() * 180;
self.muzzle_flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
self.muzzle_flash.owner = self;
-
-
}
.float uzi_bulletcounter;
}
else
weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_uzi_sustained_refire"), w_ready);
-};
+}
+
+
+void uzi_mode1_fire_auto()
+{
+ float uzi_spread;
+
+ if (self.BUTTON_ATCK)
+ weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_uzi_sustained_refire"), uzi_mode1_fire_auto);
+ else
+ {
+ ATTACK_FINISHED(self) = time + cvar("g_balance_uzi_first_refire") * W_WeaponRateFactor();
+ weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_uzi_sustained_refire"), w_ready);
+ return;
+ }
+
+ if (!weapon_action(self.weapon, WR_CHECKAMMO1))
+ {
+ W_SwitchWeapon_Force(self, w_getbestweapon(self));
+ w_ready();
+ 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"));
+ if (!g_norecoil)
+ {
+ self.punchangle_x = random () - 0.5;
+ self.punchangle_y = random () - 0.5;
+ }
+
+ uzi_spread = bound(cvar("g_balance_uzi_spread_min"), cvar("g_balance_uzi_spread_min") + (cvar("g_balance_uzi_spread_add") * self.uzi_bulletcounter), cvar("g_balance_uzi_spread_max"));
+ fireBallisticBullet(w_shotorg, w_shotdir, uzi_spread, cvar("g_balance_uzi_speed"), 5, cvar("g_balance_uzi_sustained_damage"), 0, cvar("g_balance_uzi_sustained_force"), WEP_UZI, 0, 1, cvar("g_balance_uzi_bulletconstant"));
+ endFireBallisticBullet();
+
+ self.uzi_bulletcounter = self.uzi_bulletcounter + 1;
+
+ pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+
+ UziFlash();
+ W_AttachToShotorg(self.muzzle_flash, '5 0 0');
+
+ if (cvar("g_casings") >= 2) // casing code
+ SpawnCasing (((random () * 50 + 50) * v_right) - (v_forward * (random () * 25 + 25)) - ((random () * 5 - 70) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 3, self);
+
+ if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ self.ammo_nails = self.ammo_nails - cvar("g_balance_uzi_sustained_ammo");
+
+}
+
+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"));
+ if (!g_norecoil)
+ {
+ self.punchangle_x = random () - 0.5;
+ self.punchangle_y = random () - 0.5;
+ }
+
+ fireBallisticBullet(w_shotorg, w_shotdir, cvar("g_balance_uzi_burst_spread"), cvar("g_balance_uzi_speed"), 5, cvar("g_balance_uzi_sustained_damage"), 0, cvar("g_balance_uzi_sustained_force"), WEP_UZI, 0, 1, cvar("g_balance_uzi_bulletconstant"));
+ endFireBallisticBullet();
+
+
+ pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+
+ UziFlash();
+ W_AttachToShotorg(self.muzzle_flash, '5 0 0');
+
+ if (cvar("g_casings") >= 2) // casing code
+ SpawnCasing (((random () * 50 + 50) * v_right) - (v_forward * (random () * 25 + 25)) - ((random () * 5 - 70) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 3, self);
+
+ self.uzi_bulletcounter = self.uzi_bulletcounter + 1;
+ if (self.uzi_bulletcounter == 0)
+ weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_uzi_burst_refire2"), w_ready);
+ else
+ {
+ weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_uzi_burst_refire"), uzi_mode1_fire_burst);
+ dprint("bullets:", ftos(self.uzi_bulletcounter),"\n");
+ }
+
+}
void spawnfunc_weapon_machinegun(); // defined in t_items.qc
}
else if (req == WR_THINK)
{
- if (self.BUTTON_ATCK)
- if (weapon_prepareattack(0, 0))
+ if(cvar("g_balance_uzi_mode") == 1)
{
- self.uzi_bulletcounter = 1;
- W_Uzi_Attack(WEP_UZI); // sets attack_finished
- weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_uzi_sustained_refire"), uzi_fire1_02);
+ if (self.BUTTON_ATCK)
+ if (weapon_prepareattack(0, 0))
+ {
+ self.uzi_bulletcounter = 0;
+ uzi_mode1_fire_auto();
+ }
+
+ if(self.BUTTON_ATCK2)
+ if(weapon_prepareattack(1, 0))
+ {
+ if (!weapon_action(self.weapon, WR_CHECKAMMO2))
+ {
+ W_SwitchWeapon_Force(self, w_getbestweapon(self));
+ w_ready();
+ return FALSE;
+ }
+
+ if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ self.ammo_nails = self.ammo_nails - cvar("g_balance_uzi_burst_ammo");
+
+ self.uzi_bulletcounter = cvar("g_balance_uzi_burst") * -1;
+ uzi_mode1_fire_burst();
+ }
}
- if (self.BUTTON_ATCK2 && cvar("g_balance_uzi_first"))
- if (weapon_prepareattack(1, 0))
+ else
{
- self.uzi_bulletcounter = 1;
- W_Uzi_Attack(WEP_UZI | HITTYPE_SECONDARY); // sets attack_finished
- weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_uzi_first_refire"), w_ready);
+
+ if (self.BUTTON_ATCK)
+ if (weapon_prepareattack(0, 0))
+ {
+ self.uzi_bulletcounter = 1;
+ W_Uzi_Attack(WEP_UZI); // sets attack_finished
+ weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_uzi_sustained_refire"), uzi_fire1_02);
+ }
+
+ if (self.BUTTON_ATCK2 && cvar("g_balance_uzi_first"))
+ if (weapon_prepareattack(1, 0))
+ {
+ self.uzi_bulletcounter = 1;
+ W_Uzi_Attack(WEP_UZI | HITTYPE_SECONDARY); // sets attack_finished
+ weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_uzi_first_refire"), w_ready);
+ }
}
}
else if (req == WR_PRECACHE)
else if (req == WR_SETUP)
weapon_setup(WEP_UZI);
else if (req == WR_CHECKAMMO1)
- return self.ammo_nails >= cvar("g_balance_uzi_first_ammo");
+ if(cvar("g_balance_uzi_mode") == 1)
+ return self.ammo_nails >= cvar("g_balance_uzi_sustained_ammo");
+ else
+ return self.ammo_nails >= cvar("g_balance_uzi_first_ammo");
else if (req == WR_CHECKAMMO2)
- return self.ammo_nails >= cvar("g_balance_uzi_first_ammo");
+ if(cvar("g_balance_uzi_mode") == 1)
+ return self.ammo_nails >= cvar("g_balance_uzi_burst_ammo");
+ else
+ return self.ammo_nails >= cvar("g_balance_uzi_first_ammo");
return TRUE;
};
#endif
exec default.cfg
exec config.cfg
+maxplayers $menu_maxplayers
exec data/campaign.cfg
exec config_update.cfg
exec autoexec.cfg
\sv_gravity\Make things fall to the ground slower, lower value means lower gravity
\g_grappling_hook\Players spawn with the grappling hook
\g_jetpack\Players spawn with the jetpack
-\g_laserguided_missile\Rockets can be steered using a laser pointer
\g_pinata\Players will drop all weapons they possessed when they are killed
\g_weapon_stay\Weapons stay after they are picked up
\g_weaponarena\Selecting a weapon arena will give all players that weapon at spawn as well as unlimited ammo, and disable all other weapon pickups.
if [ "$countw" != "$countb" ]; then
echo "Mismatch between balanceXonotic.cfg and $b. Aborting."
echo "Differences are:"
- A=`mktemp`
- B=`mktemp`
- awk '/^seta? g_/ { print $2; }' balanceXonotic.cfg | sort -u | tr -d '\r' > "$A"
- awk '/^seta? g_/ { print $2; }' "$b" | sort -u | tr -d '\r' > "$B"
echo "< missing in $b"
echo "> must get removed from $b"
+ A=`mktemp || echo a.tmp`
+ B=`mktemp || echo b.tmp`
+ awk '/^seta? g_/ { print $2; }' balanceXonotic.cfg | sort -u | tr -d '\r' > "$A"
+ awk '/^seta? g_/ { print $2; }' "$b" | sort -u | tr -d '\r' > "$B"
diff "$A" "$B" | grep '^[<>]' | sort
rm -f "$A" "$B"
exit 1
kojn
Maik "SavageX" Merten
MrBougo
+Samual Lenks
Stephan "esteel" Stahl
Wolfgang "Blub\0" Bumiller
Robert "ai" Kuroto
Ronan
Sajt
-Samual Lenks
Severin "sev" Meyer
Shaggy
Shank