]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into terencehill/newpanelhud
authorterencehill <piuntn@gmail.com>
Sat, 27 Nov 2010 23:06:41 +0000 (00:06 +0100)
committerterencehill <piuntn@gmail.com>
Sat, 27 Nov 2010 23:06:41 +0000 (00:06 +0100)
48 files changed:
balanceNexSVN.cfg [deleted file]
balanceTest.cfg [deleted file]
balanceXonotic.cfg
effectinfo.txt
physicsX0.cfg
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/hud.qc
qcsrc/client/hud.qh
qcsrc/client/scoreboard.qc
qcsrc/common/constants.qh
qcsrc/menu/gamecommand.qc
qcsrc/menu/mbuiltin.qh
qcsrc/menu/xonotic/util.qc
qcsrc/menu/xonotic/util.qh
qcsrc/server/accuracy.qc [new file with mode: 0644]
qcsrc/server/accuracy.qh [new file with mode: 0644]
qcsrc/server/cheats.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_weaponsystem.qc
qcsrc/server/clientcommands.qc
qcsrc/server/defs.qh
qcsrc/server/extensions.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/nexball.qc
qcsrc/server/progs.src
qcsrc/server/t_items.qc
qcsrc/server/w_campingrifle.qc
qcsrc/server/w_common.qc
qcsrc/server/w_crylink.qc
qcsrc/server/w_electro.qc
qcsrc/server/w_fireball.qc
qcsrc/server/w_grenadelauncher.qc
qcsrc/server/w_hagar.qc
qcsrc/server/w_hlac.qc
qcsrc/server/w_hook.qc
qcsrc/server/w_laser.qc
qcsrc/server/w_minelayer.qc
qcsrc/server/w_minstanex.qc
qcsrc/server/w_nex.qc
qcsrc/server/w_porto.qc
qcsrc/server/w_rocketlauncher.qc
qcsrc/server/w_seeker.qc
qcsrc/server/w_shotgun.qc
qcsrc/server/w_tuba.qc
qcsrc/server/w_uzi.qc

diff --git a/balanceNexSVN.cfg b/balanceNexSVN.cfg
deleted file mode 100644 (file)
index 23ab694..0000000
+++ /dev/null
@@ -1,734 +0,0 @@
-// {{{ starting gear
-set g_start_weapon_laser -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_shotgun -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_uzi -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_grenadelauncher -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_minelayer -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_electro -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_crylink -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_nex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_hagar -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_rocketlauncher -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_porto -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_hook -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_hlac -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_campingrifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_fireball -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_balance_health_start 150
-set g_balance_armor_start 0
-set g_start_ammo_shells 40
-set g_start_ammo_nails 0
-set g_start_ammo_rockets 0
-set g_start_ammo_cells 0
-set g_start_ammo_fuel 0
-set g_warmup_start_health 250 "starting values when being in warmup-stage"
-set g_warmup_start_armor 100 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_shells 50 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_nails 150 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_rockets 50 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_cells 50 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_fuel 0 "starting values when being in warmup-stage"
-set g_lms_start_health 250
-set g_lms_start_armor 100
-set g_lms_start_ammo_shells 50
-set g_lms_start_ammo_nails 150
-set g_lms_start_ammo_rockets 50
-set g_lms_start_ammo_cells 50
-set g_lms_start_ammo_fuel 0
-set g_balance_nix_roundtime 25
-set g_balance_nix_incrtime 1.6
-set g_balance_nix_ammo_shells 15
-set g_balance_nix_ammo_nails 45
-set g_balance_nix_ammo_rockets 15
-set g_balance_nix_ammo_cells 15
-set g_balance_nix_ammo_fuel 0
-set g_balance_nix_ammoincr_shells 2
-set g_balance_nix_ammoincr_nails 6
-set g_balance_nix_ammoincr_rockets 2
-set g_balance_nix_ammoincr_cells 2
-set g_balance_nix_ammoincr_fuel 2
-// }}}
-
-// {{{ pickup items
-set g_pickup_ammo_anyway 0
-set g_pickup_weapons_anyway 0
-set g_pickup_shells 15
-set g_pickup_shells_weapon 15
-set g_pickup_shells_max 999
-set g_pickup_nails 80
-set g_pickup_nails_weapon 80
-set g_pickup_nails_max 999
-set g_pickup_rockets 15
-set g_pickup_rockets_weapon 15
-set g_pickup_rockets_max 999
-set g_pickup_cells 25
-set g_pickup_cells_weapon 25
-set g_pickup_cells_max 999
-set g_pickup_fuel 25
-set g_pickup_fuel_weapon 25
-set g_pickup_fuel_jetpack 50
-set g_pickup_fuel_max 999
-set g_pickup_armorsmall 5
-set g_pickup_armorsmall_max 999
-set g_pickup_armorsmall_anyway 0
-set g_pickup_armormedium 25
-set g_pickup_armormedium_max 999
-set g_pickup_armormedium_anyway 0
-set g_pickup_armorbig 50
-set g_pickup_armorbig_max 999
-set g_pickup_armorbig_anyway 0
-set g_pickup_armorlarge 100
-set g_pickup_armorlarge_max 999
-set g_pickup_armorlarge_anyway 0
-set g_pickup_healthsmall 5
-set g_pickup_healthsmall_max 999
-set g_pickup_healthsmall_anyway 0
-set g_pickup_healthmedium 25
-set g_pickup_healthmedium_max 999
-set g_pickup_healthmedium_anyway 0
-set g_pickup_healthlarge 50
-set g_pickup_healthlarge_max 999
-set g_pickup_healthlarge_anyway 0
-set g_pickup_healthmega 100
-set g_pickup_healthmega_max 999
-set g_pickup_healthmega_anyway 0
-set g_pickup_respawntime_short 15
-set g_pickup_respawntime_medium 20
-set g_pickup_respawntime_long 30
-set g_pickup_respawntime_powerup 120
-set g_pickup_respawntime_weapon 15
-set g_pickup_respawntime_ammo 15
-set g_pickup_respawntimejitter_short 0
-set g_pickup_respawntimejitter_medium 0
-set g_pickup_respawntimejitter_long 0
-set g_pickup_respawntimejitter_powerup 10
-set g_pickup_respawntimejitter_weapon 0
-set g_pickup_respawntimejitter_ammo 0
-// }}}
-
-// {{{ regen/rot
-set g_balance_health_regen 0.1
-set g_balance_health_regenlinear 0
-set g_balance_pause_health_regen 5
-set g_balance_pause_health_regen_spawn 0
-set g_balance_health_rot 0.1
-set g_balance_health_rotlinear 0
-set g_balance_pause_health_rot 5
-set g_balance_pause_health_rot_spawn 10
-set g_balance_health_regenstable 100
-set g_balance_health_rotstable 100
-set g_balance_health_limit 999
-set g_balance_armor_regen 0
-set g_balance_armor_regenlinear 0
-set g_balance_armor_rot 0.1
-set g_balance_armor_rotlinear 0
-set g_balance_pause_armor_rot 5
-set g_balance_pause_armor_rot_spawn 10
-set g_balance_armor_regenstable 100
-set g_balance_armor_rotstable 100
-set g_balance_armor_limit 999
-set g_balance_armor_blockpercent 0.6
-set g_balance_fuel_regen 0.1 "fuel regeneration (only applies if the player owns IT_FUEL_REGEN)"
-set g_balance_fuel_regenlinear 0
-set g_balance_pause_fuel_regen 2 // other than this, fuel uses the health regen counter
-set g_balance_fuel_rot 0.05
-set g_balance_fuel_rotlinear 0
-set g_balance_pause_fuel_rot 5
-set g_balance_pause_fuel_rot_spawn 10
-set g_balance_fuel_regenstable 50
-set g_balance_fuel_rotstable 100
-set g_balance_fuel_limit 999
-// }}}
-
-// {{{ misc
-set g_balance_selfdamagepercent 0.6
-set g_balance_weaponswitchdelay 0.15
-set g_weaponspeedfactor 1 "weapon projectile speed multiplier"
-set g_weaponratefactor 1 "weapon fire rate multiplier"
-set g_weapondamagefactor 1 "weapon damage multiplier"
-set g_weaponforcefactor 1 "weapon force multiplier"
-set g_weaponspreadfactor 1 "weapon spread multiplier"
-set g_balance_firetransfer_time 0.9
-set g_balance_firetransfer_damage 0.8
-set g_throughfloor_damage 0.4
-set g_throughfloor_force 0.7
-set g_projectiles_newton_style 2
-// possible values:
-// 0: absolute velocity projectiles (like Quake)
-// 1: relative velocity projectiles, "Newtonian" (like Tribes 2)
-// 2: relative velocity projectiles, but aim is precorrected so projectiles hit the crosshair (note: strafe rockets then are SLOWER than ones shot while standing, happens in 1 too when aiming correctly which is hard)
-// 3: absolute velocity + player velocity component in shot direction (note: does NOT yield the right relative velocity, but may be good enough, but it is somewhat prone to sniper rockets)
-// 4: just add the player velocity length to the absolute velocity (tZork's sniper rockets)
-set g_projectiles_newton_style_2_minfactor 0.7
-set g_projectiles_newton_style_2_maxfactor 5
-set g_projectiles_spread_style 0
-// possible values:
-// 0: forward + solid sphere (like Quake) - varies velocity
-// 1: forward + flattened solid sphere
-// 2: forward + solid circle
-// 3: forward + normal distribution 3D - varies velocity
-// 4: forward + normal distribution on a plane
-// 5: forward + circle with 1-r falloff
-// 6: forward + circle with 1-r^2 falloff
-// 7: forward + circle with (1-r)(2-r) falloff
-set g_balance_falldamage_deadminspeed 150
-set g_balance_falldamage_minspeed 1400
-set g_balance_falldamage_factor 0.15
-set g_balance_falldamage_maxdamage 25
-// }}}
-
-// {{{ powerups
-set g_balance_powerup_invincible_takedamage 0.2
-set g_balance_powerup_invincible_time 30
-set g_balance_powerup_strength_damage 3
-set g_balance_powerup_strength_force 3
-set g_balance_powerup_strength_time 30
-set g_balance_powerup_strength_selfdamage 1.5
-set g_balance_powerup_strength_selfforce 1.5
-// }}}
-
-// {{{ jetpack/hook
-set g_jetpack_antigravity 0.8 "factor of gravity compensation of the jetpack"
-set g_jetpack_acceleration_side 1200 "acceleration of the jetpack in xy direction"
-set g_jetpack_acceleration_up 600 "acceleration of the jetpack in z direction (note: you have to factor in gravity here, if antigravity is not 1)"
-set g_jetpack_maxspeed_side 1500 "max speed of the jetpack in xy direction"
-set g_jetpack_maxspeed_up 600 "max speed of the jetpack in z direction"
-set g_jetpack_fuel 8 "fuel per second for jetpack"
-set g_jetpack_attenuation 2 "jetpack sound attenuation"
-
-set g_grappling_hook_tarzan 2 // 2: can also pull players
-set g_balance_grapplehook_speed_fly 1800
-set g_balance_grapplehook_speed_pull 2000
-set g_balance_grapplehook_force_rubber 2000
-set g_balance_grapplehook_force_rubber_overstretch 1000
-set g_balance_grapplehook_length_min 50
-set g_balance_grapplehook_stretch 50
-set g_balance_grapplehook_airfriction 0.2
-set g_balance_grapplehook_health 130
-// }}}
-
-// {{{ weapon properties
-// {{{ laser
-set g_balance_laser_primary_damage 35
-set g_balance_laser_primary_edgedamage 10
-set g_balance_laser_primary_force 400
-set g_balance_laser_primary_radius 70
-set g_balance_laser_primary_speed 9000
-set g_balance_laser_primary_spread 0
-set g_balance_laser_primary_refire 0.7
-set g_balance_laser_primary_animtime 0.3
-set g_balance_laser_primary_lifetime 30
-set g_balance_laser_primary_shotangle 0
-set g_balance_laser_primary_delay 0.03
-set g_balance_laser_primary_gauntlet 0
-set g_balance_laser_primary_force_zscale 1
-set g_balance_laser_primary_force_velocitybias 0
-set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
-set g_balance_laser_secondary_damage 35
-set g_balance_laser_secondary_edgedamage 10
-set g_balance_laser_secondary_force 400
-set g_balance_laser_secondary_radius 70
-set g_balance_laser_secondary_speed 9000
-set g_balance_laser_secondary_spread 0
-set g_balance_laser_secondary_refire 0.7
-set g_balance_laser_secondary_animtime 0.3
-set g_balance_laser_secondary_lifetime 30
-set g_balance_laser_secondary_shotangle 0
-set g_balance_laser_secondary_delay 0
-set g_balance_laser_secondary_gauntlet 0
-set g_balance_laser_secondary_force_zscale 1
-set g_balance_laser_secondary_force_velocitybias 0
-// }}
-// {{{ shotgun
-set g_balance_shotgun_primary_bullets 6
-set g_balance_shotgun_primary_damage 9
-set g_balance_shotgun_primary_force 60
-set g_balance_shotgun_primary_spread 0.07
-set g_balance_shotgun_primary_refire 0.5
-set g_balance_shotgun_primary_animtime 0.2
-set g_balance_shotgun_primary_ammo 1
-set g_balance_shotgun_primary_speed 12000
-set g_balance_shotgun_primary_bulletconstant 75 // 3.8qu
-set g_balance_shotgun_secondary 1
-set g_balance_shotgun_secondary_melee_delay 0.35 // match the anim
-set g_balance_shotgun_secondary_melee_range 60
-set g_balance_shotgun_secondary_melee_swing 50
-set g_balance_shotgun_secondary_melee_time 0.1
-set g_balance_shotgun_secondary_damage 115
-set g_balance_shotgun_secondary_force 150
-set g_balance_shotgun_secondary_refire 1.1
-set g_balance_shotgun_secondary_animtime 1
-// }}}
-// {{{ uzi
-set g_balance_uzi_mode 0                               // Activates varible spread for sustained & burst mode secondary
-set g_balance_uzi_spread_min 0.02
-set g_balance_uzi_spread_max 0.6
-set g_balance_uzi_spread_add 0.012
-set g_balance_uzi_burst 0                              // # of bullets in a burst (if set to 2 or more)
-set g_balance_uzi_burst_refire 0.05            // refire between burst bullets
-set g_balance_uzi_burst_refire2 0.75   // refire after burst
-set g_balance_uzi_burst_spread 0.04
-set g_balance_uzi_burst_damage 18              
-set g_balance_uzi_burst_force 50
-set g_balance_uzi_burst_ammo 3
-set g_balance_uzi_first 1
-set g_balance_uzi_first_damage 30
-set g_balance_uzi_first_force 50
-set g_balance_uzi_first_spread 0.015
-set g_balance_uzi_first_refire 0.2
-set g_balance_uzi_first_ammo 1
-set g_balance_uzi_sustained_damage 15
-set g_balance_uzi_sustained_force 27
-set g_balance_uzi_sustained_spread 0.05
-set g_balance_uzi_sustained_refire 0.1
-set g_balance_uzi_sustained_ammo 1
-set g_balance_uzi_speed 18000
-set g_balance_uzi_bulletconstant 115 // 13.1qu
-// }}}
-// {{{ mortar
-set g_balance_grenadelauncher_primary_type 0
-set g_balance_grenadelauncher_primary_damage 70
-set g_balance_grenadelauncher_primary_edgedamage 38
-set g_balance_grenadelauncher_primary_force 400
-set g_balance_grenadelauncher_primary_radius 140
-set g_balance_grenadelauncher_primary_speed 2000
-set g_balance_grenadelauncher_primary_speed_up 200
-set g_balance_grenadelauncher_primary_speed_z 0
-set g_balance_grenadelauncher_primary_spread 0
-set g_balance_grenadelauncher_primary_lifetime 30
-set g_balance_grenadelauncher_primary_lifetime2 1
-set g_balance_grenadelauncher_primary_refire 0.8
-set g_balance_grenadelauncher_primary_animtime 0.3
-set g_balance_grenadelauncher_primary_ammo 2
-set g_balance_grenadelauncher_primary_health 25
-set g_balance_grenadelauncher_primary_damageforcescale 4
-set g_balance_grenadelauncher_primary_remote_minbouncecnt 0
-set g_balance_grenadelauncher_secondary_type 1
-set g_balance_grenadelauncher_secondary_damage 70
-set g_balance_grenadelauncher_secondary_edgedamage 38
-set g_balance_grenadelauncher_secondary_force 400
-set g_balance_grenadelauncher_secondary_radius 140
-set g_balance_grenadelauncher_secondary_speed 1400
-set g_balance_grenadelauncher_secondary_speed_up 200
-set g_balance_grenadelauncher_secondary_speed_z 0
-set g_balance_grenadelauncher_secondary_spread 0
-set g_balance_grenadelauncher_secondary_lifetime 2.5
-set g_balance_grenadelauncher_secondary_lifetime2 0
-set g_balance_grenadelauncher_secondary_refire 0.7
-set g_balance_grenadelauncher_secondary_animtime 0.3
-set g_balance_grenadelauncher_secondary_ammo 2
-set g_balance_grenadelauncher_secondary_health 10
-set g_balance_grenadelauncher_secondary_damageforcescale 4
-set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
-
-set g_balance_grenadelauncher_bouncefactor 0.5
-set g_balance_grenadelauncher_bouncestop 0.075
-// }}}
-// {{{ minelayer // TODO
-set g_balance_minelayer_damage 35
-set g_balance_minelayer_edgedamage 30
-set g_balance_minelayer_force 250
-set g_balance_minelayer_radius 175
-set g_balance_minelayer_proximityradius 150
-set g_balance_minelayer_speed 750
-set g_balance_minelayer_lifetime 60
-set g_balance_minelayer_refire 1.5
-set g_balance_minelayer_animtime 0.4
-set g_balance_minelayer_ammo 5
-set g_balance_minelayer_health 15
-set g_balance_minelayer_limit 4 // 0 disables the limit
-set g_balance_minelayer_protection 1 // don't explode if the mine would hurt the owner or a team mate
-set g_balance_minelayer_damageforcescale 0
-set g_balance_minelayer_detonatedelay -1 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_minelayer_time 0.5
-set g_balance_minelayer_remote_damage 45
-set g_balance_minelayer_remote_edgedamage 40
-set g_balance_minelayer_remote_radius 200
-set g_balance_minelayer_remote_force 300
-// }}}
-// {{{ electro
-set g_balance_electro_lightning 0
-set g_balance_electro_primary_damage 65
-set g_balance_electro_primary_edgedamage 0
-set g_balance_electro_primary_force 200
-set g_balance_electro_primary_force_up 0
-set g_balance_electro_primary_radius 150
-set g_balance_electro_primary_comboradius 0
-set g_balance_electro_primary_speed 2000
-set g_balance_electro_primary_spread 0
-set g_balance_electro_primary_lifetime 30
-set g_balance_electro_primary_refire 0.6
-set g_balance_electro_primary_animtime 0.3
-set g_balance_electro_primary_ammo 2
-set g_balance_electro_primary_range 0
-set g_balance_electro_primary_falloff_mindist 255 // 0.3 * radius
-set g_balance_electro_primary_falloff_maxdist 850
-set g_balance_electro_primary_falloff_halflifedist 425
-set g_balance_electro_secondary_damage 50
-set g_balance_electro_secondary_edgedamage 0
-set g_balance_electro_secondary_force 200
-set g_balance_electro_secondary_radius 150
-set g_balance_electro_secondary_speed 900
-set g_balance_electro_secondary_speed_up 200
-set g_balance_electro_secondary_speed_z 0
-set g_balance_electro_secondary_spread 0
-set g_balance_electro_secondary_lifetime 5
-set g_balance_electro_secondary_refire 0.3
-set g_balance_electro_secondary_refire2 0
-set g_balance_electro_secondary_animtime 0.3
-set g_balance_electro_secondary_ammo 2
-set g_balance_electro_secondary_health 5
-set g_balance_electro_secondary_damageforcescale 4
-set g_balance_electro_secondary_count 1
-set g_balance_electro_secondary_bouncefactor 0.5
-set g_balance_electro_secondary_bouncestop 0.075
-set g_balance_electro_combo_damage 80
-set g_balance_electro_combo_edgedamage 0
-set g_balance_electro_combo_force 200
-set g_balance_electro_combo_radius 250
-set g_balance_electro_combo_comboradius 0
-set g_balance_electro_combo_speed 2000
-// }}}
-// {{{ crylink
-set g_balance_crylink_primary_damage 18
-set g_balance_crylink_primary_edgedamage 0
-set g_balance_crylink_primary_force -55
-set g_balance_crylink_primary_radius 80
-set g_balance_crylink_primary_speed 7000
-set g_balance_crylink_primary_spread 0.03
-set g_balance_crylink_primary_shots 4
-set g_balance_crylink_primary_bounces 1
-set g_balance_crylink_primary_refire 0.4
-set g_balance_crylink_primary_animtime 0.3
-set g_balance_crylink_primary_ammo 2
-set g_balance_crylink_primary_bouncedamagefactor 0.5
-set g_balance_crylink_primary_joinspread 0
-set g_balance_crylink_primary_jointime 0
-set g_balance_crylink_primary_joinexplode 0
-set g_balance_crylink_primary_joinexplode_damage 0
-set g_balance_crylink_primary_joinexplode_edgedamage 0
-set g_balance_crylink_primary_joinexplode_radius 0
-set g_balance_crylink_primary_joinexplode_force 0
-set g_balance_crylink_primary_linkexplode 1
-
-set g_balance_crylink_primary_middle_lifetime 5 // range: 35000 full, fades to 70000
-set g_balance_crylink_primary_middle_fadetime 5
-set g_balance_crylink_primary_other_lifetime 0.1 // range: 700 full, fades to 2450
-set g_balance_crylink_primary_other_fadetime 0.25
-
-set g_balance_crylink_secondary 1
-set g_balance_crylink_secondary_damage 18
-set g_balance_crylink_secondary_edgedamage 0
-set g_balance_crylink_secondary_force -55
-set g_balance_crylink_secondary_radius 3
-set g_balance_crylink_secondary_speed 7000
-set g_balance_crylink_secondary_spread 0.08
-set g_balance_crylink_secondary_shots 7
-set g_balance_crylink_secondary_bounces 0
-set g_balance_crylink_secondary_refire 0.5
-set g_balance_crylink_secondary_animtime 0.3
-set g_balance_crylink_secondary_ammo 2
-set g_balance_crylink_secondary_bouncedamagefactor 0.5
-set g_balance_crylink_secondary_joinspread 0
-set g_balance_crylink_secondary_jointime 0
-set g_balance_crylink_secondary_joinexplode 0                  
-set g_balance_crylink_secondary_joinexplode_damage 0   
-set g_balance_crylink_secondary_joinexplode_edgedamage 0
-set g_balance_crylink_secondary_joinexplode_radius 0
-set g_balance_crylink_secondary_joinexplode_force 0
-set g_balance_crylink_secondary_linkexplode 1
-
-set g_balance_crylink_secondary_middle_lifetime 5 // range: 35000 full, fades to 70000
-set g_balance_crylink_secondary_middle_fadetime 5
-set g_balance_crylink_secondary_line_lifetime 2 // range: 35000 full, fades to 70000
-set g_balance_crylink_secondary_line_fadetime 2
-// }}}
-// {{{ nex
-set g_balance_nex_primary_damage 90
-set g_balance_nex_primary_force 200
-set g_balance_nex_primary_refire 1.5
-set g_balance_nex_primary_animtime 0.3
-set g_balance_nex_primary_ammo 5
-set g_balance_nex_primary_damagefalloff_mindist 1000
-set g_balance_nex_primary_damagefalloff_maxdist 3000
-set g_balance_nex_primary_damagefalloff_halflife 1500
-set g_balance_nex_primary_damagefalloff_forcehalflife 1500
-
-set g_balance_nex_secondary 0
-set g_balance_nex_secondary_charge 0
-set g_balance_nex_secondary_charge_rate 0.1
-set g_balance_nex_secondary_charge_pool 0
-set g_balance_nex_secondary_charge_pool_regen 0.15
-set g_balance_nex_secondary_charge_pool_pause_regen 1
-set g_balance_nex_secondary_charge_pool_pause_health_regen 1
-set g_balance_nex_secondary_damage 90
-set g_balance_nex_secondary_force 200
-set g_balance_nex_secondary_refire 1.5
-set g_balance_nex_secondary_animtime 0.3
-set g_balance_nex_secondary_ammo 5
-set g_balance_nex_secondary_damagefalloff_mindist 1000
-set g_balance_nex_secondary_damagefalloff_maxdist 3000
-set g_balance_nex_secondary_damagefalloff_halflife 1500
-set g_balance_nex_secondary_damagefalloff_forcehalflife 1500
-
-set g_balance_nex_charge 0
-set g_balance_nex_charge_mindmg 40
-set g_balance_nex_charge_start 0
-set g_balance_nex_charge_rate 0.1
-set g_balance_nex_charge_limit 0.5
-set g_balance_nex_charge_rot_rate 0
-set g_balance_nex_charge_rot_pause 0 // Dont rot down untill this long after release of charge button
-set g_balance_nex_charge_shot_multiplier 0.5
-set g_balance_nex_charge_velocity_rate 0.2
-set g_balance_nex_charge_minspeed 400
-set g_balance_nex_charge_maxspeed 1000
-// }}}
-// {{{ minstanex
-set g_balance_minstanex_refire 1
-set g_balance_minstanex_animtime 0.3
-set g_balance_minstanex_ammo 10
-// }}}
-// {{{ hagar
-set g_balance_hagar_primary_damage 37
-set g_balance_hagar_primary_edgedamage 15
-set g_balance_hagar_primary_force 100
-set g_balance_hagar_primary_radius 65
-set g_balance_hagar_primary_spread 0.010
-set g_balance_hagar_primary_speed 3000
-set g_balance_hagar_primary_lifetime 30
-set g_balance_hagar_primary_refire 0.15
-set g_balance_hagar_primary_ammo 1
-set g_balance_hagar_secondary 1
-set g_balance_hagar_secondary_damage 37
-set g_balance_hagar_secondary_edgedamage 15
-set g_balance_hagar_secondary_force 100
-set g_balance_hagar_secondary_radius 65
-set g_balance_hagar_secondary_spread 0.015
-set g_balance_hagar_secondary_speed 1400
-set g_balance_hagar_secondary_lifetime_min 30
-set g_balance_hagar_secondary_lifetime_rand 0
-set g_balance_hagar_secondary_refire 0.15
-set g_balance_hagar_secondary_ammo 1
-// }}}
-// {{{ rocketlauncher
-set g_balance_rocketlauncher_damage 105
-set g_balance_rocketlauncher_edgedamage 40
-set g_balance_rocketlauncher_force 600
-set g_balance_rocketlauncher_radius 150
-set g_balance_rocketlauncher_speed 850
-set g_balance_rocketlauncher_speedaccel 0
-set g_balance_rocketlauncher_speedstart 850
-set g_balance_rocketlauncher_lifetime 30
-set g_balance_rocketlauncher_refire 1
-set g_balance_rocketlauncher_animtime 0.3
-set g_balance_rocketlauncher_ammo 3
-set g_balance_rocketlauncher_health 40
-set g_balance_rocketlauncher_damageforcescale 4
-set g_balance_rocketlauncher_detonatedelay 0.2 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_rocketlauncher_guiderate 90 // max degrees per second
-set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
-set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
-set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
-set g_balance_rocketlauncher_guidestop 0 // stop guiding when firing again
-set g_balance_rocketlauncher_remote_damage 105
-set g_balance_rocketlauncher_remote_edgedamage 40
-set g_balance_rocketlauncher_remote_radius 150
-set g_balance_rocketlauncher_remote_force 600
-// }}}
-// {{{ porto
-set g_balance_porto_primary_refire 1.5
-set g_balance_porto_primary_animtime 0.3
-set g_balance_porto_primary_speed 5000
-set g_balance_porto_primary_lifetime 30
-set g_balance_portal_health 200 // these get recharged whenever the portal is used
-set g_balance_portal_lifetime 15 // these get recharged whenever the portal is used
-// }}}
-// {{{ hook
-set g_balance_hook_primary_fuel 5 // hook monkeys set 0
-set g_balance_hook_primary_refire 0 // hook monkeys set 0
-set g_balance_hook_primary_animtime 0.3 // good shoot anim
-set g_balance_hook_primary_hooked_time_max 0 // infinite
-set g_balance_hook_primary_hooked_time_free 2 // 2s being hooked are free
-set g_balance_hook_primary_hooked_fuel 5 // fuel per second hooked
-set g_balance_hook_secondary_damage 25 // not much
-set g_balance_hook_secondary_edgedamage 5 // not much
-set g_balance_hook_secondary_radius 500 // LOTS
-set g_balance_hook_secondary_force -2000 // LOTS
-set g_balance_hook_secondary_ammo 50 // a whole pack
-set g_balance_hook_secondary_lifetime 30 // infinite
-set g_balance_hook_secondary_speed 0 // not much throwing
-set g_balance_hook_secondary_gravity 5 // fast falling
-set g_balance_hook_secondary_refire 3 // don't drop too many bombs...
-set g_balance_hook_secondary_animtime 0.3 // good shoot anim
-set g_balance_hook_secondary_power 3 // effect behaves like a square function
-set g_balance_hook_secondary_duration 1.5 // effect runs for three seconds
-// }}}
-// {{{ hlac
-set g_balance_hlac_primary_spread_min 0.01
-set g_balance_hlac_primary_spread_max 0.25
-set g_balance_hlac_primary_spread_add 0.0045
-set g_balance_hlac_primary_spread_crouchmod 0.25
-
-set g_balance_hlac_primary_damage 23
-set g_balance_hlac_primary_edgedamage 10
-set g_balance_hlac_primary_force 100
-set g_balance_hlac_primary_radius 70
-set g_balance_hlac_primary_speed 9000
-set g_balance_hlac_primary_lifetime 5
-
-set g_balance_hlac_primary_refire 0.1
-set g_balance_hlac_primary_animtime 0.4
-set g_balance_hlac_primary_ammo 1
-
-set g_balance_hlac_secondary 1
-set g_balance_hlac_secondary_spread 0.15
-set g_balance_hlac_secondary_spread_crouchmod 0.5
-
-set g_balance_hlac_secondary_damage 23
-set g_balance_hlac_secondary_edgedamage 10
-set g_balance_hlac_secondary_force 100
-set g_balance_hlac_secondary_radius 70
-set g_balance_hlac_secondary_speed 9000
-set g_balance_hlac_secondary_lifetime 5
-
-set g_balance_hlac_secondary_refire 1
-set g_balance_hlac_secondary_animtime 0.3
-set g_balance_hlac_secondary_ammo 10
-set g_balance_hlac_secondary_shots 6
-// }}}
-// {{{ campingrifle
-set g_balance_campingrifle_magazinecapacity 0
-set g_balance_campingrifle_reloadtime 2 // matches reload anim
-set g_balance_campingrifle_auto_reload_after_changing_weapons 0
-set g_balance_campingrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
-set g_balance_campingrifle_primary_tracer 0
-set g_balance_campingrifle_primary_damage 50
-set g_balance_campingrifle_primary_headshotaddeddamage 50
-set g_balance_campingrifle_primary_spread 0
-set g_balance_campingrifle_primary_force 0
-set g_balance_campingrifle_primary_speed 35000
-set g_balance_campingrifle_primary_lifetime 5
-set g_balance_campingrifle_primary_refire 0.7
-set g_balance_campingrifle_primary_animtime 0.3
-set g_balance_campingrifle_primary_ammo 10
-set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
-set g_balance_campingrifle_primary_burstcost 0.35 // require same cooldown as secondary, note it's smaller than primary refire time
-set g_balance_campingrifle_primary_bullethail 0
-set g_balance_campingrifle_secondary 1
-set g_balance_campingrifle_secondary_tracer 0
-set g_balance_campingrifle_secondary_damage 15
-set g_balance_campingrifle_secondary_headshotaddeddamage 25
-set g_balance_campingrifle_secondary_spread 0.02
-set g_balance_campingrifle_secondary_force 0
-set g_balance_campingrifle_secondary_speed 20000
-set g_balance_campingrifle_secondary_lifetime 5
-set g_balance_campingrifle_secondary_refire 0.1
-set g_balance_campingrifle_secondary_animtime 0.1
-set g_balance_campingrifle_secondary_ammo 4
-set g_balance_campingrifle_secondary_bulletconstant 130 // 18.3qu
-set g_balance_campingrifle_secondary_burstcost 0.35
-set g_balance_campingrifle_secondary_bullethail 0
-// }}}
-// {{{ tuba
-set g_balance_tuba_refire 0.05
-set g_balance_tuba_animtime 0.05
-set g_balance_tuba_attenuation 0.5
-set g_balance_tuba_volume 1
-set g_balance_tuba_fadetime 0.25
-set g_balance_tuba_damage 5
-set g_balance_tuba_edgedamage 0
-set g_balance_tuba_radius 200
-set g_balance_tuba_force 40
-// }}}
-// {{{ fireball
-set g_balance_fireball_primary_ammo 40
-set g_balance_fireball_primary_animtime 0.15
-set g_balance_fireball_primary_bfgdamage 100
-set g_balance_fireball_primary_bfgforce 0
-set g_balance_fireball_primary_bfgradius 1000
-set g_balance_fireball_primary_damage 200
-set g_balance_fireball_primary_damageforcescale 4
-set g_balance_fireball_primary_edgedamage 0
-set g_balance_fireball_primary_force 700
-set g_balance_fireball_primary_health 50
-set g_balance_fireball_primary_laserburntime 0.5
-set g_balance_fireball_primary_laserdamage 80
-set g_balance_fireball_primary_laseredgedamage 20
-set g_balance_fireball_primary_laserradius 256
-set g_balance_fireball_primary_lifetime 15
-set g_balance_fireball_primary_radius 200
-set g_balance_fireball_primary_refire 5
-set g_balance_fireball_primary_refire2 0
-set g_balance_fireball_primary_speed 650
-set g_balance_fireball_primary_spread 0
-set g_balance_fireball_secondary_ammo 5
-set g_balance_fireball_secondary_animtime 0.3
-set g_balance_fireball_secondary_damage 40
-set g_balance_fireball_secondary_damageforcescale 4
-set g_balance_fireball_secondary_damagetime 5
-set g_balance_fireball_secondary_force 100
-set g_balance_fireball_secondary_laserburntime 0.5
-set g_balance_fireball_secondary_laserdamage 50
-set g_balance_fireball_secondary_laseredgedamage 20
-set g_balance_fireball_secondary_laserradius 110
-set g_balance_fireball_secondary_lifetime 7
-set g_balance_fireball_secondary_refire 2
-set g_balance_fireball_secondary_speed 900
-set g_balance_fireball_secondary_speed_up 100
-set g_balance_fireball_secondary_speed_z 0
-set g_balance_fireball_secondary_spread 0
-// }}}
-// {{{ seeker
-set g_balance_seeker_flac_ammo 0.5
-set g_balance_seeker_flac_animtime 0.1
-set g_balance_seeker_flac_damage 15
-set g_balance_seeker_flac_edgedamage 10
-set g_balance_seeker_flac_force 50
-set g_balance_seeker_flac_lifetime 0.1
-set g_balance_seeker_flac_lifetime_rand 0.05
-set g_balance_seeker_flac_radius 100
-set g_balance_seeker_flac_refire 0.1
-set g_balance_seeker_flac_speed 3000
-set g_balance_seeker_flac_speed_up 1000
-set g_balance_seeker_flac_speed_z 0
-set g_balance_seeker_flac_spread 0.4
-set g_balance_seeker_missile_accel 1.05
-set g_balance_seeker_missile_ammo 2
-set g_balance_seeker_missile_animtime 0.3
-set g_balance_seeker_missile_count 4
-set g_balance_seeker_missile_damage 40
-set g_balance_seeker_missile_damageforcescale 4
-set g_balance_seeker_missile_decel 0.9
-set g_balance_seeker_missile_delay 0.25
-set g_balance_seeker_missile_edgedamage 10
-set g_balance_seeker_missile_force 250
-set g_balance_seeker_missile_health 5
-set g_balance_seeker_missile_lifetime 15
-set g_balance_seeker_missile_proxy 0
-set g_balance_seeker_missile_proxy_delay 0.2
-set g_balance_seeker_missile_proxy_maxrange 45
-set g_balance_seeker_missile_radius 80
-set g_balance_seeker_missile_refire 0.5
-set g_balance_seeker_missile_smart 1
-set g_balance_seeker_missile_smart_mindist 800
-set g_balance_seeker_missile_smart_trace_max 2500
-set g_balance_seeker_missile_smart_trace_min 1000
-set g_balance_seeker_missile_speed 700
-set g_balance_seeker_missile_speed_accel 0
-set g_balance_seeker_missile_speed_up 300
-set g_balance_seeker_missile_speed_z 0
-set g_balance_seeker_missile_speed_max 1250
-set g_balance_seeker_missile_spread 0
-set g_balance_seeker_missile_turnrate 0.65
-set g_balance_seeker_tag_ammo 1
-set g_balance_seeker_tag_animtime 0.3
-set g_balance_seeker_tag_damageforcescale 4
-set g_balance_seeker_tag_health 5
-set g_balance_seeker_tag_lifetime 15
-set g_balance_seeker_tag_refire 0.7
-set g_balance_seeker_tag_speed 9000
-set g_balance_seeker_tag_spread 0
-// End new seeker
diff --git a/balanceTest.cfg b/balanceTest.cfg
deleted file mode 100644 (file)
index fa4f521..0000000
+++ /dev/null
@@ -1,735 +0,0 @@
-// {{{ starting gear
-set g_start_weapon_laser -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_shotgun -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_uzi -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_grenadelauncher -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_minelayer -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_electro -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_crylink -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_nex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_hagar -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_rocketlauncher -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_porto -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_hook -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_hlac -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_campingrifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_fireball -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_balance_health_start 150
-set g_balance_armor_start 0
-set g_start_ammo_shells 20
-set g_start_ammo_nails 0
-set g_start_ammo_rockets 0
-set g_start_ammo_cells 0
-set g_start_ammo_fuel 0
-set g_warmup_start_health 200 "starting values when being in warmup-stage"
-set g_warmup_start_armor 100 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_shells 50 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_nails 150 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_rockets 50 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_cells 50 "starting values when being in warmup-stage"
-set g_warmup_start_ammo_fuel 0 "starting values when being in warmup-stage"
-set g_lms_start_health 200
-set g_lms_start_armor 100
-set g_lms_start_ammo_shells 30
-set g_lms_start_ammo_nails 250
-set g_lms_start_ammo_rockets 100
-set g_lms_start_ammo_cells 200
-set g_lms_start_ammo_fuel 0
-set g_balance_nix_roundtime 25
-set g_balance_nix_incrtime 1.6
-set g_balance_nix_ammo_shells 15
-set g_balance_nix_ammo_nails 45
-set g_balance_nix_ammo_rockets 15
-set g_balance_nix_ammo_cells 15
-set g_balance_nix_ammo_fuel 0
-set g_balance_nix_ammoincr_shells 2
-set g_balance_nix_ammoincr_nails 6
-set g_balance_nix_ammoincr_rockets 2
-set g_balance_nix_ammoincr_cells 2
-set g_balance_nix_ammoincr_fuel 2
-// }}}
-
-// {{{ pickup items
-set g_pickup_ammo_anyway 1
-set g_pickup_weapons_anyway 1
-set g_pickup_shells 20
-set g_pickup_shells_weapon 10
-set g_pickup_shells_max 50
-set g_pickup_nails 60
-set g_pickup_nails_weapon 60
-set g_pickup_nails_max 300
-set g_pickup_rockets 25
-set g_pickup_rockets_weapon 15
-set g_pickup_rockets_max 150
-set g_pickup_cells 30
-set g_pickup_cells_weapon 20
-set g_pickup_cells_max 300
-set g_pickup_fuel 25
-set g_pickup_fuel_weapon 15
-set g_pickup_fuel_jetpack 50
-set g_pickup_fuel_max 999
-set g_pickup_armorsmall 5
-set g_pickup_armorsmall_max 999
-set g_pickup_armorsmall_anyway 0
-set g_pickup_armormedium 25
-set g_pickup_armormedium_max 999
-set g_pickup_armormedium_anyway 0
-set g_pickup_armorbig 50
-set g_pickup_armorbig_max 999
-set g_pickup_armorbig_anyway 0
-set g_pickup_armorlarge 100
-set g_pickup_armorlarge_max 999
-set g_pickup_armorlarge_anyway 0
-set g_pickup_healthsmall 5
-set g_pickup_healthsmall_max 999
-set g_pickup_healthsmall_anyway 0
-set g_pickup_healthmedium 25
-set g_pickup_healthmedium_max 999
-set g_pickup_healthmedium_anyway 0
-set g_pickup_healthlarge 50
-set g_pickup_healthlarge_max 999
-set g_pickup_healthlarge_anyway 0
-set g_pickup_healthmega 100
-set g_pickup_healthmega_max 999
-set g_pickup_healthmega_anyway 0
-set g_pickup_respawntime_short 15
-set g_pickup_respawntime_medium 20
-set g_pickup_respawntime_long 30
-set g_pickup_respawntime_powerup 120
-set g_pickup_respawntime_weapon 20
-set g_pickup_respawntime_ammo 15
-set g_pickup_respawntimejitter_short 0
-set g_pickup_respawntimejitter_medium 0
-set g_pickup_respawntimejitter_long 0
-set g_pickup_respawntimejitter_powerup 10
-set g_pickup_respawntimejitter_weapon 0
-set g_pickup_respawntimejitter_ammo 0
-// }}}
-
-// {{{ regen/rot
-set g_balance_health_regen 0.1
-set g_balance_health_regenlinear 0
-set g_balance_pause_health_regen 5
-set g_balance_pause_health_regen_spawn 0
-set g_balance_health_rot 0.1
-set g_balance_health_rotlinear 2.5
-set g_balance_pause_health_rot 4
-set g_balance_pause_health_rot_spawn 8
-set g_balance_health_regenstable 100
-set g_balance_health_rotstable 100
-set g_balance_health_limit 999
-set g_balance_armor_regen 0
-set g_balance_armor_regenlinear 0
-set g_balance_armor_rot 0.1
-set g_balance_armor_rotlinear 2.5
-set g_balance_pause_armor_rot 4
-set g_balance_pause_armor_rot_spawn 8
-set g_balance_armor_regenstable 100
-set g_balance_armor_rotstable 100
-set g_balance_armor_limit 999
-set g_balance_armor_blockpercent 0.7
-set g_balance_fuel_regen 0.1 "fuel regeneration (only applies if the player owns IT_FUEL_REGEN)"
-set g_balance_fuel_regenlinear 0
-set g_balance_pause_fuel_regen 2 // other than this, fuel uses the health regen counter
-set g_balance_fuel_rot 0.05
-set g_balance_fuel_rotlinear 0
-set g_balance_pause_fuel_rot 4
-set g_balance_pause_fuel_rot_spawn 8
-set g_balance_fuel_regenstable 50
-set g_balance_fuel_rotstable 100
-set g_balance_fuel_limit 999
-// }}}
-
-// {{{ misc
-set g_balance_selfdamagepercent 0.6
-set g_balance_weaponswitchdelay 0.15
-set g_weaponspeedfactor 1 "weapon projectile speed multiplier"
-set g_weaponratefactor 1 "weapon fire rate multiplier"
-set g_weapondamagefactor 1 "weapon damage multiplier"
-set g_weaponforcefactor 1 "weapon force multiplier"
-set g_weaponspreadfactor 1 "weapon spread multiplier"
-set g_balance_firetransfer_time 0.9
-set g_balance_firetransfer_damage 0.8
-set g_throughfloor_damage 0.5
-set g_throughfloor_force 0.7
-set g_projectiles_newton_style 2
-// possible values:
-// 0: absolute velocity projectiles (like Quake)
-// 1: relative velocity projectiles, "Newtonian" (like Tribes 2)
-// 2: relative velocity projectiles, but aim is precorrected so projectiles hit the crosshair (note: strafe rockets then are SLOWER than ones shot while standing, happens in 1 too when aiming correctly which is hard)
-// 3: absolute velocity + player velocity component in shot direction (note: does NOT yield the right relative velocity, but may be good enough, but it is somewhat prone to sniper rockets)
-// 4: just add the player velocity length to the absolute velocity (tZork's sniper rockets)
-set g_projectiles_newton_style_2_minfactor 0.7
-set g_projectiles_newton_style_2_maxfactor 5
-set g_projectiles_spread_style 7
-// possible values:
-// 0: forward + solid sphere (like Quake) - varies velocity
-// 1: forward + flattened solid sphere
-// 2: forward + solid circle
-// 3: forward + normal distribution 3D - varies velocity
-// 4: forward + normal distribution on a plane
-// 5: forward + circle with 1-r falloff
-// 6: forward + circle with 1-r^2 falloff
-// 7: forward + circle with (1-r)(2-r) falloff
-set g_balance_falldamage_deadminspeed 150
-set g_balance_falldamage_minspeed 800
-set g_balance_falldamage_factor 0.02 // maxspeed = minspeed + maxdamage / factor = 4550
-set g_balance_falldamage_maxdamage 75
-// }}}
-
-// {{{ powerups
-set g_balance_powerup_invincible_takedamage 0.3
-set g_balance_powerup_invincible_time 30
-set g_balance_powerup_strength_damage 3
-set g_balance_powerup_strength_force 3
-set g_balance_powerup_strength_time 30
-set g_balance_powerup_strength_selfdamage 1.5
-set g_balance_powerup_strength_selfforce 1.5
-// }}}
-
-// {{{ jetpack/hook
-set g_jetpack_antigravity 0.8 "factor of gravity compensation of the jetpack"
-set g_jetpack_acceleration_side 1200 "acceleration of the jetpack in xy direction"
-set g_jetpack_acceleration_up 600 "acceleration of the jetpack in z direction (note: you have to factor in gravity here, if antigravity is not 1)"
-set g_jetpack_maxspeed_side 1500 "max speed of the jetpack in xy direction"
-set g_jetpack_maxspeed_up 600 "max speed of the jetpack in z direction"
-set g_jetpack_fuel 8 "fuel per second for jetpack"
-set g_jetpack_attenuation 2 "jetpack sound attenuation"
-
-set g_grappling_hook_tarzan 2 // 2: can also pull players
-set g_balance_grapplehook_speed_fly 1800
-set g_balance_grapplehook_speed_pull 2000
-set g_balance_grapplehook_force_rubber 2000
-set g_balance_grapplehook_force_rubber_overstretch 1000
-set g_balance_grapplehook_length_min 50
-set g_balance_grapplehook_stretch 50
-set g_balance_grapplehook_airfriction 0.2
-set g_balance_grapplehook_health 130
-// }}}
-
-// {{{ weapon properties
-// {{{ laser
-set g_balance_laser_primary_damage 20 
-set g_balance_laser_primary_edgedamage 10
-set g_balance_laser_primary_force 230
-set g_balance_laser_primary_radius 60
-set g_balance_laser_primary_speed 9000
-set g_balance_laser_primary_spread 0
-set g_balance_laser_primary_refire 0.6
-set g_balance_laser_primary_animtime 0.6
-set g_balance_laser_primary_lifetime 5
-set g_balance_laser_primary_shotangle 0
-set g_balance_laser_primary_delay 0
-set g_balance_laser_primary_gauntlet 0
-set g_balance_laser_primary_force_zscale 1.2
-set g_balance_laser_primary_force_velocitybias 0.15
-set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
-set g_balance_laser_secondary_damage 35
-set g_balance_laser_secondary_edgedamage 10
-set g_balance_laser_secondary_force 400
-set g_balance_laser_secondary_radius 70
-set g_balance_laser_secondary_speed 9000
-set g_balance_laser_secondary_spread 0
-set g_balance_laser_secondary_refire 0.7
-set g_balance_laser_secondary_animtime 0.3
-set g_balance_laser_secondary_lifetime 30
-set g_balance_laser_secondary_shotangle 0
-set g_balance_laser_secondary_delay 0
-set g_balance_laser_secondary_gauntlet 0
-set g_balance_laser_secondary_force_zscale 1
-set g_balance_laser_secondary_force_velocitybias 0
-// }}}
-// {{{ shotgun
-set g_balance_shotgun_primary_bullets 10
-set g_balance_shotgun_primary_damage 5
-set g_balance_shotgun_primary_force 5
-set g_balance_shotgun_primary_spread 0.07
-set g_balance_shotgun_primary_refire 0.8
-set g_balance_shotgun_primary_animtime 0.2
-set g_balance_shotgun_primary_ammo 1
-set g_balance_shotgun_primary_speed 12000
-set g_balance_shotgun_primary_bulletconstant 75 // 3.8qu
-set g_balance_shotgun_secondary 1
-set g_balance_shotgun_secondary_melee_delay 0.35 // match the anim
-set g_balance_shotgun_secondary_melee_range 85
-set g_balance_shotgun_secondary_melee_swing 50
-set g_balance_shotgun_secondary_melee_time 0.1
-set g_balance_shotgun_secondary_damage 110
-set g_balance_shotgun_secondary_force 150
-set g_balance_shotgun_secondary_refire 1.1
-set g_balance_shotgun_secondary_animtime 1
-// }}}
-// {{{ uzi
-set g_balance_uzi_mode 1                               // Activates varible spread for sustained & burst mode secondary
-set g_balance_uzi_spread_min 0.02
-set g_balance_uzi_spread_max 0.6
-set g_balance_uzi_spread_add 0.008
-set g_balance_uzi_burst 3                              // # of bullets in a burst (if set to 2 or more)
-set g_balance_uzi_burst_refire 0.05            // refire between burst bullets
-set g_balance_uzi_burst_refire2 0.4    // refire after burst
-set g_balance_uzi_burst_spread 0.03
-set g_balance_uzi_burst_damage 18              // 90 dps (but 90 dmg deliverd in .25s)
-set g_balance_uzi_burst_force 50
-set g_balance_uzi_burst_ammo 3
-set g_balance_uzi_first 1
-set g_balance_uzi_first_damage 30
-set g_balance_uzi_first_force 50
-set g_balance_uzi_first_spread 0.015
-set g_balance_uzi_first_refire 0.2
-set g_balance_uzi_first_ammo 1
-set g_balance_uzi_sustained_damage 14  // 120 dps
-set g_balance_uzi_sustained_force 12
-set g_balance_uzi_sustained_spread 0.02
-set g_balance_uzi_sustained_refire 0.1
-set g_balance_uzi_sustained_ammo 1
-set g_balance_uzi_speed 18000
-set g_balance_uzi_bulletconstant 115 // 13.1qu
-// }}}
-// {{{ mortar
-set g_balance_grenadelauncher_primary_type 0
-set g_balance_grenadelauncher_primary_damage 50
-set g_balance_grenadelauncher_primary_edgedamage 30
-set g_balance_grenadelauncher_primary_force 250
-set g_balance_grenadelauncher_primary_radius 140
-set g_balance_grenadelauncher_primary_speed 2000
-set g_balance_grenadelauncher_primary_speed_up 200
-set g_balance_grenadelauncher_primary_speed_z 0
-set g_balance_grenadelauncher_primary_spread 0
-set g_balance_grenadelauncher_primary_lifetime 30
-set g_balance_grenadelauncher_primary_lifetime2 1
-set g_balance_grenadelauncher_primary_refire 0.8
-set g_balance_grenadelauncher_primary_animtime 0.3
-set g_balance_grenadelauncher_primary_ammo 2
-set g_balance_grenadelauncher_primary_health 25
-set g_balance_grenadelauncher_primary_damageforcescale 4
-set g_balance_grenadelauncher_primary_remote_minbouncecnt 0
-
-set g_balance_grenadelauncher_secondary_type 1
-set g_balance_grenadelauncher_secondary_damage 60
-set g_balance_grenadelauncher_secondary_edgedamage 35
-set g_balance_grenadelauncher_secondary_force 300
-set g_balance_grenadelauncher_secondary_radius 140
-set g_balance_grenadelauncher_secondary_speed 1400
-set g_balance_grenadelauncher_secondary_speed_up 200
-set g_balance_grenadelauncher_secondary_speed_z 0
-set g_balance_grenadelauncher_secondary_spread 0
-set g_balance_grenadelauncher_secondary_lifetime 2.5
-set g_balance_grenadelauncher_secondary_lifetime2 0
-set g_balance_grenadelauncher_secondary_refire 0.7
-set g_balance_grenadelauncher_secondary_animtime 0.3
-set g_balance_grenadelauncher_secondary_ammo 2
-set g_balance_grenadelauncher_secondary_health 10
-set g_balance_grenadelauncher_secondary_damageforcescale 4
-set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
-
-set g_balance_grenadelauncher_bouncefactor 0.5
-set g_balance_grenadelauncher_bouncestop 0.075
-// }}}
-// {{{ minelayer // TODO
-set g_balance_minelayer_damage 35
-set g_balance_minelayer_edgedamage 30
-set g_balance_minelayer_force 250
-set g_balance_minelayer_radius 175
-set g_balance_minelayer_proximityradius 150
-set g_balance_minelayer_speed 750
-set g_balance_minelayer_lifetime 60
-set g_balance_minelayer_refire 1.5
-set g_balance_minelayer_animtime 0.4
-set g_balance_minelayer_ammo 5
-set g_balance_minelayer_health 15
-set g_balance_minelayer_limit 4 // 0 disables the limit
-set g_balance_minelayer_protection 1 // don't explode if the mine would hurt the owner or a team mate
-set g_balance_minelayer_damageforcescale 0
-set g_balance_minelayer_detonatedelay -1 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_minelayer_time 0.5
-set g_balance_minelayer_remote_damage 45
-set g_balance_minelayer_remote_edgedamage 40
-set g_balance_minelayer_remote_radius 200
-set g_balance_minelayer_remote_force 300
-// }}}
-// {{{ electro
-set g_balance_electro_lightning 0
-set g_balance_electro_primary_damage 35
-set g_balance_electro_primary_edgedamage 0
-set g_balance_electro_primary_force 150
-set g_balance_electro_primary_force_up 0
-set g_balance_electro_primary_radius 155
-set g_balance_electro_primary_comboradius 0
-set g_balance_electro_primary_speed 2000
-set g_balance_electro_primary_spread 0
-set g_balance_electro_primary_lifetime 30
-set g_balance_electro_primary_refire 0.65
-set g_balance_electro_primary_animtime 0.3
-set g_balance_electro_primary_ammo 2
-set g_balance_electro_primary_range 0
-set g_balance_electro_primary_falloff_mindist 255 // 0.3 * radius
-set g_balance_electro_primary_falloff_maxdist 850
-set g_balance_electro_primary_falloff_halflifedist 425
-set g_balance_electro_secondary_damage 25
-set g_balance_electro_secondary_edgedamage 0
-set g_balance_electro_secondary_force 50
-set g_balance_electro_secondary_radius 25
-set g_balance_electro_secondary_speed 750
-set g_balance_electro_secondary_speed_up 150
-set g_balance_electro_secondary_speed_z 0
-set g_balance_electro_secondary_spread 0.025
-set g_balance_electro_secondary_lifetime 5
-set g_balance_electro_secondary_refire 0.1
-set g_balance_electro_secondary_refire2 2
-set g_balance_electro_secondary_animtime 0.15
-set g_balance_electro_secondary_ammo 2
-set g_balance_electro_secondary_health 10
-set g_balance_electro_secondary_damageforcescale 2
-set g_balance_electro_secondary_count 3
-set g_balance_electro_secondary_bouncefactor 0.5
-set g_balance_electro_secondary_bouncestop 0.075
-set g_balance_electro_combo_damage 80
-set g_balance_electro_combo_edgedamage 10
-set g_balance_electro_combo_force 150
-set g_balance_electro_combo_radius 250
-set g_balance_electro_combo_comboradius 0
-set g_balance_electro_combo_speed 1000
-// }}}
-// {{{ crylink
-set g_balance_crylink_primary_damage 5
-set g_balance_crylink_primary_edgedamage 3
-set g_balance_crylink_primary_force 10
-set g_balance_crylink_primary_radius 15
-set g_balance_crylink_primary_speed 1500
-set g_balance_crylink_primary_spread 0.1
-set g_balance_crylink_primary_shots 8
-set g_balance_crylink_primary_bounces 1
-set g_balance_crylink_primary_refire 1
-set g_balance_crylink_primary_animtime 0.4
-set g_balance_crylink_primary_ammo 2
-set g_balance_crylink_primary_bouncedamagefactor 0.2
-set g_balance_crylink_primary_joinspread 0.2
-set g_balance_crylink_primary_jointime 0
-set g_balance_crylink_primary_joinexplode 1                            //if != 0 do a extra damage pass when projectiles join
-set g_balance_crylink_primary_joinexplode_damage 100   //Max demage (Determined by % of _primary_shots that joins)
-set g_balance_crylink_primary_joinexplode_edgedamage 20
-set g_balance_crylink_primary_joinexplode_radius 200
-set g_balance_crylink_primary_joinexplode_force 400
-set g_balance_crylink_primary_linkexplode 0
-
-set g_balance_crylink_primary_middle_lifetime 5 
-set g_balance_crylink_primary_middle_fadetime 0.25
-set g_balance_crylink_primary_other_lifetime 2 // range: 800 full, fades to 1300
-set g_balance_crylink_primary_other_fadetime 0.25
-
-set g_balance_crylink_secondary 1
-set g_balance_crylink_secondary_damage 2
-set g_balance_crylink_secondary_edgedamage 0
-set g_balance_crylink_secondary_force -20
-set g_balance_crylink_secondary_radius 5
-set g_balance_crylink_secondary_speed 1600
-set g_balance_crylink_secondary_spread 0.03
-set g_balance_crylink_secondary_shots 3
-set g_balance_crylink_secondary_bounces 0
-set g_balance_crylink_secondary_refire 0.15
-set g_balance_crylink_secondary_animtime 0.15
-set g_balance_crylink_secondary_ammo 1
-set g_balance_crylink_secondary_bouncedamagefactor 0.5
-set g_balance_crylink_secondary_joinspread 0
-set g_balance_crylink_secondary_jointime 0
-set g_balance_crylink_secondary_joinexplode 0                  
-set g_balance_crylink_secondary_joinexplode_damage 0   
-set g_balance_crylink_secondary_joinexplode_edgedamage 0
-set g_balance_crylink_secondary_joinexplode_radius 0
-set g_balance_crylink_secondary_joinexplode_force 0
-set g_balance_crylink_secondary_linkexplode 1
-
-set g_balance_crylink_secondary_middle_lifetime 5 // range: 10000 full, fades to 10000
-set g_balance_crylink_secondary_middle_fadetime 5
-set g_balance_crylink_secondary_line_lifetime 2 // range: 4000 full, fades to 8000
-set g_balance_crylink_secondary_line_fadetime 2
-// }}}
-// {{{ nex
-set g_balance_nex_primary_damage 100
-set g_balance_nex_primary_force 600
-set g_balance_nex_primary_refire 1
-set g_balance_nex_primary_animtime 0.3
-set g_balance_nex_primary_ammo 5
-set g_balance_nex_primary_damagefalloff_mindist 0
-set g_balance_nex_primary_damagefalloff_maxdist 0
-set g_balance_nex_primary_damagefalloff_halflife 0
-set g_balance_nex_primary_damagefalloff_forcehalflife 0
-
-set g_balance_nex_secondary 1
-set g_balance_nex_secondary_charge 1
-set g_balance_nex_secondary_charge_rate 0.55
-set g_balance_nex_secondary_charge_pool 0
-set g_balance_nex_secondary_charge_pool_regen 0.15
-set g_balance_nex_secondary_charge_pool_pause_regen 1
-set g_balance_nex_secondary_charge_pool_pause_health_regen 1
-set g_balance_nex_secondary_damage 100
-set g_balance_nex_secondary_force 600
-set g_balance_nex_secondary_refire 1.5
-set g_balance_nex_secondary_animtime 0.3
-set g_balance_nex_secondary_ammo 0
-set g_balance_nex_secondary_damagefalloff_mindist 0
-set g_balance_nex_secondary_damagefalloff_maxdist 0
-set g_balance_nex_secondary_damagefalloff_halflife 0
-set g_balance_nex_secondary_damagefalloff_forcehalflife 0
-
-set g_balance_nex_charge 1
-set g_balance_nex_charge_mindmg 10
-set g_balance_nex_charge_start 0
-set g_balance_nex_charge_rate 0.35
-set g_balance_nex_charge_limit 0.5
-set g_balance_nex_charge_rot_rate 0.1
-set g_balance_nex_charge_rot_pause 1 // Dont rot down untill this long after release of charge button
-set g_balance_nex_charge_shot_multiplier 0
-set g_balance_nex_charge_velocity_rate 0
-set g_balance_nex_charge_minspeed 400
-set g_balance_nex_charge_maxspeed 1000
-// }}}
-// {{{ minstanex
-set g_balance_minstanex_refire 1
-set g_balance_minstanex_animtime 0.3
-set g_balance_minstanex_ammo 10
-// }}}
-// {{{ hagar
-set g_balance_hagar_primary_damage 25
-set g_balance_hagar_primary_edgedamage 5
-set g_balance_hagar_primary_force 70
-set g_balance_hagar_primary_radius 60
-set g_balance_hagar_primary_spread 0.010
-set g_balance_hagar_primary_speed 2500
-set g_balance_hagar_primary_lifetime 30
-set g_balance_hagar_primary_refire 0.2
-set g_balance_hagar_primary_ammo 1
-set g_balance_hagar_secondary 1
-set g_balance_hagar_secondary_damage 30
-set g_balance_hagar_secondary_edgedamage 15
-set g_balance_hagar_secondary_force 50
-set g_balance_hagar_secondary_radius 65
-set g_balance_hagar_secondary_spread 0.015
-set g_balance_hagar_secondary_speed 1400
-set g_balance_hagar_secondary_lifetime_min 30
-set g_balance_hagar_secondary_lifetime_rand 0
-set g_balance_hagar_secondary_refire 0.15
-set g_balance_hagar_secondary_ammo 1
-// }}}
-// {{{ rocketlauncher // TODO
-set g_balance_rocketlauncher_damage 120
-set g_balance_rocketlauncher_edgedamage 25
-set g_balance_rocketlauncher_force 350
-set g_balance_rocketlauncher_radius 130
-set g_balance_rocketlauncher_speed 900
-set g_balance_rocketlauncher_speedaccel 0
-set g_balance_rocketlauncher_speedstart 900
-set g_balance_rocketlauncher_lifetime 9
-set g_balance_rocketlauncher_refire 1.2
-set g_balance_rocketlauncher_animtime 0.4
-set g_balance_rocketlauncher_ammo 3
-set g_balance_rocketlauncher_health 10
-set g_balance_rocketlauncher_damageforcescale 0
-set g_balance_rocketlauncher_detonatedelay -1 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_rocketlauncher_guiderate 25 // max degrees per second
-set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
-set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
-set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
-set g_balance_rocketlauncher_guidestop 0 // stop guiding when firing again
-set g_balance_rocketlauncher_remote_damage 90
-set g_balance_rocketlauncher_remote_edgedamage 20
-set g_balance_rocketlauncher_remote_radius 125
-set g_balance_rocketlauncher_remote_force 350
-// }}}
-// {{{ porto
-set g_balance_porto_primary_refire 1.5
-set g_balance_porto_primary_animtime 0.3
-set g_balance_porto_primary_speed 2000
-set g_balance_porto_primary_lifetime 30
-set g_balance_portal_health 200 // these get recharged whenever the portal is used
-set g_balance_portal_lifetime 15 // these get recharged whenever the portal is used
-// }}}
-// {{{ hook
-set g_balance_hook_primary_fuel 5 // hook monkeys set 0
-set g_balance_hook_primary_refire 0 // hook monkeys set 0
-set g_balance_hook_primary_animtime 0.3 // good shoot anim
-set g_balance_hook_primary_hooked_time_max 0 // infinite
-set g_balance_hook_primary_hooked_time_free 2 // 2s being hooked are free
-set g_balance_hook_primary_hooked_fuel 5 // fuel per second hooked
-set g_balance_hook_secondary_damage 25 // not much
-set g_balance_hook_secondary_edgedamage 5 // not much
-set g_balance_hook_secondary_radius 500 // LOTS
-set g_balance_hook_secondary_force -2000 // LOTS
-set g_balance_hook_secondary_ammo 50 // a whole pack
-set g_balance_hook_secondary_lifetime 5 // infinite
-set g_balance_hook_secondary_speed 0 // not much throwing
-set g_balance_hook_secondary_gravity 5 // fast falling
-set g_balance_hook_secondary_refire 3 // don't drop too many bombs...
-set g_balance_hook_secondary_animtime 0.3 // good shoot anim
-set g_balance_hook_secondary_power 3 // effect behaves like a square function
-set g_balance_hook_secondary_duration 1.5 // effect runs for three seconds
-// }}}
-// {{{ hlac
-set g_balance_hlac_primary_spread_min 0.01
-set g_balance_hlac_primary_spread_max 0.6
-set g_balance_hlac_primary_spread_add 0.01
-set g_balance_hlac_primary_spread_crouchmod 0.5
-
-set g_balance_hlac_primary_damage 22
-set g_balance_hlac_primary_edgedamage 2
-set g_balance_hlac_primary_force -100
-set g_balance_hlac_primary_radius 100
-set g_balance_hlac_primary_speed 5000
-set g_balance_hlac_primary_lifetime 3
-
-set g_balance_hlac_primary_refire 0.1
-set g_balance_hlac_primary_animtime 0.4
-set g_balance_hlac_primary_ammo 1
-
-set g_balance_hlac_secondary 1
-set g_balance_hlac_secondary_spread 0.2
-set g_balance_hlac_secondary_spread_crouchmod 0.5
-
-set g_balance_hlac_secondary_damage 20
-set g_balance_hlac_secondary_edgedamage 3
-set g_balance_hlac_secondary_force 100
-set g_balance_hlac_secondary_radius 50
-set g_balance_hlac_secondary_speed 9000
-set g_balance_hlac_secondary_lifetime 3
-
-set g_balance_hlac_secondary_refire 1
-set g_balance_hlac_secondary_animtime 0.7
-set g_balance_hlac_secondary_ammo 10
-set g_balance_hlac_secondary_shots 6
-// }}}
-// {{{ campingrifle
-set g_balance_campingrifle_magazinecapacity 8 // make it pretty much useless in close combat
-set g_balance_campingrifle_reloadtime 2 // matches reload anim
-set g_balance_campingrifle_auto_reload_after_changing_weapons 0
-set g_balance_campingrifle_bursttime 0
-set g_balance_campingrifle_primary_tracer 1
-set g_balance_campingrifle_primary_damage 40
-set g_balance_campingrifle_primary_headshotaddeddamage 100
-set g_balance_campingrifle_primary_spread 0
-set g_balance_campingrifle_primary_force 2
-set g_balance_campingrifle_primary_speed 40000
-set g_balance_campingrifle_primary_lifetime 5
-set g_balance_campingrifle_primary_refire 0.65
-set g_balance_campingrifle_primary_animtime 0.6
-set g_balance_campingrifle_primary_ammo 10
-set g_balance_campingrifle_primary_bulletconstant 110 // 62.2qu
-set g_balance_campingrifle_primary_burstcost 0
-set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
-set g_balance_campingrifle_secondary 1
-set g_balance_campingrifle_secondary_tracer 0
-set g_balance_campingrifle_secondary_damage 50
-set g_balance_campingrifle_secondary_headshotaddeddamage 50 // 50 damage only on head
-set g_balance_campingrifle_secondary_spread 0
-set g_balance_campingrifle_secondary_force 2
-set g_balance_campingrifle_secondary_speed 20000
-set g_balance_campingrifle_secondary_lifetime 5
-set g_balance_campingrifle_secondary_refire 1.5
-set g_balance_campingrifle_secondary_animtime 0.6
-set g_balance_campingrifle_secondary_ammo 10
-set g_balance_campingrifle_secondary_bulletconstant 110 // 15.5qu
-set g_balance_campingrifle_secondary_burstcost 0
-set g_balance_campingrifle_secondary_bullethail 0 // empty magazine on shot
-// }}}
-// {{{ tuba
-set g_balance_tuba_refire 0.05
-set g_balance_tuba_animtime 0.05
-set g_balance_tuba_attenuation 0.5
-set g_balance_tuba_volume 1
-set g_balance_tuba_fadetime 0.25
-set g_balance_tuba_damage 5
-set g_balance_tuba_edgedamage 0
-set g_balance_tuba_radius 200
-set g_balance_tuba_force 40
-// }}}
-// {{{ fireball
-set g_balance_fireball_primary_ammo 40
-set g_balance_fireball_primary_animtime 0.15
-set g_balance_fireball_primary_bfgdamage 150
-set g_balance_fireball_primary_bfgforce 0
-set g_balance_fireball_primary_bfgradius 1000
-set g_balance_fireball_primary_damage 200
-set g_balance_fireball_primary_damageforcescale 4
-set g_balance_fireball_primary_edgedamage 0
-set g_balance_fireball_primary_force 700
-set g_balance_fireball_primary_health 50
-set g_balance_fireball_primary_laserburntime 0.5
-set g_balance_fireball_primary_laserdamage 80
-set g_balance_fireball_primary_laseredgedamage 20
-set g_balance_fireball_primary_laserradius 256
-set g_balance_fireball_primary_lifetime 15
-set g_balance_fireball_primary_radius 200
-set g_balance_fireball_primary_refire 5
-set g_balance_fireball_primary_refire2 0
-set g_balance_fireball_primary_speed 650
-set g_balance_fireball_primary_spread 0
-set g_balance_fireball_secondary_ammo 5
-set g_balance_fireball_secondary_animtime 0.3
-set g_balance_fireball_secondary_damage 40
-set g_balance_fireball_secondary_damageforcescale 4
-set g_balance_fireball_secondary_damagetime 5
-set g_balance_fireball_secondary_force 100
-set g_balance_fireball_secondary_laserburntime 0.5
-set g_balance_fireball_secondary_laserdamage 50
-set g_balance_fireball_secondary_laseredgedamage 20
-set g_balance_fireball_secondary_laserradius 110
-set g_balance_fireball_secondary_lifetime 7
-set g_balance_fireball_secondary_refire 2
-set g_balance_fireball_secondary_speed 900
-set g_balance_fireball_secondary_speed_up 100
-set g_balance_fireball_secondary_speed_z 0
-set g_balance_fireball_secondary_spread 0
-// }}}
-// {{{ seeker
-set g_balance_seeker_flac_ammo 0.5
-set g_balance_seeker_flac_animtime 0.1
-set g_balance_seeker_flac_damage 15
-set g_balance_seeker_flac_edgedamage 10
-set g_balance_seeker_flac_force 50
-set g_balance_seeker_flac_lifetime 0.05
-set g_balance_seeker_flac_lifetime_rand 0.02
-set g_balance_seeker_flac_radius 100
-set g_balance_seeker_flac_refire 0.1
-set g_balance_seeker_flac_speed 5000
-set g_balance_seeker_flac_speed_up 500
-set g_balance_seeker_flac_speed_z 0
-set g_balance_seeker_flac_spread 0.25
-set g_balance_seeker_missile_accel 1.05
-set g_balance_seeker_missile_ammo 2
-set g_balance_seeker_missile_animtime 0.3
-set g_balance_seeker_missile_count 4
-set g_balance_seeker_missile_damage 50
-set g_balance_seeker_missile_damageforcescale 2
-set g_balance_seeker_missile_decel 0.9
-set g_balance_seeker_missile_delay 0.25
-set g_balance_seeker_missile_edgedamage 10
-set g_balance_seeker_missile_force 250
-set g_balance_seeker_missile_health 5
-set g_balance_seeker_missile_lifetime 15
-set g_balance_seeker_missile_proxy 0
-set g_balance_seeker_missile_proxy_delay 0.2
-set g_balance_seeker_missile_proxy_maxrange 45
-set g_balance_seeker_missile_radius 80
-set g_balance_seeker_missile_refire 0.5
-set g_balance_seeker_missile_smart 1
-set g_balance_seeker_missile_smart_mindist 800
-set g_balance_seeker_missile_smart_trace_max 2500
-set g_balance_seeker_missile_smart_trace_min 1000
-set g_balance_seeker_missile_speed 700
-set g_balance_seeker_missile_speed_accel 0
-set g_balance_seeker_missile_speed_up 300
-set g_balance_seeker_missile_speed_z 0
-set g_balance_seeker_missile_speed_max 1250
-set g_balance_seeker_missile_spread 0
-set g_balance_seeker_missile_turnrate 0.65
-set g_balance_seeker_tag_ammo 1
-set g_balance_seeker_tag_animtime 0.3
-set g_balance_seeker_tag_damageforcescale 4
-set g_balance_seeker_tag_health 5
-set g_balance_seeker_tag_lifetime 15
-set g_balance_seeker_tag_refire 1
-set g_balance_seeker_tag_speed 9000
-set g_balance_seeker_tag_spread 0
-// End new seeker
index 0a4238ea6633e13d468c3a4d4050c7d16599c087..a6a2e66d94429bd09acfed9a3e14b1aa7c45c54a 100644 (file)
@@ -32,7 +32,7 @@ set g_warmup_start_ammo_rockets 50 "starting values when being in warmup-stage"
 set g_warmup_start_ammo_cells 50 "starting values when being in warmup-stage"
 set g_warmup_start_ammo_fuel 0 "starting values when being in warmup-stage"
 set g_lms_start_health 200
-set g_lms_start_armor 150
+set g_lms_start_armor 100
 set g_lms_start_ammo_shells 30
 set g_lms_start_ammo_nails 200
 set g_lms_start_ammo_rockets 150
@@ -243,10 +243,10 @@ set g_balance_laser_secondary_force_zscale 1.25
 set g_balance_laser_secondary_force_velocitybias 0
 // }}}
 // {{{ shotgun
-set g_balance_shotgun_primary_bullets 20
-set g_balance_shotgun_primary_damage 3
+set g_balance_shotgun_primary_bullets 18
+set g_balance_shotgun_primary_damage 4
 set g_balance_shotgun_primary_force 20
-set g_balance_shotgun_primary_spread 0.16
+set g_balance_shotgun_primary_spread 0.18
 set g_balance_shotgun_primary_refire 1
 set g_balance_shotgun_primary_animtime 0.4
 set g_balance_shotgun_primary_ammo 1
@@ -312,8 +312,8 @@ set g_balance_grenadelauncher_secondary_damage 70
 set g_balance_grenadelauncher_secondary_edgedamage 32
 set g_balance_grenadelauncher_secondary_force 300
 set g_balance_grenadelauncher_secondary_radius 150
-set g_balance_grenadelauncher_secondary_speed 1500
-set g_balance_grenadelauncher_secondary_speed_up 225
+set g_balance_grenadelauncher_secondary_speed 1000
+set g_balance_grenadelauncher_secondary_speed_up 250
 set g_balance_grenadelauncher_secondary_speed_z 0
 set g_balance_grenadelauncher_secondary_spread 0
 set g_balance_grenadelauncher_secondary_lifetime 3
@@ -363,11 +363,11 @@ 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_ammo 5
 set g_balance_electro_primary_range 800
-set g_balance_electro_primary_falloff_mindist 255 // 0.3 * radius
-set g_balance_electro_primary_falloff_maxdist 850
-set g_balance_electro_primary_falloff_halflifedist 425
+set g_balance_electro_primary_falloff_mindist 0
+set g_balance_electro_primary_falloff_maxdist 0
+set g_balance_electro_primary_falloff_halflifedist 0
 set g_balance_electro_secondary_damage 25
 set g_balance_electro_secondary_edgedamage 0
 set g_balance_electro_secondary_force 100
@@ -386,7 +386,7 @@ set g_balance_electro_secondary_damageforcescale 4
 set g_balance_electro_secondary_count 3
 set g_balance_electro_secondary_bouncefactor 0.5
 set g_balance_electro_secondary_bouncestop 0.075
-set g_balance_electro_combo_damage 40
+set g_balance_electro_combo_damage 50
 set g_balance_electro_combo_edgedamage 0
 set g_balance_electro_combo_force 80
 set g_balance_electro_combo_radius 250
@@ -407,7 +407,7 @@ 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_joinspread 0.2
-set g_balance_crylink_primary_jointime 0
+set g_balance_crylink_primary_jointime 0.1
 set g_balance_crylink_primary_joinexplode 0
 set g_balance_crylink_primary_joinexplode_damage 0
 set g_balance_crylink_primary_joinexplode_edgedamage 0
@@ -519,9 +519,9 @@ set g_balance_rocketlauncher_damage 90
 set g_balance_rocketlauncher_edgedamage 33
 set g_balance_rocketlauncher_force 350
 set g_balance_rocketlauncher_radius 125
-set g_balance_rocketlauncher_speed 1080
-set g_balance_rocketlauncher_speedaccel 0
-set g_balance_rocketlauncher_speedstart 1080
+set g_balance_rocketlauncher_speed 1600
+set g_balance_rocketlauncher_speedaccel 1600
+set g_balance_rocketlauncher_speedstart 800
 set g_balance_rocketlauncher_lifetime 5
 set g_balance_rocketlauncher_refire 1
 set g_balance_rocketlauncher_animtime 0.4
index 1947d3f0611f9704394cfe59bb0f6016e84a9f9c..6c7428d1f6619fd5414b31dd0eb9f649b690029b 100644 (file)
@@ -240,7 +240,7 @@ alpha 256 256 0
 originjitter 6 6 6
 // dust/smoke drifting away from the impact
 effect TE_GUNSHOT
-count 2
+count 0.8
 type smoke
 tex 0 8
 color 0x101010 0x101010
@@ -251,7 +251,7 @@ originjitter 0 0 0
 velocityjitter 8 8 8
 // dust/smoke staying at the impact
 effect TE_GUNSHOT
-count 0.5
+count 0.2
 type smoke
 tex 0 8
 color 0x505050 0x505050
@@ -262,7 +262,7 @@ originjitter 0 0 0
 velocityjitter 0 0 0
 // bouncing sparks
 effect TE_GUNSHOT
-count 5
+count 2.5
 type spark
 color 0x8f4333 0xfff31b
 size 0.4 0.4
@@ -1022,7 +1022,7 @@ effect shotgun_impact
 type alphastatic
 notunderwater
 tex 0 8
-count 3
+count 1
 size 10 20
 sizeincrease 25
 alpha 300 550 756
@@ -1036,7 +1036,7 @@ effect shotgun_impact
 type alphastatic
 notunderwater
 tex 36 36
-count 0.5
+count 0.2
 size 10 11
 sizeincrease 74
 alpha 200 350 500
@@ -1049,7 +1049,7 @@ rotate 0 360 -50 50
 // sparks
 effect shotgun_impact
 notunderwater
-count 1.5
+count 0.5
 type spark
 tex 40 40
 color 0xFDFFD9 0xFDFFD9
@@ -1110,7 +1110,7 @@ effect machinegun_impact
 type alphastatic
 notunderwater
 tex 0 8
-count 3
+count 1.5
 size 10 20
 sizeincrease 15
 alpha 300 550 456
@@ -1134,7 +1134,7 @@ color 0x201d1a 0x000000
 bounce 6
 velocitymultiplier 0.03
 rotate 0 360 -50 50
-//derbis
+//debris
 effect machinegun_impact
 type alphastatic
 notunderwater
@@ -1985,7 +1985,7 @@ lightcolor 8 4 1
 // fire effect which make bright dot inside
 effect hagar_explode
 notunderwater
-count 5
+count 3.5
 type smoke
 tex 48 55
 color 0xffe955 0xff5a00
@@ -2018,7 +2018,7 @@ effect hagar_explode
 type alphastatic
 notunderwater
 tex 0 8
-count 10
+count 7
 size 20 40
 sizeincrease 20
 alpha 200 500 600
index 8a52aff2b07de40e38c286ff2975c7ff4cabf331..18973158ebd47fb1de2ad0f06cee71f039bd1b52 100644 (file)
@@ -1,6 +1,6 @@
 // "NoQWBunny" physics based on XPM
 sv_gravity 800
-sv_maxspeed 400
+sv_maxspeed 360
 sv_maxairspeed 400
 
 sv_stopspeed 100
index 59387904361ee5233609f48705168ce9a94bede5..9e5b6be54a57650d30ceebf8213e14719d9e15c0 100644 (file)
@@ -848,11 +848,6 @@ void Ent_ClientData()
        if(newspectatee_status != spectatee_status)
        {
                float i;
-               // clear the weapon accuracy stats
-               for(i = WEP_FIRST; i <= WEP_LAST; ++i) {
-                       weapon_hits[i] = 0;
-                       weapon_fired[i] = 0;
-               }
 
                // clear race stuff
                race_laptime = 0;
@@ -904,6 +899,32 @@ void Ent_RandomSeed()
        psrandom(s);
 }
 
+void Ent_ReadAccuracy(void)
+{
+       float sf, f, w, b;
+       sf = ReadInt24_t();
+       if(sf == 0)
+       {
+               for(w = 0; w <= WEP_LAST - WEP_FIRST; ++w)
+                       weapon_accuracy[w] = -1;
+               return;
+       }
+       
+       for(w = 0, f = 1; w <= WEP_LAST - WEP_FIRST; ++w, f *= 2)
+       {
+               if(sf & f)
+               {
+                       b = ReadByte();
+                       if(b == 0)
+                               weapon_accuracy[w] = -1;
+                       else if(b == 255)
+                               weapon_accuracy[w] = 1.0; // no better error handling yet, sorry
+                       else
+                               weapon_accuracy[w] = (b - 1.0) / 100.0;
+               }
+       }
+}
+
 // CSQC_Ent_Update : Called every frame that the server has indicated an update to the SSQC / CSQC entity has occured.
 // The only parameter reflects if the entity is "new" to the client, meaning it just came into the client's PVS.
 void Ent_RadarLink();
@@ -967,6 +988,7 @@ void(float bIsNewEntity) CSQC_Ent_Update =
                case ENT_CLIENT_HOOK: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_HOOK); break;
                case ENT_CLIENT_LGBEAM: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_LGBEAM); break;
                case ENT_CLIENT_GAUNTLET: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_GAUNTLET); break;
+               case ENT_CLIENT_ACCURACY: Ent_ReadAccuracy(); break;
                default:
                        error(strcat("unknown entity type in CSQC_Ent_Update: ", ftos(self.enttype), "\n"));
                        break;
index 82a45b7138f707cac89ca81e89054827505b6bbf..65f36cf7a0af360cd84cb5bd170e47c2fee397ce 100644 (file)
@@ -1385,7 +1385,7 @@ void CSQC_common_hud(void)
                                                acc_levels = MAX_ACCURACY_LEVELS;
 
                                        for (i = 0; i < acc_levels; ++i)
-                                               acc_lev[i] = stof(argv(i));
+                                               acc_lev[i] = stof(argv(i)) / 100.0;
                                }
                                // let know that acc_col[] needs to be loaded
                                acc_col_x[0] = -1;
index 691c77d0ac7998dd225e1ed8a9ffc32db63c7f4f..6ab50f5f531607b6a6d6755c992fef8495300542 100644 (file)
@@ -1691,18 +1691,10 @@ void HUD_Weapons(void)
        }
 
        float show_accuracy;
-       float weapon_stats, weapon_number;
+       float weapon_stats;
        if(cvar("hud_panel_weapons_accuracy") && acc_levels)
        {
                show_accuracy = true;
-               // hits
-               weapon_stats = getstati(STAT_DAMAGE_HITS);
-               weapon_number = weapon_stats & 63;
-               weapon_hits[weapon_number-WEP_FIRST] = floor(weapon_stats / 64);
-               // fired
-               weapon_stats = getstati(STAT_DAMAGE_FIRED);
-               weapon_number = weapon_stats & 63;
-               weapon_fired[weapon_number-WEP_FIRST] = floor(weapon_stats / 64);
                if (acc_col_x[0] == -1)
                        for (i = 0; i < acc_levels; ++i)
                                acc_col[i] = stov(cvar_string(strcat("accuracy_color", ftos(i))));
@@ -1725,13 +1717,9 @@ void HUD_Weapons(void)
                // draw the weapon accuracy
                if(show_accuracy)
                {
-                       float weapon_hit, weapon_damage;
-                       weapon_damage = weapon_fired[self.weapon-WEP_FIRST];
-                       if(weapon_damage)
+                       weapon_stats = weapon_accuracy[self.weapon-WEP_FIRST];
+                       if(weapon_stats >= 0)
                        {
-                               weapon_hit = weapon_hits[self.weapon-WEP_FIRST];
-                               weapon_stats = floor(100 * weapon_hit / weapon_damage);
-
                                // find the max level lower than weapon_stats
                                float j;
                                j = acc_levels-1;
index aaa26067c79b5b29d7108c228ee937ec72c459c9..95fefe9f7c847b7c93f781c3cb4057354e126500 100644 (file)
@@ -15,8 +15,7 @@ float highlightedAction; // 0 = nothing, 1 = move, 2 = resize
 
 const float BORDER_MULTIPLIER = 0.25;
 float scoreboard_bottom;
-float weapon_hits[WEP_MAXCOUNT];
-float weapon_fired[WEP_MAXCOUNT];
+float weapon_accuracy[WEP_MAXCOUNT];
 
 #define MAX_ACCURACY_LEVELS 10
 float acc_lev[MAX_ACCURACY_LEVELS];
index d76838fd21979ecec4763814f20759ff6fb2225f..1a99f87ddd2a0e87e042a9c2a3dcd5329d57c63a 100644 (file)
@@ -941,15 +941,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
        if(getstati(STAT_SWITCHWEAPON) == WEP_MINSTANEX)
                g_minstagib = 1; // TODO: real detection for minstagib?
 
-       float weapon_hit, weapon_damage, weapon_stats, weapon_number;
-       // hits
-       weapon_stats = getstati(STAT_DAMAGE_HITS);
-       weapon_number = weapon_stats & 63;
-       weapon_hits[weapon_number-WEP_FIRST] = floor(weapon_stats / 64);
-       // fired
-       weapon_stats = getstati(STAT_DAMAGE_FIRED);
-       weapon_number = weapon_stats & 63;
-       weapon_fired[weapon_number-WEP_FIRST] = floor(weapon_stats / 64);
+       float weapon_stats, weapon_number;
 
        if (!acc_levels)
                rgb = '1 1 1';
@@ -964,38 +956,27 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
                        continue;
                if ((i == WEP_NEX && g_minstagib) || i == WEP_PORTO || (i == WEP_MINSTANEX && !g_minstagib) || i == WEP_TUBA) // skip port-o-launch, nex || minstanex and tuba
                        continue;
-               weapon_hit = weapon_hits[i-WEP_FIRST];
-               weapon_damage = weapon_fired[i-WEP_FIRST];
+               weapon_stats = weapon_accuracy[i-WEP_FIRST];
 
                float weapon_alpha;
-               if(weapon_damage)
-               {
-                       weapon_stats = bound(0, floor(100 * weapon_hit / weapon_damage), 100);
+               if(weapon_stats >= 0)
                        weapon_alpha = scoreboard_alpha_fg;
-               }
                else
                        weapon_alpha = 0.2 * scoreboard_alpha_fg;
 
                // weapon icon
                drawpic_aspect_skin(pos, strcat("weapon", self.netname), '1 0 0' * weapon_width + '0 1 0' * weapon_height, '1 1 1', weapon_alpha, DRAWFLAG_NORMAL);
                // the accuracy
-               if(weapon_damage) {
+               if(weapon_stats >= 0) {
                        weapons_with_stats += 1;
                        average_accuracy += weapon_stats; // store sum of all accuracies in average_accuracy
 
                        string s;
-                       s = strcat(ftos(weapon_stats),"%");
+                       s = sprintf("%d%%", weapon_stats*100);
 
                        float padding;
                        padding = (weapon_width - stringwidth(s, FALSE, '1 0 0' * fontsize)) / 2; // center the accuracy value
 
-                       weapon_damage = weapon_fired[self.weapon-WEP_FIRST];
-                       if(weapon_damage)
-                       {
-                               weapon_hit = weapon_hits[self.weapon-WEP_FIRST];
-                               weapon_stats = floor(100 * weapon_hit / weapon_damage);
-                       }
-
                        if (acc_levels)
                        {
                                // find the max level lower than weapon_stats
@@ -1298,183 +1279,3 @@ void HUD_DrawScoreboard()
 
        scoreboard_bottom = pos_y + 2 * hud_fontsize_y;
 }
-
-void HUD_DrawAccuracyStats_Description_Hitscan(vector position)
-{
-       drawstring(position + '0 3 0' * hud_fontsize_y, "Shots fired:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-       drawstring(position + '0 5 0' * hud_fontsize_y, "Shots hit:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-       drawstring(position + '0 7 0' * hud_fontsize_y, "Accuracy:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-       drawstring(position + '0 9 0' * hud_fontsize_y, "Shots missed:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-}
-
-void HUD_DrawAccuracyStats_Description_Splash(vector position)
-{
-       drawstring(position + '0 3 0' * hud_fontsize_y, "Maximum damage:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-       drawstring(position + '0 5 0' * hud_fontsize_y, "Actual damage:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-       drawstring(position + '0 7 0' * hud_fontsize_y, "Accuracy:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-       drawstring(position + '0 9 0' * hud_fontsize_y, "Damage wasted:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-}
-
-void HUD_DrawAccuracyStats()
-{
-       float i, count_hitscan, count_splash, row;  // count is the number of 'colums'
-       float weapon_hit, weapon_damage, weapon_stats;
-       float left_border;  // position where the weapons start, the description is in the border
-       vector fill_colour, fill_size;
-       vector pos;
-       vector border_colour;
-
-       float col_margin = 20;  // pixels between the columns
-       float row_margin = 20;  // pixels between the rows
-
-       fill_size_x = 5 * hud_fontsize_x;  // width of the background
-       fill_size_y = 10 * hud_fontsize_y;  // height of the background
-
-       drawfont = hud_bigfont;
-       pos_x = 0;
-       pos_y = SCOREBOARD_OFFSET;
-       pos_z = 0;
-       drawstringcenter(pos, "Weapon Accuracy", 2 * hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
-       left_border = col_margin + 11 * hud_fontsize_x;
-
-       drawfont = hud_font;
-
-       if(warmup_stage)
-       {
-               pos_y += 40;
-               if(mod(time, 1) >= 0.4)
-                       drawstringcenter(pos, "Stats are not tracked during warmup stage", hud_fontsize, '1 1 0', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
-               return;
-       }
-
-       if(gametype == GAME_RACE || gametype == GAME_CTS)
-       {
-               pos_y += 40;
-               if(mod(time, 1) >= 0.4)
-                       drawstringcenter(pos, "Stats are not tracked in Race/CTS", hud_fontsize, '1 1 0', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
-               return;
-       }
-
-       float top_border_hitscan = SCOREBOARD_OFFSET + 55;  // position where the hitscan row starts: pixels down the screen
-       HUD_DrawAccuracyStats_Description_Hitscan('1 0 0' * col_margin + '0 1 0' * top_border_hitscan);
-
-       float top_border_splash = SCOREBOARD_OFFSET + 175;  // position where the splash row starts: pixels down the screen
-       HUD_DrawAccuracyStats_Description_Splash('1 0 0' * col_margin + '0 1 0' * top_border_splash);
-
-       for(i = WEP_FIRST; i <= WEP_LAST; ++i)
-       {
-               self = get_weaponinfo(i);
-               if not(self.weapons)
-                       continue;
-               weapon_hit = weapon_hits[i-WEP_FIRST];
-               weapon_damage = weapon_fired[i-WEP_FIRST];
-               border_colour = (i == activeweapon) ? '1 1 1' : '0 0 0';  // white or black border
-
-               if (weapon_damage) {
-                       if (self.spawnflags & WEP_TYPE_SPLASH) {
-                               weapon_stats = bound(0, floor(100 * weapon_hit / weapon_damage), 100);
-
-                               fill_colour_x = 1 - 0.015 * weapon_stats;
-                               fill_colour_y = 1 - 0.015 * (100 - weapon_stats);
-
-                               // how the background colour is calculated
-                               // %    red             green   red_2                   green_2
-                               // 0    1               0               1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 10   0.85    0               1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 20   0.70    0               1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 30   0.55    0               1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 40   0.40    0.10    1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 50   0.25    0.25    1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 60   0.10    0.40    1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 70   0               0.55    1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 80   0               0.70    1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 90   0               0.85    1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 100  0               1               1 - % * 0.015   1 - (100 - %) * 0.015
-
-                               if ((left_border + count_splash * (fill_size_x + col_margin) + fill_size_x) >= vid_conwidth)
-                               {
-                                       count_splash = 0;
-                                       ++row;
-                                       HUD_DrawAccuracyStats_Description_Splash('1 0 0' * col_margin + '0 1 0' * (top_border_splash + row * (fill_size_y + row_margin)));
-                               }
-
-                               pos_x = left_border + count_splash * (fill_size_x + col_margin);
-                               pos_y = top_border_splash + row * (fill_size_y + row_margin);
-
-                               // background
-                               drawpic(pos, "gfx/scoreboard/accuracy_bg", fill_size , fill_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
-                               drawborderlines(autocvar_scoreboard_border_thickness, pos, fill_size, border_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
-
-                               // the weapon
-                               drawpic(pos, strcat("gfx/weapons/weapon", self.netname), '1 0.5 0' * fill_size_x , '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
-                               // the amount of shots fired or max damage
-                               drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 3 0' * hud_fontsize_y, ftos(weapon_damage), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
-                               // the amount of hits or actual damage
-                               drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 5 0' * hud_fontsize_y, ftos(weapon_hit), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
-                               // the accuracy
-                               drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 7 0' * hud_fontsize_y, strcat(ftos(weapon_stats),"%"), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
-                               // the amount of shots missed or damage wasted
-                               drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 9 0' * hud_fontsize_y, ftos(max(0, weapon_damage - weapon_hit)), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
-                               ++count_splash;
-                       } else if (self.spawnflags & WEP_TYPE_HITSCAN) {
-                               weapon_stats = bound(0, floor(100 * weapon_hit / weapon_damage), 100);
-
-                               fill_colour_x = 1 - 0.015 * weapon_stats;
-                               fill_colour_y = 1 - 0.015 * (100 - weapon_stats);
-
-                               // how the background colour is calculated
-                               // %    red             green   red_2                   green_2
-                               // 0    1               0               1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 10   0.850   0               1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 20   0.70    0               1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 30   0.55    0               1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 40   0.40    0.10    1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 50   0.25    0.25    1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 60   0.10    0.40    1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 70   0               0.55    1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 80   0               0.70    1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 90   0               0.85    1 - % * 0.015   1 - (100 - %) * 0.015
-                               // 100  0               1               1 - % * 0.015   1 - (100 - %) * 0.015
-
-                               if ((left_border + count_hitscan * (fill_size_x + col_margin) + fill_size_x + cvar("stats_right_margin")) >= vid_conwidth)
-                               {
-                                       count_hitscan = 0;
-                                       ++row;
-                                       HUD_DrawAccuracyStats_Description_Hitscan('1 0 0' * col_margin + '0 1 0' * (top_border_hitscan + row * (fill_size_y + row_margin)));
-                               }
-
-                               pos_x = left_border + count_hitscan * (fill_size_x + col_margin);
-                               pos_y = top_border_hitscan + row * (fill_size_y + row_margin);
-
-                               // background
-                               drawpic(pos, "gfx/scoreboard/accuracy_bg", fill_size , fill_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
-                               drawborderlines(autocvar_scoreboard_border_thickness, pos, fill_size, border_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
-
-                               // the weapon
-                               drawpic(pos, strcat("gfx/weapons/weapon", self.netname), '1 0.5 0' * fill_size_x , '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
-                               // the amount of shots fired or max damage
-                               drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 3 0' * hud_fontsize_y, ftos(weapon_damage), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
-                               // the amount of hits or actual damage
-                               drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 5 0' * hud_fontsize_y, ftos(weapon_hit), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
-                               // the accuracy
-                               drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 7 0' * hud_fontsize_y, strcat(ftos(weapon_stats),"%"), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
-                               // the amount of shots missed or damage wasted
-                               drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 9 0' * hud_fontsize_y, ftos(max(0, weapon_damage - weapon_hit)), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-
-                               ++count_hitscan;
-                       }
-               }
-       }
-}
index 87484cd8f31c7902cf52e2ed1f69e458b9b7193d..8cc24634c307d7d929f376e068f21412f958d589 100644 (file)
@@ -111,6 +111,7 @@ const float ENT_CLIENT_TRIGGER_MUSIC = 26;
 const float ENT_CLIENT_HOOK = 27;
 const float ENT_CLIENT_LGBEAM = 28;
 const float ENT_CLIENT_GAUNTLET = 29;
+const float ENT_CLIENT_ACCURACY = 30;
 
 const float ENT_CLIENT_TURRET = 40;
 
@@ -300,8 +301,6 @@ const float STAT_SWITCHWEAPON = 36;
 const float STAT_GAMESTARTTIME = 37;
 const float STAT_STRENGTH_FINISHED = 38;
 const float STAT_INVINCIBLE_FINISHED = 39;
-const float STAT_DAMAGE_HITS = 40; // Used by the weapon stats code, represents the total amount of damage done to other players
-const float STAT_DAMAGE_FIRED = 41;// Used by the weapon stats code, represents the total amount of potential damage fired
 const float STAT_PRESSED_KEYS = 42;
 const float STAT_ALLOW_OLDNEXBEAM = 43; // this stat could later contain some other bits of info, like, more server-side particle config
 const float STAT_FUEL = 44;
index 4b2b9cf0c921345dd48d4032b745a9971b2600b3..104c8840e58cda121daecb6afd36c6b68f2083cf 100644 (file)
@@ -31,6 +31,30 @@ void _dumptree_close(entity pass, entity me)
        }
 }
 
+float curl_uri_get_pos;
+float curl_uri_get_exec[URI_GET_CURL_END - URI_GET_CURL + 1];
+string curl_uri_get_cvar[URI_GET_CURL_END - URI_GET_CURL + 1];
+void Curl_URI_Get_Callback(float id, float status, string data)
+{
+       float i;
+       float do_exec;
+       string do_cvar;
+       i = id - URI_GET_CURL;
+       do_exec = curl_uri_get_exec[i];
+       do_cvar = curl_uri_get_cvar[i];
+       if(status != 0)
+       {
+               print("error: status is ", ftos(status), "\n");
+               return;
+       }
+       if(do_exec)
+               localcmd(data);
+       if(do_cvar)
+               cvar_set(do_cvar, data);
+       if(!do_exec && !do_cvar)
+               print(data);
+}
+
 void GameCommand(string theCommand)
 {
        float argc;
@@ -100,6 +124,72 @@ void GameCommand(string theCommand)
                return;
        }
 
+       if(argv(0) == "curl")
+       {
+               float do_exec;
+               string do_cvar;
+               float key;
+               float i, j;
+               string url;
+               float buf;
+               float r;
+
+               do_exec = FALSE;
+               do_cvar = string_null;
+               key = -1;
+
+               for(i = 1; i+1 < argc; ++i)
+               {
+                       if(argv(i) == "--cvar" && i+2 < argc)
+                       {
+                               ++i;
+                               do_cvar = argv(i);
+                               continue;
+                       }
+                       if(argv(i) == "--exec")
+                       {
+                               do_exec = TRUE;
+                               continue;
+                       }
+                       if(argv(i) == "--key" && i+2 < argc)
+                       {
+                               ++i;
+                               key = stof(argv(i));
+                               continue;
+                       }
+                       break;
+               }
+
+               // now, argv(i) is the URL
+               // following args may be POST parameters
+               url = argv(i);
+               ++i;
+               buf = buf_create();
+               j = 0;
+               for(; i+1 < argc; i += 2)
+                       bufstr_set(buf, ++j, sprintf("%s=%s", uri_escape(argv(i)), uri_escape(argv(i+1))));
+               if(i < argc)
+                       bufstr_set(buf, ++j, sprintf("submit=%s", uri_escape(argv(i))));
+
+               if(j == 0) // no args: GET
+                       r = crypto_uri_postbuf(url, URI_GET_CURL + curl_uri_get_pos, string_null, string_null, -1, key);
+               else // with args: POST
+                       r = crypto_uri_postbuf(url, URI_GET_CURL + curl_uri_get_pos, "application/x-www-form-urlencoded", "&", buf, key);
+
+               if(r)
+               {
+                       curl_uri_get_exec[curl_uri_get_pos] = do_exec;
+                       curl_uri_get_cvar[curl_uri_get_pos] = do_cvar;
+                       curl_uri_get_pos = mod(curl_uri_get_pos + 1, URI_GET_CURL_END - URI_GET_CURL + 1);
+               }
+               else
+                       print("error creating curl handle\n");
+
+               buf_del(buf);
+
+               return;
+       }
+
 #if 0
        if(argv(0) == "tokentest")
        {
index ae1b02dfc330f48710fbb6e2abe1c2ec5a6b3c1d..761b63a83b30dc1a97990cdc7a172e6c53e3de40 100644 (file)
@@ -329,6 +329,14 @@ string(string in) uri_unescape = #511;
 //  the HTTP response code on server error (e.g. 404)
 //if 1 is returned by uri_get, the callback will be called in the future
 float(string url, float id) uri_get = #513;
+//DP_QC_URI_POST
+//idea: divVerent
+//darkplaces implementation: divVerent
+//loads text from an URL into a string after POSTing via HTTP
+//works like uri_get, but uri_post sends data with Content-Type: content_type to the server
+//and uri_post sends the string buffer buf, joined using the delimiter delim
+float(string url, float id, string content_type, string data) uri_post = #513;
+float(string url, float id, string content_type, string delim, float buf) uri_postbuf = #513;
 
 string(string, float) netaddress_resolve = #625;
 string(string search, string replace, string subject) strreplace = #484;
@@ -373,4 +381,5 @@ string(string format, ...) sprintf = #627;
 string crypto_getkeyfp(string serveraddress) = #633; // retrieves the cached host key's CA fingerprint of a server given by IP address
 string crypto_getidfp(string serveraddress) = #634; // retrieves the cached host key fingerprint of a server given by IP address
 string crypto_getencryptlevel(string serveraddress) = #635; // 0 if never encrypting, 1 supported, 2 requested, 3 required, appended by list of allowed methods in order of preference ("AES128"), preceded by a space each
+float(string url, float id, string content_type, string delim, float buf, float keyid) crypto_uri_postbuf = #513;
 //description:
index 6f5b037acff686485fba7aeef08c1b75ed2e118c..0bacab7a49baa63160dc158f6286f04ffa35501e 100644 (file)
@@ -234,11 +234,6 @@ void setDependentWeird(entity e, float(entity) func)
 float _Nex_ExtResponseSystem_Queried;
 string _Nex_ExtResponseSystem_UpdateTo;
 
-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)
 {
        if (id == URI_GET_DISCARD)
@@ -247,9 +242,12 @@ void URI_Get_Callback(float id, float status, string data)
        }
        else if(id == URI_GET_UPDATENOTIFICATION)
        {
-               // online ban list
                UpdateNotification_URI_Get_Callback(id, status, data);
        }
+       else if(id >= URI_GET_CURL && id <= URI_GET_CURL_END)
+       {
+               Curl_URI_Get_Callback(id, status, data);
+       }
        else
        {
                print("Received HTTP request data for an invalid id ", ftos(id), ".\n");
@@ -361,7 +359,8 @@ void preMenuDraw()
                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);
+                       //uri_get(sprintf("http://www.xonotic.org/dl/checkupdate.txt?version=%s", uri_escape(cvar_string("g_xonoticversion"))), URI_GET_UPDATENOTIFICATION);
+                       crypto_uri_postbuf(sprintf("http://www.xonotic.org/dl/t/checkupdate2.cgi?version=%s", uri_escape(cvar_string("g_xonoticversion"))), URI_GET_UPDATENOTIFICATION, "application/x-www-urlencoded", "hello=world&foo=bar", -1, 0);
                }
        }
 
index 78eb7c1c43caa7cea3019c50652e7ab4173497db..ace912dc21394bbcde6a5a6e9398eb443eecbd7a 100644 (file)
@@ -20,3 +20,14 @@ string getZonedTooltipForIdentifier(string s);
 string resolvemod(string m);
 
 string HUD_Panel_GetSettingName(float setting);
+
+float URI_GET_DISCARD = 0;
+
+float URI_GET_UPDATENOTIFICATION = 1;
+void UpdateNotification_URI_Get_Callback(float id, float status, string data);
+
+float URI_GET_CURL = 2;
+float URI_GET_CURL_END = 9;
+void Curl_URI_Get_Callback(float id, float status, string data);
+
+void URI_Get_Callback(float id, float status, string data);
diff --git a/qcsrc/server/accuracy.qc b/qcsrc/server/accuracy.qc
new file mode 100644 (file)
index 0000000..4d63fd8
--- /dev/null
@@ -0,0 +1,125 @@
+.entity accuracy;
+.float accuracy_hit[WEP_MAXCOUNT];
+.float accuracy_fired[WEP_MAXCOUNT];
+FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(accuracy_hit);
+FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(accuracy_fired);
+
+float accuracy_byte(float n, float d)
+{
+       //print(sprintf("accuracy: %d / %d\n", n, d));
+       if(n <= 0)
+               return 0;
+       if(n > d)
+               return 255;
+       return 1 + rint(n * 100.0 / d);
+}
+
+float accuracy_send(entity to, float sf)
+{
+       float w, f;
+       entity a;
+       WriteByte(MSG_ENTITY, ENT_CLIENT_ACCURACY);
+
+       a = self.owner;
+       if(a.classname == "spectator")
+               a = a.enemy;
+       a = a.accuracy;
+
+       if(to != a.owner)
+               if not(self.owner.cvar_cl_accuracy_data_share && autocvar_sv_accuracy_data_share)
+                       sf = 0;
+       // note: zero sendflags can never be sent... so we can use that to say that we send no accuracy!
+       WriteInt24_t(MSG_ENTITY, sf);
+       if(sf == 0)
+               return TRUE;
+       // note: we know that client and server agree about SendFlags...
+       for(w = 0, f = 1; w <= WEP_LAST - WEP_FIRST; ++w, f *= 2)
+       {
+               if(sf & f)
+                       WriteByte(MSG_ENTITY, accuracy_byte(self.(accuracy_hit[w]), self.(accuracy_fired[w])));
+       }
+       return TRUE;
+}
+
+// init/free
+void accuracy_init(entity e)
+{
+       e.accuracy = spawn();
+       e.accuracy.owner = e;
+       e.accuracy.classname = "accuracy";
+       e.accuracy.drawonlytoclient = e;
+       Net_LinkEntity(e.accuracy, FALSE, 0, accuracy_send);
+}
+
+void accuracy_free(entity e)
+{
+       remove(e.accuracy);
+}
+
+// force a resend of a player's accuracy stats
+void accuracy_resend(entity e)
+{
+       e.accuracy.SendFlags = 0xFFFFFF;
+}
+
+// update accuracy stats
+void accuracy_set(entity e, float w, float fired, float hit)
+{
+       entity a;
+       float b;
+       a = e.accuracy;
+       if(!a)
+               return;
+       w -= WEP_FIRST;
+       b = accuracy_byte(a.(accuracy_hit[w]), a.(accuracy_fired[w]));
+       a.(accuracy_hit[w]) = hit;
+       a.(accuracy_fired[w]) = fired;
+       if(b == accuracy_byte(hit, fired))
+               return;
+       w = pow(2, w);
+       a.SendFlags |= w;
+       FOR_EACH_CLIENT(a)
+               if(a.classname == "spectator")
+                       if(a.enemy == e)
+                               a.SendFlags |= w;
+}
+
+void accuracy_add(entity e, float w, float fired, float hit)
+{
+       entity a;
+       float b;
+       a = e.accuracy;
+       if(!a || !(hit || fired))
+               return;
+       w -= WEP_FIRST;
+       b = accuracy_byte(a.(accuracy_hit[w]), a.(accuracy_fired[w]));
+       if(hit)
+               a.(accuracy_hit[w]) += hit;
+       if(fired)
+               a.(accuracy_fired[w]) += fired;
+       if(b == accuracy_byte(a.(accuracy_hit[w]), a.(accuracy_fired[w])))
+               return;
+       w = pow(2, w);
+       a.SendFlags |= w;
+       FOR_EACH_CLIENT(a)
+               if(a.classname == "spectator")
+                       if(a.enemy == e)
+                               a.SendFlags |= w;
+}
+
+float accuracy_isgooddamage(entity attacker, entity targ)
+{
+       if(!inWarmupStage)
+       if(targ.flags & FL_CLIENT)
+       if(targ.deadflag == DEAD_NO)
+       if(IsDifferentTeam(attacker, targ))
+               return TRUE;
+       return FALSE;
+}
+
+float accuracy_canbegooddamage(entity attacker)
+{
+       if(!inWarmupStage)
+               return TRUE;
+       return FALSE;
+}
diff --git a/qcsrc/server/accuracy.qh b/qcsrc/server/accuracy.qh
new file mode 100644 (file)
index 0000000..f683876
--- /dev/null
@@ -0,0 +1,17 @@
+.float cvar_cl_accuracy_data_share;
+var float autocvar_sv_accuracy_data_share = 1;
+
+// init/free
+void accuracy_init(entity e);
+void accuracy_free(entity e);
+
+// force a resend of a player's accuracy stats
+void accuracy_resend(entity e);
+
+// update accuracy stats
+void accuracy_set(entity e, float w, float fired, float hit);
+void accuracy_add(entity e, float w, float fired, float hit);
+
+// helper
+float accuracy_isgooddamage(entity attacker, entity targ);
+float accuracy_canbegooddamage(entity attacker);
index 8d837b801453091e65b6443b00ea3a1ed4991721..0104f89b3f2bcfe5742fc0abb5ee6582880d5642 100644 (file)
@@ -303,7 +303,7 @@ float CheatCommand(float argc)
                                // arguments:
                                //   effectname
                                effectnum = particleeffectnum(argv(1));
-                               W_SetupShot(self, FALSE, FALSE, "",0);
+                               W_SetupShot(self, FALSE, FALSE, "", CHAN_WEAPON, 0);
                                traceline(w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, MOVE_NORMAL, self);
                                trailparticles(self, effectnum, w_shotorg, trace_endpos);
                                DID_CHEAT();
@@ -318,7 +318,7 @@ float CheatCommand(float argc)
                                // arguments:
                                //   modelname mode
                                f = stof(argv(2));
-                               W_SetupShot(self, FALSE, FALSE, "", 0);
+                               W_SetupShot(self, FALSE, FALSE, "", CHAN_WEAPON, 0);
                                traceline(w_shotorg, w_shotorg + w_shotdir * 2048, MOVE_NORMAL, self);
                                if((trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT) || trace_fraction == 1)
                                {
index 87d567f29acbcf101e3ebfa9614ce14fdd1f3c65..2985b45b41262b4f9ac4ed51749d34323203a639 100644 (file)
@@ -631,6 +631,8 @@ void PutObserverInServer (void)
 
        PlayerScore_Clear(self); // clear scores when needed
 
+       accuracy_resend(self);
+
        self.spectatortime = time;
 
        self.classname = "observer";
@@ -853,6 +855,8 @@ void PutClientInServer (void)
                entity spot, oldself;
                float j;
 
+               accuracy_resend(self);
+
                if(self.team < 0)
                        JoinBestTeam(self, FALSE, TRUE);
 
@@ -1496,6 +1500,7 @@ void ClientConnect (void)
 
        PlayerScore_Attach(self);
        ClientData_Attach();
+       accuracy_init(self);
 
        bot_clientconnect();
 
@@ -1774,6 +1779,7 @@ void ClientDisconnect (void)
                Spawnqueue_Remove(self);
        }
 
+       accuracy_free(self);
        ClientData_Detach();
        PlayerScore_Detach(self);
 
@@ -2271,33 +2277,13 @@ void GetPressedKeys(void) {
                self.pressedkeys &~= KEY_CROUCH;
 }
 
-void update_stats (float number, float hit, float fired) {
-// self.stat_hit   = number + ((number==0) ? 1 : 64) * hit   * sv_accuracy_data_share;
-// self.stat_fired = number + ((number==0) ? 1 : 64) * fired * sv_accuracy_data_share;
-
-       if(number) {
-               self.stat_hit = number + 64 * hit * sv_accuracy_data_share;
-               self.stat_fired = number + 64 * fired * sv_accuracy_data_share;
-       } else {
-               self.stat_hit = hit * sv_accuracy_data_share;
-               self.stat_fired = fired * sv_accuracy_data_share;
-       }
-}
-
 /*
 ======================
 spectate mode routines
 ======================
 */
 
-.float weapon_count;
 void SpectateCopy(entity spectatee) {
-       if(spectatee.weapon_count < WEP_LAST) {
-               update_stats (spectatee.weapon_count, spectatee.cvar_cl_accuracy_data_share * floor(spectatee.stats_hit[spectatee.weapon_count - 1]), spectatee.cvar_cl_accuracy_data_share * floor(spectatee.stats_fired[spectatee.weapon_count - 1]));
-               spectatee.weapon_count ++;
-       } else
-               update_stats (0, spectatee.cvar_cl_accuracy_data_share * spectatee.stat_hit, spectatee.cvar_cl_accuracy_data_share * spectatee.stat_fired);
-
        other = spectatee;
        MUTATOR_CALLHOOK(SpectateCopy);
        self.armortype = spectatee.armortype;
@@ -2365,8 +2351,7 @@ float SpectateNext() {
                WriteEntity(MSG_ONE, self.enemy);
                //stuffcmd(self, "set viewsize $tmpviewsize \n");
                self.movetype = MOVETYPE_NONE;
-
-               self.enemy.weapon_count = 0;
+               accuracy_resend(self);
 
                if(!SpectateUpdate())
                        PutObserverInServer();
@@ -2415,8 +2400,6 @@ void LeaveSpectatorMode()
                        if(cvar("g_campaign"))
                                campaign_bots_may_start = 1;
 
-                       self.stat_count = WEP_LAST;
-
                        PutClientInServer();
 
                        if(self.classname == "player")
@@ -2520,14 +2503,12 @@ void SpectatorThink()
                                self.classname = "spectator";
                        } else {
                                self.classname = "observer";
-                               self.stat_count = WEP_LAST;
                                PutClientInServer();
                        }
                } else if (self.BUTTON_ATCK2) {
                        self.welcomemessage_time = 0;
                        self.flags &~= FL_JUMPRELEASED;
                        self.classname = "observer";
-                       self.stat_count = WEP_LAST;
                        PutClientInServer();
                } else {
                        if(!SpectateUpdate())
@@ -2965,15 +2946,6 @@ void PlayerPostThink (void)
                stuffcmd(self, strcat("name ", self.netname, substring(ftos(random()), 2, -1), "\n"));
        }
 
-       // send the clients accuracy stats to the client
-       if(self.stat_count > 0)
-       if(frametime)
-       {
-               self.stat_hit = self.stat_count + 64 * floor(self.(stats_hit[self.stat_count - 1]));
-               self.stat_fired = self.stat_count + 64 * floor(self.(stats_fired[self.stat_count - 1]));
-               self.stat_count -= 1;
-       }
-
        if(sv_maxidle && frametime)
        {
                // WORKAROUND: only use dropclient in server frames (frametime set). Never use it in cl_movement frames (frametime zero).
index 04666c47f2adfc27a24415117a91051f48cbd23c..5bfad53530b8b7446c14c33ef4fdaca68510f41c 100644 (file)
@@ -132,7 +132,7 @@ vector w_shotend;
 // make sure you call makevectors first (FIXME?)
 .float prevstrengthsound;
 .float prevstrengthsoundattempt;
-void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector mi, vector ma, float antilag, float recoil, string snd, float maxdamage, float range)
+void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector mi, vector ma, float antilag, float recoil, string snd, float chan, float maxdamage, float range)
 {
        float nudge = 1; // added to traceline target and subtracted from result
        local float oldsolid;
@@ -159,14 +159,8 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector m
        v_up = vu;
 
        // track max damage
-       if not(inWarmupStage) {
-               entity w;
-               w = get_weaponinfo(ent.weapon);
-               if(w.spawnflags & WEP_TYPE_SPLASH) {  // splash damage
-                       ent.stats_fired[ent.weapon - 1] += maxdamage;
-                       ent.stat_fired = ent.weapon + 64 * floor(ent.stats_fired[ent.weapon - 1]);
-               }
-       }
+       if(accuracy_canbegooddamage(ent))
+               accuracy_add(ent, ent.weapon, maxdamage, 0);
 
        W_HitPlotAnalysis(ent, v_forward, v_right, v_up);
 
@@ -243,9 +237,7 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector m
                ent.punchangle_x = recoil * -1;
 
        if (snd != "")
-       {
-               sound (ent, CHAN_WEAPON, snd, VOL_BASE, ATTN_NORM);
-       }
+               sound (ent, chan, snd, VOL_BASE, ATTN_NORM);
 
        if(ent.items & IT_STRENGTH)
        if(!g_minstagib)
@@ -264,11 +256,11 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector m
        w_shotend = w_shotend + normalize(w_shotend - w_shotorg) * nudge;
 };
 
-#define W_SetupShot_Dir_ProjectileSize(ent,s_forward,mi,ma,antilag,recoil,snd,maxdamage) W_SetupShot_Dir_ProjectileSize_Range(ent, s_forward, mi, ma, antilag, recoil, snd, maxdamage, MAX_SHOT_DISTANCE)
-#define W_SetupShot_ProjectileSize(ent,mi,ma,antilag,recoil,snd,maxdamage) W_SetupShot_Dir_ProjectileSize(ent, v_forward, mi, ma, antilag, recoil, snd, maxdamage)
-#define W_SetupShot_Dir(ent,s_forward,antilag,recoil,snd,maxdamage) W_SetupShot_Dir_ProjectileSize(ent, s_forward, '0 0 0', '0 0 0', antilag, recoil, snd, maxdamage)
-#define W_SetupShot(ent,antilag,recoil,snd,maxdamage) W_SetupShot_ProjectileSize(ent, '0 0 0', '0 0 0', antilag, recoil, snd, maxdamage)
-#define W_SetupShot_Range(ent,antilag,recoil,snd,maxdamage,range) W_SetupShot_Dir_ProjectileSize_Range(ent, v_forward, '0 0 0', '0 0 0', antilag, recoil, snd, maxdamage, range)
+#define W_SetupShot_Dir_ProjectileSize(ent,s_forward,mi,ma,antilag,recoil,snd,chan,maxdamage) W_SetupShot_Dir_ProjectileSize_Range(ent, s_forward, mi, ma, antilag, recoil, snd, chan, maxdamage, MAX_SHOT_DISTANCE)
+#define W_SetupShot_ProjectileSize(ent,mi,ma,antilag,recoil,snd,chan,maxdamage) W_SetupShot_Dir_ProjectileSize(ent, v_forward, mi, ma, antilag, recoil, snd, chan, maxdamage)
+#define W_SetupShot_Dir(ent,s_forward,antilag,recoil,snd,chan,maxdamage) W_SetupShot_Dir_ProjectileSize(ent, s_forward, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage)
+#define W_SetupShot(ent,antilag,recoil,snd,chan,maxdamage) W_SetupShot_ProjectileSize(ent, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage)
+#define W_SetupShot_Range(ent,antilag,recoil,snd,chan,maxdamage,range) W_SetupShot_Dir_ProjectileSize_Range(ent, v_forward, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage, range)
 
 float CL_Weaponentity_CustomizeEntityForClient()
 {
index 0cbe3017eae1ef889844324e8649a1c6cf036d8b..e221911d30aaa6f8a056c274e22e01052ba30493 100644 (file)
@@ -235,7 +235,6 @@ void SV_ParseClientCommand(string s) {
                                        self.caplayer = 1;
                                PlayerScore_Clear(self);
                                bprint ("^4", self.netname, "^4 is playing now\n");
-                               self.stat_count = WEP_LAST;
                                PutClientInServer();
                                if(cvar("g_campaign"))
                                        campaign_bots_may_start = 1;
index b99f27544a81488fc4cbbaae2a742b16eb718cad..a0718d839a69b2530b29d9a3b6b7125e0f6de1c1 100644 (file)
@@ -598,18 +598,8 @@ string matchid;
 .float hitplotfh;
 .string noise4;
 
-.float stat_hit;
-.float stat_fired;
-.float stat_count;
-
-.float stats_hit[WEP_MAXCOUNT];  // for hitscan bullets hit
-.float stats_fired[WEP_MAXCOUNT];  // for hitscan bullets fired
-
 .float last_pickup;
 
-FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(stats_hit);
-FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(stats_fired);
-
 .float stat_leadlimit;
 
 float radar_showennemies;
index feb60217aa050b7d441dd5f897501e4cbd552f20..afe67c9b5b83faf675daf74800fa904e9b9ba09f 100644 (file)
@@ -436,6 +436,16 @@ void(entity e, entity tagentity, string tagname) setattachment = #443; // attach
 //description:
 //global skybox for the map, can not be changed by QC
 
+//DP_UTF8
+//idea: Blub\0, divVerent
+//darkplaces implementation: Blub\0
+//cvar definitions:
+//   utf8_enable: enable utf8 encoding
+//description: utf8 characters are allowed inside cvars, protocol strings, files, progs strings, etc., 
+//and count as 1 char for string functions like strlen, substring, etc.
+// note: utf8_enable is run-time cvar, could be changed during execution
+// note: beware that str2chr() could return value bigger than 255 once utf8 is enabled
+
 //DP_HALFLIFE_MAP
 //idea: LordHavoc
 //darkplaces implementation: LordHavoc
@@ -572,10 +582,12 @@ float(float a) tan = #475; // returns tangent value (which is simply sin(a)/cos(
 // string autocvar__cl_name;
 //NOTE: copying a string-typed autocvar to another variable/field, and then
 //changing the cvar or returning from progs is UNDEFINED. Writing to autocvar
-//globals is UNDEFINED. Accessing autocvar globals after cvar_set()ing that
+//globals is UNDEFINED.  Accessing autocvar globals after cvar_set()ing that
 //cvar is IMPLEMENTATION DEFINED (an implementation may either yield the
-//previous, or the current, value). Writing to an autocvar global is NOT
-//ALLOWED.
+//previous, or the current, value). Whether autocvar globals, after restoring
+//a savegame, have the cvar's current value, or the original value at time of
+//saving, is UNDEFINED. Restoring a savegame however must not restore the
+//cvar values themselves.
 //In case the cvar does NOT exist, then it is automatically created with the
 //value of the autocvar initializer, if given. This is possible with e.g.
 //frikqcc and fteqcc the following way:
@@ -818,7 +830,7 @@ vector(entity e, float s, float n) getsurfacetriangle = #629;
 //function to query triangles of a surface
 
 //DP_QC_GETTAGINFO
-//idea: VorteX, LordHavoc (somebody else?)
+//idea: VorteX, LordHavoc
 //DarkPlaces implementation: VorteX
 //builtin definitions:
 float(entity ent, string tagname) gettagindex = #451;
@@ -863,6 +875,7 @@ float(float tmr) gettime = #519;
 float GETTIME_CDTRACK = 4;
 //description:
 //returns the playing time of the current cdtrack when passed to gettime()
+//see DP_END_GETSOUNDTIME for similar functionality but for entity sound channels
 
 //DP_QC_LOG
 //darkplaces implementation: divVerent
@@ -950,7 +963,8 @@ string(string format, ...) sprintf = #627;
 //  optional: .<precision>, .*, or .*<argpos>$ for the precision
 //  length modifiers: h for forcing a float, l for forcing an int/entity (by default, %d etc. cast a float to int)
 //  conversions:
-//    di take a float if no length is specified or h is, and an int/entity if l is specified as length, and cast it to an int
+//    d takes a float if no length is specified or h is, and an int/entity if l is specified as length, and cast it to an int
+//    i takes an int/entity if no length is specified or i is, and a float if h is specified as length, and cast it to an int
 //    ouxXc take a float if no length is specified or h is, and an int/entity if l is specified as length, and cast it to an unsigned int
 //    eEfFgG take a float if no length is specified or h is, and an int/entity if l is specified as length, and cast it to a double
 //    s takes a string
@@ -1126,6 +1140,15 @@ string(string in) uri_unescape = #511;
 //if 1 is returned by uri_get, the callback will be called in the future
 float(string url, float id) uri_get = #513;
 
+//DP_QC_URI_POST
+//idea: divVerent
+//darkplaces implementation: divVerent
+//loads text from an URL into a string after POSTing via HTTP
+//works like uri_get, but uri_post sends data with Content-Type: content_type to the server
+//and uri_post sends the string buffer buf, joined using the delimiter delim
+float(string url, float id, string content_type, string data) uri_post = #513;
+float(string url, float id, string content_type, string delim, float buf) uri_postbuf = #513;
+
 //DP_SKELETONOBJECTS
 //idea: LordHavoc
 //darkplaces implementation: LordHavoc
@@ -1198,6 +1221,56 @@ float(string name, string value) registercvar = #93;
 //description:
 //the engine supports stereo WAV files.  (useful with DP_SND_DIRECTIONLESSATTNNONE for music)
 
+//DP_SND_GETSOUNDTIME
+//idea: VorteX
+//darkplaces implementation: VorteX
+//constant definitions:
+float(entity e, float channel) getsoundtime = #533; // get currently sound playing position on entity channel, -1 if not playing or error
+float(string sample) soundlength = #534; // returns length of sound sample in seconds, -1 on error (sound not precached, sound system not initialized etc.)
+//description: provides opportunity to query length of sound samples and realtime tracking of sound playing on entities (similar to DP_GETTIME_CDTRACK)
+//note: beware dedicated server not running sound engine at all, so in dedicated mode this builtins will not work in server progs
+//note also: menu progs not supporting getsoundtime() (will give a warning) since it has no sound playing on entities
+//examples of use:
+//  - QC-driven looped sounds
+//  - QC events when sound playing is finished
+//  - toggleable ambientsounds
+//  - subtitles
+
+//DP_VIDEO_DPV
+//idea: LordHavoc
+//darkplaces implementation: LordHavoc
+//console commands:
+//  playvideo <videoname> - start playing video
+//  stopvideo - stops current video
+//description: indicated that engine support playing videos in DPV format
+
+//DP_VIDEO_SUBTITLES
+//idea: VorteX
+//darkplaces implementation: VorteX
+//cvars:
+//  cl_video_subtitles - toggles subtitles showing
+//  cl_video_subtitles_lines - how many lines to reserve for subtitles
+//  cl_video_subtitles_textsize - font size
+//console commands:
+//  playvideo <videoname> <custom_subtitles_file> - start playing video
+//  stopvideo - stops current video
+//description: indicates that engine support subtitles on videos
+//subtitles stored in external text files, each video file has it's default subtitles file ( <videoname>.dpsubs )
+//example: for video/act1.dpv default subtitles file will be video/act1.dpsubs
+//also video could be played with custom subtitles file by utilizing second parm of playvideo command
+//syntax of .dpsubs files: each line in .dpsubs file defines 1 subtitle, there are three tokens:
+//   <start> <end> "string"
+//   start: subtitle start time in seconds
+//     end: subtitle time-to-show in seconds, if 0 - subtitle will be showed until next subtitle is started, 
+//          if below 0 - show until next subtitles minus this number of seconds
+//    text: subtitle text, color codes (Q3-style and ^xRGB) are allowed
+//example of subtitle file:
+//   3 0       "Vengeance! Vengeance for my eternity of suffering!"
+//   9 0       "Whelp! As if you knew what eternity was!"
+//   13        0       "Grovel before your true master."
+//   17        0       "Never!" 
+//   18        7       "I'll hack you from crotch to gizzard and feed what's left of you to your brides..."
+
 //DP_SOLIDCORPSE
 //idea: LordHavoc
 //darkplaces implementation: LordHavoc
@@ -1273,6 +1346,14 @@ float(entity clent) clienttype = #455; // returns one of the CLIENTTYPE_* consta
 //description:
 //allows qc to customize MOVETYPE_BOUNCE a bit
 
+//DP_SV_CLIENTCAMERA
+//idea: LordHavoc, others
+//darkplaces implementation: Black
+//field definitions:
+.entity clientcamera; // override camera entity
+//description:
+//allows another entity to be the camera for a client, for example a remote camera, this is similar to sending svc_setview manually except that it also changes the network culling appropriately.
+
 //DP_SV_CLIENTCOLORS
 //idea: LordHavoc
 //darkplaces implementation: LordHavoc
@@ -2320,4 +2401,7 @@ float JOINTTYPE_HINGE2 = 5; // hinge2; uses origin (anchor), angles (axis1), vel
 .string crypto_encryptmethod; // the string "AES128" if encrypting, and string_null if plaintext
 .string crypto_signmethod; // the string "HMAC-SHA256" if signing, and string_null if plaintext
 // there is no field crypto_myidfp, as that info contains no additional information the QC may have a use for
+//builtin definitions: (SVQC)
+float(string url, float id, string content_type, string delim, float buf, float keyid) crypto_uri_postbuf = #513;
 //description:
+//use -1 as buffer handle to justs end delim as postdata
index 460c608dcf357d944829978620b3e21247f61724..387514be45194dabb3d9337de29da5a30f45f295 100644 (file)
@@ -844,19 +844,6 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
        }
 }
 
-void Damage_RecordDamage(entity attacker, float deathtype, float damage)
-{
-       float weaponid;
-       weaponid = DEATH_WEAPONOF(deathtype);
-
-       if not(inWarmupStage)
-       if (weaponid)
-       if ((clienttype(attacker) == CLIENTTYPE_REAL) | (clienttype(attacker) == CLIENTTYPE_BOT)) {
-               attacker.stats_hit[weaponid - 1] += damage;
-               attacker.stat_hit = weaponid + 64 * floor(attacker.stats_hit[weaponid - 1]);
-       }
-}
-
 float RadiusDamage_running;
 float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity ignore, float forceintensity, float deathtype, entity directhitentity)
 // Returns total damage applies to creatures
@@ -875,7 +862,6 @@ float RadiusDamage (entity inflictor, entity attacker, float coredamage, float e
        float   tfloorforce;
 
        float stat_damagedone;
-       float stat_maxdamage;
 
        if(RadiusDamage_running)
        {
@@ -913,7 +899,6 @@ float RadiusDamage (entity inflictor, entity attacker, float coredamage, float e
        }
 
        stat_damagedone = 0;
-       stat_maxdamage = 0;
 
        targ = WarpZone_FindRadius (blastorigin, rad, FALSE);
        while (targ)
@@ -1031,14 +1016,8 @@ float RadiusDamage (entity inflictor, entity attacker, float coredamage, float e
                                                        {
                                                                total_damage_to_creatures += finaldmg;
 
-                                                               if(targ.flags & FL_CLIENT)
-                                                               if(targ.deadflag == DEAD_NO)
-                                                               if(targ != attacker)
-                                                               if(!teamplay || targ.team != attacker.team)
-                                                               {
+                                                               if(accuracy_isgooddamage(attacker, targ))
                                                                        stat_damagedone += finaldmg;
-                                                                       stat_maxdamage += coredamage;
-                                                               }
                                                        }
 
                                                        if(targ == directhitentity || DEATH_ISSPECIAL(deathtype))
@@ -1054,7 +1033,8 @@ float RadiusDamage (entity inflictor, entity attacker, float coredamage, float e
 
        RadiusDamage_running = 0;
 
-       Damage_RecordDamage(attacker, deathtype, min(stat_maxdamage, stat_damagedone));
+       if(!DEATH_ISSPECIAL(deathtype))
+               accuracy_add(attacker, DEATH_WEAPONOFWEAPONDEATH(deathtype), 0, min(coredamage, stat_damagedone));
 
        return total_damage_to_creatures;
 }
@@ -1157,6 +1137,8 @@ float Fire_AddDamage(entity e, entity o, float d, float t, float dt)
                                        e.fire_hitsound = FALSE;
                                }
                        }
+                       if(accuracy_isgooddamage(o, e))
+                               accuracy_add(o, DEATH_WEAPONOFWEAPONDEATH(dt), 0, max(0, totaldamage - mindamage));
                        return max(0, totaldamage - mindamage); // can never be negative, but to make sure
                }
                else
@@ -1169,6 +1151,8 @@ float Fire_AddDamage(entity e, entity o, float d, float t, float dt)
                e.fire_deathtype = dt;
                e.fire_owner = o;
                e.fire_hitsound = FALSE;
+               if(accuracy_isgooddamage(o, e))
+                       accuracy_add(o, DEATH_WEAPONOFWEAPONDEATH(dt), 0, d);
                return d;
        }
 }
@@ -1203,8 +1187,6 @@ void Fire_ApplyDamage(entity e)
        }
        e.fire_hitsound = TRUE;
 
-       Damage_RecordDamage(e.fire_owner, e.fire_deathtype, d);
-
        if not(IS_INDEPENDENT_PLAYER(e))
        FOR_EACH_PLAYER(other) if(e != other)
        {
index ded4518d396daabf16db0d4d5f8918274734a930..4628aef459f4a798df89dcb2868c972a0ff225f6 100644 (file)
@@ -801,8 +801,6 @@ void spawnfunc_worldspawn (void)
        addstat(STAT_INVINCIBLE_FINISHED, AS_FLOAT, invincible_finished);
        addstat(STAT_PRESSED_KEYS, AS_FLOAT, pressedkeys);
        addstat(STAT_FUEL, AS_INT, ammo_fuel);
-       addstat(STAT_DAMAGE_HITS, AS_INT, stat_hit);
-       addstat(STAT_DAMAGE_FIRED, AS_INT, stat_fired);
        addstat(STAT_SHOTORG, AS_INT, stat_shotorg);
        addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit);
        addstat(STAT_BULLETS_LOADED, AS_INT, campingrifle_bulletcounter);
@@ -1544,8 +1542,6 @@ only called if a time or frag limit has expired
 */
 void NextLevel()
 {
-       float i;
-
        gameover = TRUE;
 
        intermission_running = 1;
@@ -1574,52 +1570,10 @@ void NextLevel()
 
        GameLogClose();
 
-// TO DO
-
-// save the stats to a text file on the client
-// stuffcmd(other, log_stats "stats/file_name");
-// bprint stats
-// stuffcmd(other, log_stats "");
-// use a filename similar to the demo name
-       // string file_name;
-       // file_name = strcat("\nlog_file \"stats/", strftime(TRUE, "%Y-%m-%d_%H-%M"), "_", mapname, ".txt\"");  // open the log file
-
-// write a stats parser for the menu
-
-       if(cvar("sv_accuracy_data_send")) {
-               string stats_to_send;
-
-               FOR_EACH_CLIENT(other) {  // make the string to send
-                       FixIntermissionClient(other);
-
-                       if(other.cvar_cl_accuracy_data_share) {
-                               stats_to_send = strcat(stats_to_send, ":hits:", other.netname);
-
-                               for(i = WEP_FIRST; i <= WEP_LAST; ++i)
-                                       stats_to_send = strcat(stats_to_send, ":", ftos(other.stats_hit[i-1]));
-
-                               stats_to_send = strcat(stats_to_send, "\n:fired:", other.netname);
-
-                               for(i = WEP_FIRST; i <= WEP_LAST; ++i)
-                                       stats_to_send = strcat(stats_to_send, ":", ftos(other.stats_fired[i-1]));
-
-                               stats_to_send = strcat(stats_to_send, "\n");
-                       }
-               }
-
-               FOR_EACH_REALCLIENT(other) {  // only spam humans
-                       Score_NicePrint(other);  // print the score
-
-                       if(other.cvar_cl_accuracy_data_receive)  // send the stats string to all the willing clients
-                               bprint(stats_to_send);
-               }
-       } else { // ye olde message
-               FOR_EACH_PLAYER(other) {
-                       FixIntermissionClient(other);
-
-                       if(other.winning)
-                               bprint(other.netname, " ^7wins.\n");
-               }
+       FOR_EACH_PLAYER(other) {
+               FixIntermissionClient(other);
+               if(other.winning)
+                       bprint(other.netname, " ^7wins.\n");
        }
 
        if(cvar("g_campaign"))
index 5b8ec7127fd861a81b3dde4d32fa8e25ac5390c4..25222a38f7a43a70fbacca9a39c63182a9b889e5 100644 (file)
@@ -468,28 +468,6 @@ string formatmessage(string msg)
                        replacement = ftos(vlen(self.velocity - self.velocity_z * '0 0 1'));
                else if (escape == "S")
                        replacement = ftos(vlen(self.velocity));
-               else if (escape == "v") {
-                       float weapon_number;
-                       local entity stats;
-
-                       if(self.classname == "spectator")
-                               stats = self.enemy;
-                       else
-                               stats = self;
-
-                       weapon_number = stats.weapon;
-
-                       if (!weapon_number)
-                               weapon_number = stats.switchweapon;
-
-                       if (!weapon_number)
-                               weapon_number = stats.cnt;
-
-                       if(stats.cvar_cl_accuracy_data_share && stats.stats_fired[weapon_number - 1])
-                               replacement = ftos(bound(0, floor(100 * stats.stats_hit[weapon_number - 1] / stats.stats_fired[weapon_number - 1]), 100));
-                       else
-                               replacement = "~"; // or something to indicate NULL, not available
-               }
 
                msg = strcat(substring(msg, 0, p), replacement, substring(msg, p+2, strlen(msg) - (p+2)));
                p = p + strlen(replacement);
index ff9cfd35533013241403bc372078fd184f6bb30f..eb2bed54bd32ab7f55d1710d14427aaae72b24e8 100644 (file)
@@ -630,7 +630,7 @@ void W_Nexball_Attack (float t)
        if (!(ball = self.ballcarried))
                return;
 
-       W_SetupShot (self, FALSE, 4, "nexball/shoot1.wav",0);
+       W_SetupShot (self, FALSE, 4, "nexball/shoot1.wav", CHAN_WEAPON, 0);
        tracebox(w_shotorg, BALL_MINS, BALL_MAXS, w_shotorg, MOVE_WORLDONLY, world);
        if(trace_startsolid)
        {
@@ -661,7 +661,7 @@ void W_Nexball_Attack2 (void)
        local entity missile;
        if (!(balls & BALL_BASKET))
                return;
-       W_SetupShot (self, FALSE, 2, "nexball/shoot2.wav",0);
+       W_SetupShot (self, FALSE, 2, "nexball/shoot2.wav", CHAN_WEAPON, 0);
 //     pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
        missile = spawn ();
 
index c2718d4e8642d69e006bc84400a4ff442d235b39..104f58c3886de7ae036c4d806dacfcc82642608b 100644 (file)
@@ -35,6 +35,7 @@ campaign.qh
 ../common/mapinfo.qh
 ../common/util.qc
 
+accuracy.qh
 csqcprojectile.qh
 csqceffects.qc
 
@@ -168,6 +169,7 @@ monsters/fight.qc
 monsters/ai.qc
 monsters/m_monsters.qc
 monsters/monster_zombie.qc
+accuracy.qc
 csqcprojectile.qc
 
 playerdemo.qc
index 9f0075afa53756b1f278443e979f7d37bde3c424..ee66278b34899733738a66e373f73cded1541406 100644 (file)
@@ -268,7 +268,7 @@ float Item_GiveTo(entity item, entity player)
                        if (player.ammo_fuel < g_pickup_fuel_max)
                        {
                                pickedup = TRUE;
-                               player.ammo_fuel = min(player.ammo_fuel + item.ammo_fuel, g_pickup_fuel_max);
+                               player.ammo_fuel = bound(player.ammo_fuel, g_pickup_fuel_max, player.ammo_fuel + item.ammo_fuel);
                                player.pauserotfuel_finished = max(player.pauserotfuel_finished, time + cvar("g_balance_pause_fuel_rot"));
                        }
                        if((it = (item.items - (item.items & player.items)) & IT_PICKUPMASK))
@@ -298,7 +298,7 @@ float Item_GiveTo(entity item, entity player)
                                if (item.weapons & WEPBIT_MINSTANEX)
                                        W_GiveWeapon (player, WEP_MINSTANEX, item.netname);
                                if (item.ammo_cells)
-                                       player.ammo_cells = min (player.ammo_cells + cvar("g_minstagib_ammo_drop"), 999);
+                                       player.ammo_cells = bound(player.ammo_cells, 999, player.ammo_cells + cvar("g_minstagib_ammo_drop"));
                                player.health = 100;
                        }
 
@@ -308,7 +308,7 @@ float Item_GiveTo(entity item, entity player)
                                pickedup = TRUE;
                                // sound not available
                                // AnnounceTo(player, "_lives");
-                               player.armorvalue = min(player.armorvalue + cvar("g_minstagib_extralives"), 999);
+                               player.armorvalue = bound(player.armorvalue, 999, player.armorvalue + cvar("g_minstagib_extralives"));
                                sprint(player, "^3You picked up some extra lives\n");
                        }
 
@@ -329,14 +329,6 @@ float Item_GiveTo(entity item, entity player)
                                // AnnounceTo(player, "speed");
                                player.invincible_finished = max(player.invincible_finished, time) + cvar("g_balance_powerup_strength_time");
                        }
-
-                       if (item.ammo_fuel)
-                       if (player.ammo_fuel < g_pickup_fuel_max) 
-                       {
-                               pickedup = TRUE;
-                               player.ammo_fuel = min(player.ammo_fuel + item.ammo_fuel, g_pickup_fuel_max);
-                               player.pauserotfuel_finished = max(player.pauserotfuel_finished, time + cvar("g_balance_pause_fuel_rot"));
-                       }
                }
        }
        else
@@ -373,31 +365,31 @@ float Item_GiveTo(entity item, entity player)
                        if ((player.ammo_shells < g_pickup_shells_max) || item.pickup_anyway)
                        {
                                pickedup = TRUE;
-                               player.ammo_shells = min (player.ammo_shells + item.ammo_shells, g_pickup_shells_max);
+                               player.ammo_shells = bound(player.ammo_shells, g_pickup_shells_max, player.ammo_shells + item.ammo_shells);
                        }
                        if (item.ammo_nails)
                        if ((player.ammo_nails < g_pickup_nails_max) || item.pickup_anyway)
                        {
                                pickedup = TRUE;
-                               player.ammo_nails = min (player.ammo_nails + item.ammo_nails, g_pickup_nails_max);
+                               player.ammo_nails = bound(player.ammo_nails, g_pickup_nails_max, player.ammo_nails + item.ammo_nails);
                        }
                        if (item.ammo_rockets)
                        if ((player.ammo_rockets < g_pickup_rockets_max) || item.pickup_anyway)
                        {
                                pickedup = TRUE;
-                               player.ammo_rockets = min (player.ammo_rockets + item.ammo_rockets, g_pickup_rockets_max);
+                               player.ammo_rockets = bound(player.ammo_rockets, g_pickup_rockets_max, player.ammo_rockets + item.ammo_rockets);
                        }
                        if (item.ammo_cells)
                        if ((player.ammo_cells < g_pickup_cells_max) || item.pickup_anyway)
                        {
                                pickedup = TRUE;
-                               player.ammo_cells = min (player.ammo_cells + item.ammo_cells, g_pickup_cells_max);
+                               player.ammo_cells = bound(player.ammo_cells, g_pickup_cells_max, player.ammo_cells + item.ammo_cells);
                        }
                        if (item.ammo_fuel)
                        if ((player.ammo_fuel < g_pickup_fuel_max) || item.pickup_anyway)
                        {
                                pickedup = TRUE;
-                               player.ammo_fuel = min(player.ammo_fuel + item.ammo_fuel, g_pickup_fuel_max);
+                               player.ammo_fuel = bound(player.ammo_fuel, g_pickup_fuel_max, player.ammo_fuel + item.ammo_fuel);
                                player.pauserotfuel_finished = max(player.pauserotfuel_finished, time + cvar("g_balance_pause_fuel_rot"));
                        }
                }
@@ -438,14 +430,14 @@ float Item_GiveTo(entity item, entity player)
                        if ((player.health < item.max_health) || item.pickup_anyway)
                        {
                                pickedup = TRUE;
-                               player.health = min(player.health + item.health, item.max_health);
+                               player.health = bound(player.health, item.max_health, player.health + item.health);
                                player.pauserothealth_finished = max(player.pauserothealth_finished, time + cvar("g_balance_pause_health_rot"));
                        }
                        if (item.armorvalue)
                        if ((player.armorvalue < item.max_armorvalue) || item.pickup_anyway)
                        {
                                pickedup = TRUE;
-                               player.armorvalue = min(player.armorvalue + item.armorvalue, item.max_armorvalue);
+                               player.armorvalue = bound(player.armorvalue, item.max_armorvalue, player.armorvalue + item.armorvalue);
                                player.pauserotarmor_finished = max(player.pauserotarmor_finished, time + cvar("g_balance_pause_armor_rot"));
                        }
                }
index 07268a7a0fae0c9efa3389f494f7cb4776b33906..309717305052fefb239085d85a8ed1ff41b5b103 100644 (file)
@@ -84,9 +84,9 @@ void W_CampingRifle_FireBullet(float pSpread, float pDamage, float pHeadshotAdde
                self.ammo_nails -= pAmmo;
 
        if(deathtype & HITTYPE_SECONDARY)
-               W_SetupShot (self, cvar("g_antilag_bullets") && pSpeed >= cvar("g_antilag_bullets"), 2, "weapons/campingrifle_fire2.wav", cvar("g_balance_campingrifle_secondary_damage"));
+               W_SetupShot (self, cvar("g_antilag_bullets") && pSpeed >= cvar("g_antilag_bullets"), 2, "weapons/campingrifle_fire2.wav", CHAN_WEAPON, cvar("g_balance_campingrifle_secondary_damage") + cvar("g_balance_campingrifle_secondary_headshotaddeddamage"));
        else
-               W_SetupShot (self, cvar("g_antilag_bullets") && pSpeed >= cvar("g_antilag_bullets"), 2, "weapons/campingrifle_fire.wav", cvar("g_balance_campingrifle_primary_damage"));
+               W_SetupShot (self, cvar("g_antilag_bullets") && pSpeed >= cvar("g_antilag_bullets"), 2, "weapons/campingrifle_fire.wav", CHAN_WEAPON, cvar("g_balance_campingrifle_primary_damage") + cvar("g_balance_campingrifle_primary_headshotaddeddamage"));
 
        pointparticles(particleeffectnum("shotgun_muzzleflash"), w_shotorg, w_shotdir * 2000, 1);
 
index 320ffb7507e6173714af897ba43ab4ed917316bb..2dd97c831df1f86c613cdb90bc14f7cf682f710c 100644 (file)
@@ -28,6 +28,7 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f
        local vector hitloc, force, endpoint, dir;
        local entity ent, endent;
        local float endq3surfaceflags;
+       float totaldmg;
 
        float length;
        vector beampos;
@@ -35,8 +36,6 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f
        entity pseudoprojectile;
        float f, ffs;
 
-       float hit;
-
        railgun_start = start;
        railgun_end = end;
 
@@ -47,6 +46,8 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f
        // go a little bit into the wall because we need to hit this wall later
        end = end + dir;
 
+       totaldmg = 0;
+
        // trace multiple times until we hit a wall, each obstacle will be made
        // non-solid so we can hit the next, while doing this we spawn effects and
        // note down which entities were hit so we can damage them later
@@ -121,18 +122,12 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f
                // get the details we need to call the damage function
                hitloc = ent.railgunhitloc;
 
-               //for stats so that team hit will count as a miss
-               if(ent.flags & FL_CLIENT)
-               if(ent.deadflag == DEAD_NO)
-                       hit = 1;
-
-               if(teams_matter)
-               if(ent.team == self.team)
-                       hit = 0;
-
                f = ExponentialFalloff(mindist, maxdist, halflifedist, ent.railgundistance);
                ffs = ExponentialFalloff(mindist, maxdist, forcehalflifedist, ent.railgundistance);
 
+               if(accuracy_isgooddamage(self.owner, ent))
+                       totaldmg += bdamage * f;
+
                // apply the damage
                if (ent.takedamage)
                        Damage (ent, self, self, bdamage * f, deathtype, hitloc, force * ffs);
@@ -151,16 +146,7 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f
        }
 
        // calculate hits and fired shots for hitscan
-       if not(inWarmupStage)
-       {
-               self.stats_fired[self.weapon - 1] += 1;
-               self.stat_fired = self.weapon + 64 * floor(self.stats_fired[self.weapon - 1]);
-
-               if(hit) {
-                       self.stats_hit[self.weapon - 1] += 1;
-                       self.stat_hit = self.weapon + 64 * floor(self.stats_hit[self.weapon - 1]);
-               }
-       }
+       accuracy_add(self, self.weapon, 0, min(bdamage, totaldmg));
 
        trace_endpos = endpoint;
        trace_ent = endent;
@@ -170,11 +156,13 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f
 .float dmg_edge;
 .float dmg_force;
 .float dmg_radius;
+.float dmg_total;
 void W_BallisticBullet_Hit (void)
 {
-       float f;
+       float f, q, g;
 
        f = pow(bound(0, vlen(self.velocity) / vlen(self.oldvelocity), 1), 2); // energy multiplier
+       q = 1 + self.dmg_edge / self.dmg;
 
        if(other.solid == SOLID_BSP)
                Damage_DamageInfo(self.origin, self.dmg * f, 0, 0, max(1, self.dmg_force) * normalize(self.velocity) * f, self.projectiledeathtype, self);
@@ -185,14 +173,16 @@ void W_BallisticBullet_Hit (void)
 
                headshot = 0;
                yoda = 0;
-               damage_headshotbonus = self.dmg_edge;
+               damage_headshotbonus = self.dmg_edge * f;
                railgun_start = self.origin - 2 * frametime * self.velocity;
                railgun_end = self.origin + 2 * frametime * self.velocity;
-
+               g = accuracy_isgooddamage(self.owner, other);
                Damage(other, self, self.owner, self.dmg * f, self.projectiledeathtype, self.origin, self.dmg_force * normalize(self.velocity) * f);
                damage_headshotbonus = 0;
 
-               if(self.dmg_edge != 0)
+               if(headshot)
+                       f *= q;
+               if(DEATH_WEAPONOF(self.projectiledeathtype) == WEP_CAMPINGRIFLE)
                {
                        if(headshot)
                                AnnounceTo(self.owner, "headshot");
@@ -201,13 +191,12 @@ void W_BallisticBullet_Hit (void)
                }
 
                // calculate hits for ballistic weapons
-               if (other.flags & FL_CLIENT)  // is the player a client
-               if (other.deadflag == DEAD_NO)  // is the victim a corpse
-               if ((!(teamplay)) | (other.team != self.owner.team))  // not teamplay (ctf, kh, tdm etc) or the victim is in the same team
-               if not(inWarmupStage)  // not in warm up stage
+               if(g)
                {
-                       self.owner.stats_hit[self.owner.weapon - 1] += 1;
-                       self.owner.stat_hit = self.owner.weapon + 64 * floor(self.owner.stats_hit[self.owner.weapon - 1]);
+                       // do not exceed 100%
+                       q = min(self.dmg * q, self.dmg_total + f * self.dmg) - self.dmg_total;
+                       self.dmg_total += f * self.dmg;
+                       accuracy_add(self.owner, self.owner.weapon, 0, q);
                }
        }
 
@@ -424,13 +413,6 @@ void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, f
                savetime = frametime;
                frametime = 0.05;
 
-               // update the accuracy stats - increase shots fired by 1
-               if not(inWarmupStage)
-               {
-                       oldself.stats_fired[oldself.weapon - 1] += 1;
-                       oldself.stat_fired = oldself.weapon + 64 * floor(oldself.stats_fired[oldself.weapon - 1]);
-               }
-
                for(;;)
                {
                        // DP tracetoss is stupid and always traces in 0.05s
@@ -491,13 +473,6 @@ void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, f
                return;
        }
 
-       // update the accuracy stats
-       if not(inWarmupStage)
-       {
-               self.stats_fired[self.weapon - 1] += 1;
-               self.stat_fired = self.weapon + 64 * floor(self.stats_fired[self.weapon - 1]);
-       }
-
        if(tracereffects & EF_RED)
                CSQCProjectile(proj, TRUE, PROJECTILE_BULLET_GLOWING_TRACER, TRUE);
        else if(tracereffects & EF_BLUE)
index b688a9f7f5d7a04e264550d900edfce7dc1d624b..092cb10e49b389c7a5ffa0610b7904ac8d19bbb6 100644 (file)
@@ -9,6 +9,27 @@ REGISTER_WEAPON(CRYLINK, w_crylink, IT_CELLS, 6, WEP_FLAG_NORMAL | WEP_TYPE_SPLA
 .entity queuenext;
 .entity queueprev;
 
+void W_Crylink_CheckLinks(entity e)
+{
+       float i;
+       entity p;
+
+       if(e == world)
+               error("W_Crylink_CheckLinks: entity is world");
+
+       p = e;
+       for(i = 0; i < 1000; ++i)
+       {
+               if(p.queuenext.queueprev != p || p.queueprev.queuenext != p)
+                       error("W_Crylink_CheckLinks: queue is inconsistent");
+               p = p.queuenext;
+               if(p == e)
+                       break;
+       }
+       if(i >= 1000)
+               error("W_Crylink_CheckLinks: infinite chain");
+}
+
 void W_Crylink_Dequeue_Raw(entity own, entity prev, entity me, entity next)
 {
        if(me == own.crylink_lastgroup)
@@ -39,27 +60,6 @@ void W_Crylink_LinkExplode (entity e, entity e2)
        remove (e);
 }
 
-void W_Crylink_CheckLinks(entity e)
-{
-       float i;
-       entity p;
-
-       if(e == world)
-               error("W_Crylink_CheckLinks: entity is world");
-
-       p = e;
-       for(i = 0; i < 1000; ++i)
-       {
-               if(p.queuenext.queueprev != p || p.queueprev.queuenext != p)
-                       error("W_Crylink_CheckLinks: queue is inconsistent");
-               p = p.queuenext;
-               if(p == e)
-                       break;
-       }
-       if(i >= 1000)
-               error("W_Crylink_CheckLinks: infinite chain");
-}
-
 // adjust towards center
 // returns the origin where they will meet... and the time till the meeting is
 // stored in w_crylink_linkjoin_time.
@@ -233,6 +233,8 @@ void W_Crylink_Touch (void)
                f *= a;
        if (RadiusDamage (self, self.realowner, cvar("g_balance_crylink_primary_damage") * f, cvar("g_balance_crylink_primary_edgedamage") * f, cvar("g_balance_crylink_primary_radius"), world, cvar("g_balance_crylink_primary_force") * f, self.projectiledeathtype, other) && cvar("g_balance_crylink_primary_linkexplode"))
        {
+               if(self == self.realowner.crylink_lastgroup)
+                       self.realowner.crylink_lastgroup = world;
                W_Crylink_LinkExplode(self.queuenext, self);
                remove (self);
                return;
@@ -281,6 +283,8 @@ void W_Crylink_Touch2 (void)
                f *= a;
        if (RadiusDamage (self, self.realowner, cvar("g_balance_crylink_secondary_damage") * f, cvar("g_balance_crylink_secondary_edgedamage") * f, cvar("g_balance_crylink_secondary_radius"), world, cvar("g_balance_crylink_secondary_force") * f, self.projectiledeathtype, other) && cvar("g_balance_crylink_secondary_linkexplode"))
        {
+               if(self == self.realowner.crylink_lastgroup)
+                       self.realowner.crylink_lastgroup = world;
                W_Crylink_LinkExplode(self.queuenext, self);
                remove (self);
                return;
@@ -313,11 +317,17 @@ void W_Crylink_Attack (void)
        local entity proj, prevproj, firstproj;
        local vector s;
        vector forward, right, up;
+       float maxdmg;
 
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_cells = self.ammo_cells - cvar("g_balance_crylink_primary_ammo");
 
-       W_SetupShot (self, FALSE, 2, "weapons/crylink_fire.wav", (cvar("g_balance_crylink_primary_damage")*cvar("g_balance_crylink_primary_shots")));
+       maxdmg = cvar("g_balance_crylink_primary_damage")*cvar("g_balance_crylink_primary_shots");
+       maxdmg *= 1 + cvar("g_balance_crylink_primary_bouncedamagefactor") * cvar("g_balance_crylink_primary_bounces");
+       if(cvar("g_balance_crylink_primary_joinexplode"))
+               maxdmg += cvar("g_balance_crylink_primary_joinexplode_damage");
+
+       W_SetupShot (self, FALSE, 2, "weapons/crylink_fire.wav", CHAN_WEAPON, maxdmg);
        forward = v_forward;
        right = v_right;
        up = v_up;
@@ -409,11 +419,17 @@ void W_Crylink_Attack2 (void)
 {
        local float counter, shots;
        local entity proj, prevproj, firstproj;
+       float maxdmg;
 
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_cells = self.ammo_cells - cvar("g_balance_crylink_secondary_ammo");
 
-       W_SetupShot (self, FALSE, 2, "weapons/crylink_fire2.wav", (cvar("g_balance_crylink_secondary_damage")*cvar("g_balance_crylink_secondary_shots")));
+       maxdmg = cvar("g_balance_crylink_secondary_damage")*cvar("g_balance_crylink_secondary_shots");
+       maxdmg *= 1 + cvar("g_balance_crylink_secondary_bouncedamagefactor") * cvar("g_balance_crylink_secondary_bounces");
+       if(cvar("g_balance_crylink_secondary_joinexplode"))
+               maxdmg += cvar("g_balance_crylink_secondary_joinexplode_damage");
+
+       W_SetupShot (self, FALSE, 2, "weapons/crylink_fire2.wav", CHAN_WEAPON, maxdmg);
 
        shots = cvar("g_balance_crylink_secondary_shots");
        pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
index 1600a1c9a1fe7f8b860743d9b556a1b07f11bd06..11f97f07062ed16e4253914f98802642c3b7d29e 100644 (file)
@@ -110,7 +110,7 @@ void W_Electro_Attack()
 {
        local entity proj;
 
-       W_SetupShot_ProjectileSize (self, '0 0 -3', '0 0 -3', FALSE, 2, "weapons/electro_fire.wav", cvar("g_balance_electro_primary_damage"));
+       W_SetupShot_ProjectileSize (self, '0 0 -3', '0 0 -3', FALSE, 2, "weapons/electro_fire.wav", CHAN_WEAPON, cvar("g_balance_electro_primary_damage"));
 
        pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
@@ -147,7 +147,8 @@ void W_Electro_Attack2()
 {
        local entity proj;
 
-       W_SetupShot_ProjectileSize (self, '0 0 -4', '0 0 -4', FALSE, 2, "weapons/electro_fire2.wav", cvar("g_balance_electro_secondary_damage"));
+       W_SetupShot_ProjectileSize (self, '0 0 -4', '0 0 -4', FALSE, 2, "weapons/electro_fire2.wav", CHAN_WEAPON, cvar("g_balance_electro_secondary_damage"));
+
        w_shotdir = v_forward; // no TrueAim for grenades please
 
        pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
@@ -254,7 +255,7 @@ void lgbeam_think()
                }
        }
 
-       W_SetupShot_Range(self.owner, TRUE, 0, "", cvar("g_balance_electro_primary_damage") * dt, cvar("g_balance_electro_primary_range"));
+       W_SetupShot_Range(self.owner, TRUE, 0, "", 0, cvar("g_balance_electro_primary_damage") * dt, cvar("g_balance_electro_primary_range"));
        WarpZone_traceline_antilag(self.owner, w_shotorg, w_shotend, MOVE_NORMAL, self.owner, ANTILAG_LATENCY(self.owner));
 
        // apply the damage
@@ -265,8 +266,9 @@ void lgbeam_think()
 
                f = ExponentialFalloff(cvar("g_balance_electro_primary_falloff_mindist"), cvar("g_balance_electro_primary_falloff_maxdist"), cvar("g_balance_electro_primary_falloff_halflifedist"), vlen(WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos) - w_shotorg));
 
+               if(accuracy_isgooddamage(self.owner, trace_ent))
+                       accuracy_add(self.owner, WEP_ELECTRO, 0, cvar("g_balance_electro_primary_damage") * dt * f);
                Damage (trace_ent, self.owner, self.owner, cvar("g_balance_electro_primary_damage") * dt * f, WEP_ELECTRO, trace_endpos, force * dt);
-               Damage_RecordDamage(self.owner, WEP_ELECTRO, cvar("g_balance_electro_primary_damage") * dt * f);
        }
        W_Plasma_TriggerCombo(trace_endpos, cvar("g_balance_electro_primary_comboradius"), self.owner);
 
@@ -288,9 +290,7 @@ void W_Electro_Attack3 (void)
 {
        // only play fire sound if 0.5 sec has passed since player let go the fire button
        if(time - self.prevlgfire > 0.5)
-       {
                sound (self, CHAN_WEAPON, "weapons/lgbeam_fire.wav", VOL_BASE, ATTN_NORM);
-       }
 
        entity beam, oldself;
 
index e78bb2bbc3b1c03ace99f72afcf8f9b280b8430c..b0ccd4e6d7ee61118537199a89788372bd343096 100644 (file)
@@ -44,10 +44,12 @@ void W_Fireball_Explode (void)
                        if(points <= 0)
                                continue;
                        dir = normalize(e.origin + e.view_ofs - self.origin);
+
+                       if(accuracy_isgooddamage(self.realowner, e))
+                               accuracy_add(self.realowner, WEP_FIREBALL, 0, cvar("g_balance_fireball_primary_bfgdamage") * points);
+
                        Damage(e, self, self.realowner, cvar("g_balance_fireball_primary_bfgdamage") * points, self.projectiledeathtype | HITTYPE_BOUNCE | HITTYPE_SPLASH, e.origin + e.view_ofs, cvar("g_balance_fireball_primary_bfgforce") * dir);
                        pointparticles(particleeffectnum("fireball_bfgdamage"), e.origin, -1 * dir, 1);
-
-                       Damage_RecordDamage(self.owner, self.projectiledeathtype, cvar("g_balance_fireball_primary_bfgdamage") * points);
                }
        }
 
@@ -125,7 +127,7 @@ void W_Fireball_Attack1()
 {
        local entity proj;
 
-       W_SetupShot_ProjectileSize (self, '-16 -16 -16', '16 16 16', FALSE, 2, "weapons/fireball_fire2.wav", cvar("g_balance_fireball_primary_damage") + cvar("g_balance_fireball_primary_bfgdamage"));
+       W_SetupShot_ProjectileSize (self, '-16 -16 -16', '16 16 16', FALSE, 2, "weapons/fireball_fire2.wav", CHAN_WEAPON, cvar("g_balance_fireball_primary_damage") + cvar("g_balance_fireball_primary_bfgdamage"));
 
        pointparticles(particleeffectnum("fireball_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
@@ -161,7 +163,7 @@ void W_Fireball_Attack1()
 
 void W_Fireball_AttackEffect(float i, vector f_diff)
 {
-       W_SetupShot_ProjectileSize (self, '-16 -16 -16', '16 16 16', FALSE, 0, "", 0);
+       W_SetupShot_ProjectileSize (self, '-16 -16 -16', '16 16 16', FALSE, 0, "", 0, 0);
        w_shotorg += f_diff_x * v_up + f_diff_y * v_right;
        pointparticles(particleeffectnum("fireball_preattack_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 }
@@ -264,7 +266,7 @@ void W_Fireball_Attack2()
                        f_diff = '+1.25 +3.75 0';
                        break;
        }
-       W_SetupShot_ProjectileSize(self, '-4 -4 -4', '4 4 4', FALSE, 2, "weapons/fireball_fire.wav", cvar("g_balance_fireball_secondary_damage"));
+       W_SetupShot_ProjectileSize(self, '-4 -4 -4', '4 4 4', FALSE, 2, "weapons/fireball_fire.wav", CHAN_WEAPON, cvar("g_balance_fireball_secondary_damage"));
        traceline(w_shotorg, w_shotorg + f_diff_x * v_up + f_diff_y * v_right, MOVE_NORMAL, self);
        w_shotorg = trace_endpos;
 
index 75d3d7e7bb8925c55d36ce8f114e26e25cda6dba..cab8f49505c927d15a6325879a71c36e35191aa0 100644 (file)
@@ -163,7 +163,7 @@ void W_Grenade_Attack (void)
 
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_grenadelauncher_primary_ammo");
-       W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", cvar("g_balance_grenadelauncher_primary_damage"));
+       W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", CHAN_WEAPON, cvar("g_balance_grenadelauncher_primary_damage"));
        w_shotdir = v_forward; // no TrueAim for grenades please
 
        pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
@@ -210,7 +210,7 @@ void W_Grenade_Attack2 (void)
 
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_grenadelauncher_secondary_ammo");
-       W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", cvar("g_balance_grenadelauncher_secondary_damage"));
+       W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", CHAN_WEAPON, cvar("g_balance_grenadelauncher_secondary_damage"));
        w_shotdir = v_forward; // no TrueAim for grenades please
 
        pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
index 587c9fccc04b4a2de5528d23aa394f63dda06ec0..d5b2592e2ed34fe1ea9f8e003fc04764ccc8e649 100644 (file)
@@ -46,7 +46,7 @@ void W_Hagar_Attack (void)
 
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_hagar_primary_ammo");
-       W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav", cvar("g_balance_hagar_primary_damage"));
+       W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav", CHAN_WEAPON, cvar("g_balance_hagar_primary_damage"));
 
        pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
@@ -81,8 +81,7 @@ void W_Hagar_Attack2 (void)
 
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_hagar_secondary_ammo");
-       W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav", cvar("g_balance_hagar_secondary_damage"));
-       //W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav"); // TODO: move model a little to the right
+       W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav", CHAN_WEAPON, cvar("g_balance_hagar_secondary_damage"));
 
        pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
index 6aaf174147142b1f70212fd276274cbec9c5c053..a92727fbeec7024c21f7a749e939a676ca53a845 100644 (file)
@@ -40,7 +40,7 @@ void W_HLAC_Attack (void)
     if(self.crouch)
         spread = spread * cvar("g_balance_hlac_primary_spread_crouchmod");
 
-       W_SetupShot (self, FALSE, 3, "weapons/lasergun_fire.wav", cvar("g_balance_hlac_primary_damage"));
+       W_SetupShot (self, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON, cvar("g_balance_hlac_primary_damage"));
        pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
        if (!g_norecoil)
        {
@@ -89,7 +89,7 @@ void W_HLAC_Attack2f (void)
     if(self.crouch)
         spread = spread * cvar("g_balance_hlac_secondary_spread_crouchmod");
 
-       W_SetupShot (self, FALSE, 3, "weapons/lasergun_fire.wav", cvar("g_balance_hlac_secondary_damage"));
+       W_SetupShot (self, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON, cvar("g_balance_hlac_secondary_damage"));
        pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
        missile = spawn ();
index 334e434c8afa9526774aab288d2ad2dfcbfa6dd5..5b1cf61350a1421b379f2a5f52846bc253e3365b 100644 (file)
@@ -64,7 +64,7 @@ void W_Hook_Attack2()
 
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_cells = self.ammo_cells - cvar("g_balance_hook_secondary_ammo");
-       W_SetupShot (self, FALSE, 4, "weapons/hookbomb_fire.wav", cvar("g_balance_hook_secondary_damage"));
+       W_SetupShot (self, FALSE, 4, "weapons/hookbomb_fire.wav", CHAN_WEAPON, cvar("g_balance_hook_secondary_damage"));
 
        gren = spawn ();
        gren.owner = self;
index db11eb395c3a370dce30aa21749e6a4199662702..f743c426dfb32e0e11e9a58150d36bfea1ee6430 100644 (file)
@@ -44,11 +44,11 @@ void W_Laser_Attack (float issecondary)
        s_forward = v_forward * cos(a * DEG2RAD) + v_up * sin(a * DEG2RAD);
 
        if(nodamage)
-               W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", 0);
+               W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON2, 0);
        else if(issecondary == 1)
-               W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", cvar("g_balance_laser_secondary_damage"));
+               W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON2, cvar("g_balance_laser_secondary_damage"));
        else
-               W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", cvar("g_balance_laser_primary_damage"));
+               W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON2, cvar("g_balance_laser_primary_damage"));
        pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
        missile = spawn ();
@@ -139,7 +139,7 @@ void gauntletbeam_think()
        float dt;
        dt = frametime;
 
-       W_SetupShot_Range(self.owner, TRUE, 0, "", damage * dt, myradius);
+       W_SetupShot_Range(self.owner, TRUE, 0, "", 0, damage * dt, myradius);
        WarpZone_traceline_antilag(self.owner, w_shotorg, w_shotend, MOVE_NORMAL, self.owner, ANTILAG_LATENCY(self.owner));
 
        // apply the damage
@@ -147,8 +147,9 @@ void gauntletbeam_think()
        {
                vector force;
                force = w_shotdir * myforce;
+               if(accuracy_isgooddamage(self.owner, trace_ent))
+                       accuracy_add(self.owner, WEP_LASER, 0, damage * dt);
                Damage (trace_ent, self.owner, self.owner, damage * dt, WEP_LASER | HITTYPE_SECONDARY, trace_endpos, force * dt);
-               Damage_RecordDamage(self.owner, WEP_LASER | HITTYPE_SECONDARY, damage * dt);
        }
 
        // draw effect
@@ -228,7 +229,7 @@ float w_laser(float req)
                if (self.BUTTON_ATCK)
                if (weapon_prepareattack(0, cvar("g_balance_laser_primary_refire")))
                {
-                       W_Laser_Attack(1);
+                       W_Laser_Attack(0);
                        weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_laser_primary_animtime"), w_ready);
                }
                if (self.BUTTON_ATCK2)
index 135073bf55c8333b0098f19220dff399f7041581..0a06064632deae27be38ad60391fd434326c480a 100644 (file)
@@ -217,7 +217,7 @@ void W_Mine_Attack (void)
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_minelayer_ammo");
 
-       W_SetupShot_ProjectileSize (self, '-4 -4 -4', '4 4 4', FALSE, 5, "weapons/mine_fire.wav", cvar("g_balance_minelayer_damage"));
+       W_SetupShot_ProjectileSize (self, '-4 -4 -4', '4 4 4', FALSE, 5, "weapons/mine_fire.wav", CHAN_WEAPON, cvar("g_balance_minelayer_damage"));
        pointparticles(particleeffectnum("rocketlauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
        mine = WarpZone_RefSys_SpawnSameRefSys(self);
index 1c9f0bd70b46ad386c1865bf21c86fa1a7dc947f..ce97b02451210d7db63a342db4eb03254e98b2b8 100644 (file)
@@ -9,7 +9,7 @@ void W_MinstaNex_Attack (void)
        float flying;
        flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last
 
-       W_SetupShot (self, TRUE, 0, "weapons/minstanexfire.wav", 0);
+       W_SetupShot (self, TRUE, 0, "weapons/minstanexfire.wav", CHAN_WEAPON, 10000);
 
        yoda = 0;
        damage_goodhits = 0;
index 31998e5092a632d0a30ceaae5c2f88847e3e6d54..61f4dc2929feacf92f54270c8c185171aac8e666 100644 (file)
@@ -54,7 +54,7 @@ void W_Nex_Attack (float issecondary)
        mydmg *= charge;
        myforce *= charge;
 
-       W_SetupShot (self, TRUE, 5, "weapons/nexfire.wav", mydmg);
+       W_SetupShot (self, TRUE, 5, "weapons/nexfire.wav", CHAN_WEAPON, mydmg);
 
        yoda = 0;
        FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_NEX);
index 65442b21b957caa3b667202c422d9add5497e82b..fc7fde3fb8d0e623991cfb4c95df67d6f389e9d2 100644 (file)
@@ -160,7 +160,7 @@ void W_Porto_Attack (void)
 
        if not(self.items & IT_UNLIMITED_SUPERWEAPONS)
                self.weapons = self.weapons - (self.weapons & WEPBIT_PORTO);
-       W_SetupShot (self, FALSE, 4, "porto/fire.wav", 0);
+       W_SetupShot (self, FALSE, 4, "porto/fire.wav", CHAN_WEAPON, 0);
        // always shoot from the eye
        w_shotdir = v_forward;
        w_shotorg = self.origin + self.view_ofs + ((w_shotorg - self.origin - self.view_ofs) * v_forward) * v_forward;
index c29fda3a2af78575b5d18b9acfbe5db1ce57a425..b42a4482899571dbf2967c8519855f3478e8b59c 100644 (file)
@@ -262,7 +262,7 @@ void W_Rocket_Attack (void)
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_rocketlauncher_ammo");
 
-       W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 5, "weapons/rocket_fire.wav", cvar("g_balance_rocketlauncher_damage"));
+       W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 5, "weapons/rocket_fire.wav", CHAN_WEAPON, cvar("g_balance_rocketlauncher_damage"));
        pointparticles(particleeffectnum("rocketlauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
        missile = WarpZone_RefSys_SpawnSameRefSys(self);
index b74f60e00e28437bb33ab7f016443640bfb134dc..09c7ec85acd080acec35f836b77eb8c3cb8482ae 100644 (file)
@@ -164,7 +164,7 @@ void Seeker_Fire_Missile(vector f_diff)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_seeker_missile_ammo");
 
        makevectors(self.v_angle);
-       W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/seeker_fire.wav", cvar("g_balance_seeker_missile_damage"));
+       W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/seeker_fire.wav", CHAN_WEAPON, 0);
        w_shotorg += f_diff;
        pointparticles(particleeffectnum("seeker_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
@@ -300,7 +300,7 @@ void Seeker_Fire_Tag()
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_seeker_tag_ammo");
 
-       W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/tag_fire.wav", 0);
+       W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/tag_fire.wav", CHAN_WEAPON, cvar("g_balance_seeker_missile_damage") * cvar("g_balance_seeker_missile_count"));
 
        missile                 = spawn();
        missile.owner           = self;
@@ -376,7 +376,7 @@ void Seeker_Fire_Flac()
                        f_diff = '+1.25 +3.75 0';
                        break;
        }
-       W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/flac_fire.wav", cvar("g_balance_seeker_flac_damage"));
+       W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/flac_fire.wav", CHAN_WEAPON, cvar("g_balance_seeker_flac_damage"));
        w_shotorg += f_diff;
 
        pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
index c5f1ed12c02143b993bb15d92e7c3d27c7c4d5b1..17bce7f77aa497020ff33486f38b47e0e30d834c 100644 (file)
@@ -22,7 +22,7 @@ void W_Shotgun_Attack (void)
        bulletspeed = cvar("g_balance_shotgun_primary_speed");
        bulletconstant = cvar("g_balance_shotgun_primary_bulletconstant");
 
-       W_SetupShot (self, cvar("g_antilag_bullets") && bulletspeed >= cvar("g_antilag_bullets"), 5, "weapons/shotgun_fire.wav", cvar("g_balance_shotgun_primary_damage"));
+       W_SetupShot (self, cvar("g_antilag_bullets") && bulletspeed >= cvar("g_antilag_bullets"), 5, "weapons/shotgun_fire.wav", CHAN_WEAPON, d * bullets);
        for (sc = 0;sc < bullets;sc = sc + 1)
                fireBallisticBullet(w_shotorg, w_shotdir, spread, bulletspeed, 5, d, 0, f, WEP_SHOTGUN, 0, 1, bulletconstant);
        endFireBallisticBullet();
@@ -69,8 +69,9 @@ void shotgun_meleethink (void)
        {
                vector force;
                force = angle * cvar("g_balance_shotgun_secondary_force");
+               if(accuracy_isgooddamage(self.owner, trace_ent))
+                       accuracy_add(self.owner, WEP_SHOTGUN, 0, cvar("g_balance_shotgun_secondary_damage") * min(1, f + 1));
                Damage (trace_ent, self.owner, self.owner, cvar("g_balance_shotgun_secondary_damage") * min(1, f + 1), WEP_SHOTGUN | HITTYPE_SECONDARY , self.owner.origin + self.owner.view_ofs, force);
-               Damage_RecordDamage(self.owner, WEP_SHOTGUN | HITTYPE_SECONDARY, cvar("g_balance_shotgun_secondary_damage") * min(1, f + 1));
                remove(self);
        }
        else if(time >= self.cnt + cvar("g_balance_shotgun_secondary_melee_time")) // missed, remove ent
@@ -89,7 +90,7 @@ void W_Shotgun_Attack2 (void)
        meleetemp.owner = self;
        meleetemp.think = shotgun_meleethink;
        meleetemp.nextthink = time + cvar("g_balance_shotgun_secondary_melee_delay");
-       W_SetupShot_Range(self, TRUE, 0, "", cvar("g_balance_shotgun_secondary_damage"), cvar("g_balance_shotgun_secondary_melee_range"));
+       W_SetupShot_Range(self, TRUE, 0, "", 0, cvar("g_balance_shotgun_secondary_damage"), cvar("g_balance_shotgun_secondary_melee_range"));
 }
 
 void spawnfunc_weapon_shotgun(); // defined in t_items.qc
index 491030fcbcc486cfde1249c03d5d560e09b22bb4..c9cfdc4a49951c1f848394f1c727132717bb5490 100644 (file)
@@ -131,7 +131,7 @@ void W_Tuba_Attack(float hittype)
 {
        vector o;
        float c, n;
-       W_SetupShot(self, FALSE, 2, "", cvar("g_balance_tuba_damage"));
+       W_SetupShot(self, FALSE, 2, "", 0, cvar("g_balance_tuba_damage"));
        if(self.tuba_notecount)
        {
                self.tuba_notecount = FALSE;
index 676f64f780d1fd42bfd09d4afbc80bda75bf9a7c..1b1ab55a211798be1c18930c55d3dad1cd7331ca 100644 (file)
@@ -50,7 +50,7 @@ void W_Uzi_Attack (float deathtype)
                else
                        self.ammo_nails = self.ammo_nails - cvar("g_balance_uzi_sustained_ammo");
        }
-       W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", cvar("g_balance_uzi_first_damage"));
+       W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", CHAN_WEAPON, ((self.uzi_bulletcounter == 1) ? cvar("g_balance_uzi_first_damage") : cvar("g_balance_uzi_sustained_damage")));
        if (!g_norecoil)
        {
                self.punchangle_x = random () - 0.5;
@@ -121,7 +121,7 @@ void uzi_mode1_fire_auto()
                return;
        }
        
-       W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", cvar("g_balance_uzi_first_damage"));
+       W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", CHAN_WEAPON, cvar("g_balance_uzi_sustained_damage"));
        if (!g_norecoil)
        {
                self.punchangle_x = random () - 0.5;
@@ -149,7 +149,7 @@ void uzi_mode1_fire_auto()
 
 void uzi_mode1_fire_burst()
 {
-       W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", cvar("g_balance_uzi_first_damage"));
+       W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", CHAN_WEAPON, cvar("g_balance_uzi_sustained_damage"));
        if (!g_norecoil)
        {
                self.punchangle_x = random () - 0.5;