Merge remote branch 'refs/remotes/origin/fruitiex/racefixes'
authorRudolf Polzer <divverent@alientrap.org>
Wed, 3 Nov 2010 20:42:30 +0000 (21:42 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 3 Nov 2010 20:43:07 +0000 (21:43 +0100)
Conflicts:
defaultXonotic.cfg
qcsrc/server/defs.qh

108 files changed:
Makefile
balanceTest.cfg [new file with mode: 0644]
balanceXonotic.cfg
balancetZork.cfg [new file with mode: 0644]
defaultXonotic.cfg
effectinfo.txt
gfx/crosshair1.tga
gfx/crosshair10.tga
gfx/crosshair11.tga
gfx/crosshair12.tga
gfx/crosshair13.tga
gfx/crosshair14.tga
gfx/crosshair15.tga
gfx/crosshair16.tga
gfx/crosshair17.tga
gfx/crosshair18.tga
gfx/crosshair19.tga
gfx/crosshair2.tga
gfx/crosshair20.tga
gfx/crosshair21.tga [deleted file]
gfx/crosshair3.tga
gfx/crosshair4.tga
gfx/crosshair5.tga
gfx/crosshair6.tga
gfx/crosshair7.tga
gfx/crosshair8.tga
gfx/crosshair9.tga
gfx/crosshairdot.tga
gfx/menu/default/icon_aeslevel0.tga [new file with mode: 0644]
gfx/menu/default/icon_aeslevel1.tga [new file with mode: 0644]
gfx/menu/default/icon_aeslevel2.tga [new file with mode: 0644]
gfx/menu/default/icon_aeslevel3.tga [new file with mode: 0644]
gfx/menu/default/icon_aeslevel4.tga [new file with mode: 0644]
gfx/menu/default/icon_aeslevel5.tga [new file with mode: 0644]
gfx/menu/default/icon_pure0.tga [new file with mode: 0644]
gfx/menu/default/icon_pure1.tga [new file with mode: 0644]
gfx/menu/luminos/icon_aeslevel0.tga [new file with mode: 0644]
gfx/menu/luminos/icon_aeslevel1.tga [new file with mode: 0644]
gfx/menu/luminos/icon_aeslevel2.tga [new file with mode: 0644]
gfx/menu/luminos/icon_aeslevel3.tga [new file with mode: 0644]
gfx/menu/luminos/icon_aeslevel4.tga [new file with mode: 0644]
gfx/menu/luminos/icon_aeslevel5.tga [new file with mode: 0644]
gfx/menu/luminos/icon_pure0.tga [new file with mode: 0644]
gfx/menu/luminos/icon_pure1.tga [new file with mode: 0644]
gfx/menu/xaw/icon_aeslevel0.tga [new file with mode: 0644]
gfx/menu/xaw/icon_aeslevel1.tga [new file with mode: 0644]
gfx/menu/xaw/icon_aeslevel2.tga [new file with mode: 0644]
gfx/menu/xaw/icon_aeslevel3.tga [new file with mode: 0644]
gfx/menu/xaw/icon_aeslevel4.tga [new file with mode: 0644]
gfx/menu/xaw/icon_aeslevel5.tga [new file with mode: 0644]
gfx/menu/xaw/icon_pure0.tga [new file with mode: 0644]
gfx/menu/xaw/icon_pure1.tga [new file with mode: 0644]
qcsrc/client/Defs.qc
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/autocvars.qh
qcsrc/client/gibs.qc
qcsrc/client/hook.qc
qcsrc/client/hud.qc
qcsrc/client/hud.qh
qcsrc/client/miscfunctions.qc
qcsrc/client/scoreboard.qc
qcsrc/client/teamradar.qc
qcsrc/client/tuba.qc
qcsrc/client/wall.qc
qcsrc/common/constants.qh
qcsrc/common/items.qc
qcsrc/common/items.qh
qcsrc/common/mapinfo.qc
qcsrc/common/util-pre.qh
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/menu/skin-customizables.inc
qcsrc/menu/xonotic/crosshairbutton.c
qcsrc/menu/xonotic/dialog_multiplayer_create_advanced.c
qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup_waypoint.c
qcsrc/menu/xonotic/dialog_settings_effects.c
qcsrc/menu/xonotic/playermodel.c
qcsrc/menu/xonotic/serverlist.c
qcsrc/server/autocvars.qh
qcsrc/server/bot/scripting.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_physics.qc
qcsrc/server/cl_player.qc
qcsrc/server/cl_weapons.qc
qcsrc/server/clientcommands.qc
qcsrc/server/defs.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_hook.qc
qcsrc/server/g_tetris.qc
qcsrc/server/g_world.qc
qcsrc/server/gamecommand.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/mutator_rocketflying.qc
qcsrc/server/progs.src
qcsrc/server/scores.qc
qcsrc/server/sv_main.qc
qcsrc/server/t_items.qc
qcsrc/server/t_plats.qc
qcsrc/server/w_all.qc
qcsrc/server/w_campingrifle.qc
qcsrc/server/w_seeker.qc
qcsrc/server/w_tuba.qc
qcsrc/warpzonelib/client.qc
qcsrc/warpzonelib/common.qc
qcsrc/warpzonelib/server.qc

index 50a9f0b02443492731c7d9694c5ed8d3c491055d..aa4554f19c70f2b3b109a915fded99b71629efd8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,8 @@ ZIPEXCLUDE ?= -x\!*.pk3 -xr\!\.svn -x\!qcsrc
 DIFF ?= diff
 
 FTEQCCFLAGS_WATERMARK ?= -DWATERMARK='"^1$(shell git describe) TEST BUILD"'
-FTEQCCFLAGS ?= -Werror -Wall -Wno-mundane -O3 -Ono-c -Ono-cs -flo $(FTEQCCFLAGS_EXTRA) $(FTEQCCFLAGS_WATERMARK)
+#FTEQCCFLAGS ?= -Werror -Wno-Q205 -Wno-Q302 -O3 -Ono-c -Ono-cs $(FTEQCCFLAGS_EXTRA) $(FTEQCCFLAGS_WATERMARK)
+FTEQCCFLAGS ?= -Wno-Q302 -O3 -Ono-c -Ono-cs $(FTEQCCFLAGS_EXTRA) $(FTEQCCFLAGS_WATERMARK)
 FTEQCCFLAGS_PROGS ?=
 FTEQCCFLAGS_MENU ?=
 
diff --git a/balanceTest.cfg b/balanceTest.cfg
new file mode 100644 (file)
index 0000000..897b569
--- /dev/null
@@ -0,0 +1,704 @@
+// {{{ 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 125
+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 45
+set g_pickup_nails 120
+set g_pickup_nails_weapon 60
+set g_pickup_nails_max 300
+set g_pickup_rockets 25
+set g_pickup_rockets_weapon 15
+set g_pickup_rockets_max 150
+set g_pickup_cells 30
+set g_pickup_cells_weapon 20
+set g_pickup_cells_max 200
+set g_pickup_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 5
+set g_pickup_respawntime_ammo 25
+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.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 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.65
+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.20
+set g_balance_falldamage_maxdamage 15
+// }}}
+
+// {{{ powerups
+set g_balance_powerup_invincible_takedamage 0.3
+set g_balance_powerup_invincible_time 30
+set g_balance_powerup_strength_damage 3
+set g_balance_powerup_strength_force 4
+set g_balance_powerup_strength_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 // dps 33, hope that's not too high
+set g_balance_laser_primary_edgedamage 20
+set g_balance_laser_primary_force 270
+set g_balance_laser_primary_radius 60
+set g_balance_laser_primary_speed 4000
+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_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
+// }}}
+// {{{ shotgun
+set g_balance_shotgun_primary_bullets 10
+set g_balance_shotgun_primary_damage 5
+set g_balance_shotgun_primary_force 60
+set g_balance_shotgun_primary_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_first 1
+set g_balance_uzi_first_damage 30
+set g_balance_uzi_first_force 50
+set g_balance_uzi_first_spread 0.015
+set g_balance_uzi_first_refire 0.3
+set g_balance_uzi_first_ammo 1
+set g_balance_uzi_sustained_damage 15
+set g_balance_uzi_sustained_force 10
+set g_balance_uzi_sustained_spread 0.08
+set g_balance_uzi_sustained_refire 0.1
+set g_balance_uzi_sustained_ammo 1
+set g_balance_uzi_speed 18000
+set g_balance_uzi_bulletconstant 115 // 13.1qu
+// }}}
+// {{{ mortar
+set g_balance_grenadelauncher_primary_type 0
+set g_balance_grenadelauncher_primary_damage 60
+set g_balance_grenadelauncher_primary_edgedamage 38
+set g_balance_grenadelauncher_primary_force 400
+set g_balance_grenadelauncher_primary_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_bouncefactor 0.5
+set g_balance_grenadelauncher_primary_bouncestop 0.075
+set g_balance_grenadelauncher_primary_remote_minbouncecnt 0
+
+set g_balance_grenadelauncher_secondary_type 1
+set g_balance_grenadelauncher_secondary_damage 70
+set g_balance_grenadelauncher_secondary_edgedamage 38
+set g_balance_grenadelauncher_secondary_force 400
+set g_balance_grenadelauncher_secondary_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_bouncefactor 0.5
+set g_balance_grenadelauncher_secondary_bouncestop 0.075
+set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
+// }}}
+// {{{ 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 1
+set g_balance_electro_primary_damage 110
+set g_balance_electro_primary_edgedamage 0
+set g_balance_electro_primary_force 425
+set g_balance_electro_primary_force_up 125
+set g_balance_electro_primary_radius 850
+set g_balance_electro_primary_comboradius 150
+set g_balance_electro_primary_speed 0
+set g_balance_electro_primary_spread 0
+set g_balance_electro_primary_lifetime 0
+set g_balance_electro_primary_refire 0.4
+set g_balance_electro_primary_animtime 0.03333333
+set g_balance_electro_primary_ammo 7
+set g_balance_electro_primary_range 800
+set g_balance_electro_primary_falloff_mindist 255 // 0.3 * radius
+set g_balance_electro_primary_falloff_maxdist 850
+set g_balance_electro_primary_falloff_halflifedist 425
+set g_balance_electro_secondary_damage 25
+set g_balance_electro_secondary_edgedamage 0
+set g_balance_electro_secondary_force 100
+set g_balance_electro_secondary_radius 100
+set g_balance_electro_secondary_speed 500
+set g_balance_electro_secondary_speed_up 150
+set g_balance_electro_secondary_speed_z 0
+set g_balance_electro_secondary_spread 0.08
+set g_balance_electro_secondary_lifetime 3.5
+set g_balance_electro_secondary_refire 0.1
+set g_balance_electro_secondary_refire2 2
+set g_balance_electro_secondary_animtime 0.2
+set g_balance_electro_secondary_ammo 2
+set g_balance_electro_secondary_health 10
+set g_balance_electro_secondary_damageforcescale 4
+set g_balance_electro_secondary_count 3
+set g_balance_electro_combo_damage 60
+set g_balance_electro_combo_edgedamage 0
+set g_balance_electro_combo_force 80
+set g_balance_electro_combo_radius 250
+set g_balance_electro_combo_comboradius 0
+set g_balance_electro_combo_speed 400
+// }}}
+// {{{ crylink
+set g_balance_crylink_primary_damage 5
+set g_balance_crylink_primary_edgedamage 2.5
+set g_balance_crylink_primary_force 25
+set g_balance_crylink_primary_radius 50
+set g_balance_crylink_primary_speed 2500
+set g_balance_crylink_primary_spread 0.04
+set g_balance_crylink_primary_shots 12
+set g_balance_crylink_primary_bounces 1
+set g_balance_crylink_primary_refire 1
+set g_balance_crylink_primary_animtime 0.4
+set g_balance_crylink_primary_ammo 2
+set g_balance_crylink_primary_bouncedamagefactor 0.2
+
+set g_balance_crylink_primary_middle_lifetime 5 // range: 10000 full, fades to 20000
+set g_balance_crylink_primary_middle_fadetime 5
+set g_balance_crylink_primary_star_lifetime 2 // range: 800 full, fades to 1300
+set g_balance_crylink_primary_star_fadetime 0.25
+set g_balance_crylink_primary_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_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 0.75
+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.7
+set g_balance_nex_secondary_damage 100
+set g_balance_nex_secondary_force 600
+set g_balance_nex_secondary_refire 1.5
+set g_balance_nex_secondary_animtime 0.3
+set g_balance_nex_secondary_ammo 5
+set g_balance_nex_secondary_damagefalloff_mindist 0
+set g_balance_nex_secondary_damagefalloff_maxdist 0
+set g_balance_nex_secondary_damagefalloff_halflife 0
+set g_balance_nex_secondary_damagefalloff_forcehalflife 0
+
+set g_balance_nex_charge 1
+set g_balance_nex_charge_mindmg 10
+set g_balance_nex_charge_start 0
+set g_balance_nex_charge_rate 0.35
+set g_balance_nex_charge_limit 0.5
+set g_balance_nex_charge_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 30
+set g_balance_hagar_primary_edgedamage 15
+set g_balance_hagar_primary_force 50
+set g_balance_hagar_primary_radius 65
+set g_balance_hagar_primary_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 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 110
+set g_balance_rocketlauncher_edgedamage 25
+set g_balance_rocketlauncher_force 350
+set g_balance_rocketlauncher_radius 125
+set g_balance_rocketlauncher_speed 1000
+set g_balance_rocketlauncher_speedaccel 0
+set g_balance_rocketlauncher_speedstart 1000
+set g_balance_rocketlauncher_lifetime 5
+set g_balance_rocketlauncher_refire 1
+set g_balance_rocketlauncher_animtime 0.4
+set g_balance_rocketlauncher_ammo 3
+set g_balance_rocketlauncher_health 10
+set g_balance_rocketlauncher_damageforcescale 0
+set g_balance_rocketlauncher_detonatedelay -1 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
+set g_balance_rocketlauncher_guiderate 45 // max degrees per second
+set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
+set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
+set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
+set g_balance_rocketlauncher_guidestop 0 // stop guiding when firing again
+set g_balance_rocketlauncher_laserguided_speed 1000 //650
+set g_balance_rocketlauncher_laserguided_speedaccel 0
+set g_balance_rocketlauncher_laserguided_speedstart 1000
+set g_balance_rocketlauncher_laserguided_turnrate 0.75 //0.5
+set g_balance_rocketlauncher_laserguided_allow_steal 1
+set g_balance_rocketlauncher_remote_damage 90
+set g_balance_rocketlauncher_remote_edgedamage 20
+set g_balance_rocketlauncher_remote_radius 125
+set g_balance_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 75
+set g_balance_campingrifle_primary_headshotaddeddamage 75
+set g_balance_campingrifle_primary_spread 0
+set g_balance_campingrifle_primary_force 2
+set g_balance_campingrifle_primary_speed 40000
+set g_balance_campingrifle_primary_lifetime 5
+set g_balance_campingrifle_primary_refire 1.5
+set g_balance_campingrifle_primary_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 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.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 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
index 0dcdac942024c96ab403a0deb8f205d66c116be4..a421e98dc7940ce03c5d444d024623abaa17d5e0 100644 (file)
@@ -260,12 +260,12 @@ set g_balance_shotgun_secondary_animtime 1
 // }}}
 // {{{ uzi
 set g_balance_uzi_first 1
-set g_balance_uzi_first_damage 16
+set g_balance_uzi_first_damage 18
 set g_balance_uzi_first_force 35
 set g_balance_uzi_first_spread 0.03
 set g_balance_uzi_first_refire 0.2
 set g_balance_uzi_first_ammo 2
-set g_balance_uzi_sustained_damage 9
+set g_balance_uzi_sustained_damage 10
 set g_balance_uzi_sustained_force 7.5
 set g_balance_uzi_sustained_spread 0.1
 set g_balance_uzi_sustained_refire 0.1
@@ -338,7 +338,7 @@ set g_balance_minelayer_remote_force 300
 // }}}
 // {{{ electro // TODO
 set g_balance_electro_lightning 1
-set g_balance_electro_primary_damage 85
+set g_balance_electro_primary_damage 90
 set g_balance_electro_primary_edgedamage 0
 set g_balance_electro_primary_force 425
 set g_balance_electro_primary_force_up 125
@@ -418,7 +418,7 @@ set g_balance_crylink_secondary_line_lifetime 2 // range: 4000 full, fades to 80
 set g_balance_crylink_secondary_line_fadetime 2
 // }}}
 // {{{ nex
-set g_balance_nex_primary_damage 120
+set g_balance_nex_primary_damage 100
 set g_balance_nex_primary_force 500
 set g_balance_nex_primary_refire 1
 set g_balance_nex_primary_animtime 0.75
@@ -492,7 +492,7 @@ set g_balance_rocketlauncher_animtime 0.4
 set g_balance_rocketlauncher_ammo 3
 set g_balance_rocketlauncher_health 0
 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_detonatedelay 0.05 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
 set g_balance_rocketlauncher_guiderate 45 // max degrees per second
 set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
 set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
diff --git a/balancetZork.cfg b/balancetZork.cfg
new file mode 100644 (file)
index 0000000..7ab11ed
--- /dev/null
@@ -0,0 +1,706 @@
+// {{{ 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 125
+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 45
+set g_pickup_nails 120
+set g_pickup_nails_weapon 60
+set g_pickup_nails_max 300
+set g_pickup_rockets 25
+set g_pickup_rockets_weapon 15
+set g_pickup_rockets_max 150
+set g_pickup_cells 30
+set g_pickup_cells_weapon 20
+set g_pickup_cells_max 200
+set g_pickup_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 5
+set g_pickup_respawntime_ammo 25
+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.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 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.65
+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.20
+set g_balance_falldamage_maxdamage 15
+// }}}
+
+// {{{ powerups
+set g_balance_powerup_invincible_takedamage 0.3
+set g_balance_powerup_invincible_time 30
+set g_balance_powerup_strength_damage 3
+set g_balance_powerup_strength_force 4
+set g_balance_powerup_strength_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 // dps 33, hope that's not too high
+set g_balance_laser_primary_edgedamage 20
+set g_balance_laser_primary_force 270
+set g_balance_laser_primary_radius 60
+set g_balance_laser_primary_speed 4000
+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_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
+// }}}
+// {{{ shotgun
+set g_balance_shotgun_primary_bullets 10
+set g_balance_shotgun_primary_damage 5
+set g_balance_shotgun_primary_force 60
+set g_balance_shotgun_primary_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_first 1
+set g_balance_uzi_first_damage 30
+set g_balance_uzi_first_force 50
+set g_balance_uzi_first_spread 0.015
+set g_balance_uzi_first_refire 0.3
+set g_balance_uzi_first_ammo 1
+set g_balance_uzi_sustained_damage 15
+set g_balance_uzi_sustained_force 10
+set g_balance_uzi_sustained_spread 0.08
+set g_balance_uzi_sustained_refire 0.1
+set g_balance_uzi_sustained_ammo 1
+set g_balance_uzi_speed 18000
+set g_balance_uzi_bulletconstant 115 // 13.1qu
+// }}}
+// {{{ mortar
+set g_balance_grenadelauncher_primary_type 0
+set g_balance_grenadelauncher_primary_damage 60
+set g_balance_grenadelauncher_primary_edgedamage 38
+set g_balance_grenadelauncher_primary_force 400
+set g_balance_grenadelauncher_primary_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_bouncefactor 0.5
+set g_balance_grenadelauncher_primary_bouncestop 0.075
+set g_balance_grenadelauncher_primary_remote_minbouncecnt 0
+
+set g_balance_grenadelauncher_secondary_type 1
+set g_balance_grenadelauncher_secondary_damage 70
+set g_balance_grenadelauncher_secondary_edgedamage 38
+set g_balance_grenadelauncher_secondary_force 400
+set g_balance_grenadelauncher_secondary_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_bouncefactor 0.5
+set g_balance_grenadelauncher_secondary_bouncestop 0.075
+set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
+// }}}
+// {{{ 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 1
+set g_balance_electro_primary_damage 110
+set g_balance_electro_primary_edgedamage 0
+set g_balance_electro_primary_force 425
+set g_balance_electro_primary_force_up 125
+set g_balance_electro_primary_radius 850
+set g_balance_electro_primary_comboradius 150
+set g_balance_electro_primary_speed 0
+set g_balance_electro_primary_spread 0
+set g_balance_electro_primary_lifetime 0
+set g_balance_electro_primary_refire 0.4
+set g_balance_electro_primary_animtime 0.03333333
+set g_balance_electro_primary_ammo 7
+set g_balance_electro_primary_range 800
+set g_balance_electro_primary_falloff_mindist 255 // 0.3 * radius
+set g_balance_electro_primary_falloff_maxdist 850
+set g_balance_electro_primary_falloff_halflifedist 425
+
+set g_balance_electro_secondary_damage 25
+set g_balance_electro_secondary_edgedamage 0
+set g_balance_electro_secondary_force 100
+set g_balance_electro_secondary_radius 100
+set g_balance_electro_secondary_speed 500
+set g_balance_electro_secondary_speed_up 150
+set g_balance_electro_secondary_speed_z 0
+set g_balance_electro_secondary_spread 0.08
+set g_balance_electro_secondary_lifetime 3.5
+set g_balance_electro_secondary_refire 0.1
+set g_balance_electro_secondary_refire2 2
+set g_balance_electro_secondary_animtime 0.2
+set g_balance_electro_secondary_ammo 2
+set g_balance_electro_secondary_health 10
+set g_balance_electro_secondary_damageforcescale 4
+set g_balance_electro_secondary_count 3
+set g_balance_electro_combo_damage 60
+set g_balance_electro_combo_edgedamage 0
+set g_balance_electro_combo_force 80
+set g_balance_electro_combo_radius 250
+set g_balance_electro_combo_comboradius 0
+set g_balance_electro_combo_speed 400
+// }}}
+// {{{ crylink
+set g_balance_crylink_primary_damage 5
+set g_balance_crylink_primary_edgedamage 2.5
+set g_balance_crylink_primary_force 25
+set g_balance_crylink_primary_radius 50
+set g_balance_crylink_primary_speed 2500
+set g_balance_crylink_primary_spread 0.04
+set g_balance_crylink_primary_shots 12
+set g_balance_crylink_primary_bounces 1
+set g_balance_crylink_primary_refire 1
+set g_balance_crylink_primary_animtime 0.4
+set g_balance_crylink_primary_ammo 2
+set g_balance_crylink_primary_bouncedamagefactor 0.2
+
+set g_balance_crylink_primary_middle_lifetime 5 // range: 10000 full, fades to 20000
+set g_balance_crylink_primary_middle_fadetime 5
+set g_balance_crylink_primary_star_lifetime 2 // range: 800 full, fades to 1300
+set g_balance_crylink_primary_star_fadetime 0.25
+set g_balance_crylink_primary_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_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 0.75
+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.7
+set g_balance_nex_secondary_damage 100
+set g_balance_nex_secondary_force 600
+set g_balance_nex_secondary_refire 1.5
+set g_balance_nex_secondary_animtime 0.3
+set g_balance_nex_secondary_ammo 5
+set g_balance_nex_secondary_damagefalloff_mindist 0
+set g_balance_nex_secondary_damagefalloff_maxdist 0
+set g_balance_nex_secondary_damagefalloff_halflife 0
+set g_balance_nex_secondary_damagefalloff_forcehalflife 0
+
+set g_balance_nex_charge 1
+set g_balance_nex_charge_mindmg 10
+set g_balance_nex_charge_start 0
+set g_balance_nex_charge_rate 0.35
+set g_balance_nex_charge_limit 0.5
+set g_balance_nex_charge_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 30
+set g_balance_hagar_primary_edgedamage 15
+set g_balance_hagar_primary_force 50
+set g_balance_hagar_primary_radius 65
+set g_balance_hagar_primary_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 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 110
+set g_balance_rocketlauncher_edgedamage 25
+set g_balance_rocketlauncher_force 350
+set g_balance_rocketlauncher_radius 125
+set g_balance_rocketlauncher_speed 1000
+set g_balance_rocketlauncher_speedaccel 0
+set g_balance_rocketlauncher_speedstart 1000
+set g_balance_rocketlauncher_lifetime 5
+set g_balance_rocketlauncher_refire 1
+set g_balance_rocketlauncher_animtime 0.4
+set g_balance_rocketlauncher_ammo 3
+set g_balance_rocketlauncher_health 10
+set g_balance_rocketlauncher_damageforcescale 0
+set g_balance_rocketlauncher_detonatedelay -1 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
+set g_balance_rocketlauncher_guiderate 45 // max degrees per second
+set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
+set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
+set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
+set g_balance_rocketlauncher_guidestop 0 // stop guiding when firing again
+set g_balance_rocketlauncher_laserguided_speed 1000 //650
+set g_balance_rocketlauncher_laserguided_speedaccel 0
+set g_balance_rocketlauncher_laserguided_speedstart 1000
+set g_balance_rocketlauncher_laserguided_turnrate 0.75 //0.5
+set g_balance_rocketlauncher_laserguided_allow_steal 1
+set g_balance_rocketlauncher_remote_damage 90
+set g_balance_rocketlauncher_remote_edgedamage 20
+set g_balance_rocketlauncher_remote_radius 125
+set g_balance_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 75
+set g_balance_campingrifle_primary_headshotaddeddamage 75
+set g_balance_campingrifle_primary_spread 0
+set g_balance_campingrifle_primary_force 2
+set g_balance_campingrifle_primary_speed 40000
+set g_balance_campingrifle_primary_lifetime 5
+set g_balance_campingrifle_primary_refire 1.5
+set g_balance_campingrifle_primary_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 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.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 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
index 0a959f207e70034da2d3b5d899caf8df8528d36b..b340e5ddecb9b2c01c71d120c2dedcd02b48b9e6 100644 (file)
@@ -26,11 +26,13 @@ gameversion_max 65535 // git builds see all versions
 alias setreport "set \"$1\" \"$2\" ; sendcvar \"$1\""
 
 // detect dedicated server or client
-alias "_detect_dedicated_$qport" "$*"
+alias "_detect_dedicated_$qport" "${* asis}"
 alias "_detect_dedicated_0" ""
-alias if_dedicated "_detect_dedicated_$qport ${* asis}"
+alias _if_dedicated "_detect_dedicated_$qport ${* asis}"
 alias if_client "${* asis}"
-if_dedicated alias if_client ""
+alias if_dedicated "${* asis}"
+_if_dedicated alias if_client ""
+if_client alias if_dedicated ""
 
 seta g_configversion 0 "Configuration file version (used to upgrade settings) 0: first run, or previous start was <2.4.1  Later, it's overridden by config.cfg, version ranges are defined in config_update.cfg"
 
@@ -96,6 +98,8 @@ seta crosshair_size 0.35
 seta crosshair_dot 1
 seta crosshair_dot_alpha 1
 seta crosshair_dot_size 1
+seta crosshair_pickup 0.25
+seta crosshair_pickup_speed 4
 seta crosshair_per_weapon 0    "when 1, each gun will display a different crosshair"
 seta crosshair_color_override 0        "when 1, crosshair_color_* overrides the per-weapon color"
 seta crosshair_effect_speed -1 "how fast (in seconds) some crosshair effects should take place, 0 = instant, -1 = 2x weapon switch time"
@@ -107,109 +111,109 @@ seta crosshair_laser "" "crosshair to display when wielding the laser"
 seta crosshair_laser_color_red 1       "crosshair color red component to display when wielding the laser"
 seta crosshair_laser_color_green 0.35  "crosshair color green component to display when wielding the laser"
 seta crosshair_laser_color_blue 0.2    "crosshair color blue component to display when wielding the laser"
-seta crosshair_laser_color_alpha 0.75  "crosshair alpha value to display when wielding the laser"
+seta crosshair_laser_alpha 0.75        "crosshair alpha value to display when wielding the laser"
 seta crosshair_laser_size 0.4  "crosshair size when wielding the laser"
 seta crosshair_shotgun ""      "crosshair to display when wielding the shotgun"
 seta crosshair_shotgun_color_red 0.7   "crosshair color red component to display when wielding the shotgun"
 seta crosshair_shotgun_color_green 0.7 "crosshair color green component to display when wielding the shotgun"
 seta crosshair_shotgun_color_blue 0.7  "crosshair color blue component to display when wielding the shotgun"
-seta crosshair_shotgun_color_alpha 1.1 "crosshair alpha value to display when wielding the shotgun"
+seta crosshair_shotgun_alpha 1.1       "crosshair alpha value to display when wielding the shotgun"
 seta crosshair_shotgun_size 0.65       "crosshair size when wielding the shotgun"
 seta crosshair_uzi ""  "crosshair to display when wielding the machinegun"
 seta crosshair_uzi_color_red 0.4       "crosshair color red component to display when wielding the machinegun"
 seta crosshair_uzi_color_green 0.9     "crosshair color green component to display when wielding the machinegun"
 seta crosshair_uzi_color_blue 0.35     "crosshair color blue component to display when wielding the machinegun"
-seta crosshair_uzi_color_alpha 0.9     "crosshair alpha value to display when wielding the machinegun"
+seta crosshair_uzi_alpha 0.9   "crosshair alpha value to display when wielding the machinegun"
 seta crosshair_uzi_size 0.6    "crosshair size when wielding the machinegun"
 seta crosshair_grenadelauncher ""      "crosshair to display when wielding the mortar"
 seta crosshair_grenadelauncher_color_red 1     "crosshair color red component to display when wielding the mortar"
 seta crosshair_grenadelauncher_color_green 0.15        "crosshair color green component to display when wielding the mortar"
 seta crosshair_grenadelauncher_color_blue 0    "crosshair color blue component to display when wielding the mortar"
-seta crosshair_grenadelauncher_color_alpha 1.15        "crosshair alpha value to display when wielding the mortar"
+seta crosshair_grenadelauncher_alpha 1.15      "crosshair alpha value to display when wielding the mortar"
 seta crosshair_grenadelauncher_size 0.7        "crosshair size when wielding the mortar"
 seta crosshair_minelayer ""    "crosshair to display when wielding the mortar"
 seta crosshair_minelayer_color_red 0.75        "crosshair color red component to display when wielding the mortar"
 seta crosshair_minelayer_color_green 0.75      "crosshair color green component to display when wielding the mortar"
 seta crosshair_minelayer_color_blue 0  "crosshair color blue component to display when wielding the mortar"
-seta crosshair_minelayer_color_alpha 1.15      "crosshair alpha value to display when wielding the mortar"
+seta crosshair_minelayer_alpha 1.15    "crosshair alpha value to display when wielding the mortar"
 seta crosshair_minelayer_size 0.9      "crosshair size when wielding the mortar"
 seta crosshair_electro ""      "crosshair to display when wielding the electro"
 seta crosshair_electro_color_red 0.35  "crosshair color red component to display when wielding the electro"
 seta crosshair_electro_color_green 0.5 "crosshair color green component to display when wielding the electro"
 seta crosshair_electro_color_blue 1    "crosshair color blue component to display when wielding the electro"
-seta crosshair_electro_color_alpha 1   "crosshair alpha value to display when wielding the electro"
+seta crosshair_electro_alpha 1 "crosshair alpha value to display when wielding the electro"
 seta crosshair_electro_size 0.5        "crosshair size when wielding the electro"
 seta crosshair_crylink ""      "crosshair to display when wielding the crylink"
 seta crosshair_crylink_color_red 0.85  "crosshair color red component to display when wielding the crylink"
 seta crosshair_crylink_color_green 0.25        "crosshair color green component to display when wielding the crylink"
 seta crosshair_crylink_color_blue 1    "crosshair color blue component to display when wielding the crylink"
-seta crosshair_crylink_color_alpha 0.85        "crosshair alpha value to display when wielding the crylink"
+seta crosshair_crylink_alpha 0.85      "crosshair alpha value to display when wielding the crylink"
 seta crosshair_crylink_size 0.4        "crosshair size when wielding the crylink"
 seta crosshair_nex ""  "crosshair to display when wielding the nex gun"
 seta crosshair_nex_color_red 0 "crosshair color red component to display when wielding the nex gun"
 seta crosshair_nex_color_green 0.9     "crosshair color green component to display when wielding the nex gun"
 seta crosshair_nex_color_blue 1        "crosshair color blue component to display when wielding the nex gun"
-seta crosshair_nex_color_alpha 0.85    "crosshair alpha value to display when wielding the nex gun"
+seta crosshair_nex_alpha 0.85  "crosshair alpha value to display when wielding the nex gun"
 seta crosshair_nex_size 0.65   "crosshair size when wielding the nex gun"
 seta crosshair_hagar ""        "crosshair to display when wielding the hagar"
 seta crosshair_hagar_color_red 0.85    "crosshair color red component to display when wielding the hagar"
 seta crosshair_hagar_color_green 0.5   "crosshair color green component to display when wielding the hagar"
 seta crosshair_hagar_color_blue 0.35   "crosshair color blue component to display when wielding the hagar"
-seta crosshair_hagar_color_alpha 1     "crosshair alpha value to display when wielding the hagar"
+seta crosshair_hagar_alpha 1   "crosshair alpha value to display when wielding the hagar"
 seta crosshair_hagar_size 0.8  "crosshair size when wielding the hagar"
 seta crosshair_rocketlauncher ""       "crosshair to display when wielding the rocketlauncher"
 seta crosshair_rocketlauncher_color_red 1      "crosshair color red component to display when wielding the rocketlauncher"
 seta crosshair_rocketlauncher_color_green 0.75 "crosshair color green component to display when wielding the rocketlauncher"
 seta crosshair_rocketlauncher_color_blue 0.2   "crosshair color blue component to display when wielding the rocketlauncher"
-seta crosshair_rocketlauncher_color_alpha 1    "crosshair alpha value to display when wielding the rocketlauncher"
+seta crosshair_rocketlauncher_alpha 1  "crosshair alpha value to display when wielding the rocketlauncher"
 seta crosshair_rocketlauncher_size 0.5875      "crosshair size when wielding the rocketlauncher"
 seta crosshair_porto ""        "crosshair to display when wielding the porto"
 seta crosshair_porto_color_red 0.5     "crosshair color red component to display when wielding the porto"
 seta crosshair_porto_color_green 1     "crosshair color green component to display when wielding the porto"
 seta crosshair_porto_color_blue 0.5    "crosshair color blue component to display when wielding the porto"
-seta crosshair_porto_color_alpha 0.85  "crosshair alpha value to display when wielding the porto"
+seta crosshair_porto_alpha 0.85        "crosshair alpha value to display when wielding the porto"
 seta crosshair_porto_size 0.6  "crosshair size when wielding the porto"
 seta crosshair_minstanex ""    "crosshair to display when wielding the minstanex gun"
 seta crosshair_minstanex_color_red 0.65        "crosshair color red component to display when wielding the minstanex gun"
 seta crosshair_minstanex_color_green 0.65      "crosshair color green component to display when wielding the minstanex gun"
 seta crosshair_minstanex_color_blue 1  "crosshair color blue component to display when wielding the minstanex gun"
-seta crosshair_minstanex_color_alpha 1 "crosshair alpha value to display when wielding the minstanex gun"
+seta crosshair_minstanex_alpha 1       "crosshair alpha value to display when wielding the minstanex gun"
 seta crosshair_minstanex_size 0.4      "crosshair size when wielding the minstanex gun"
 seta crosshair_hook "" "crosshair to display when wielding the hook"
 seta crosshair_hook_color_red 0.65     "crosshair color red component to display when wielding the hook"
 seta crosshair_hook_color_green 1      "crosshair color green component to display when wielding the hook"
 seta crosshair_hook_color_blue 0.85    "crosshair color blue component to display when wielding the hook"
-seta crosshair_hook_color_alpha 0.85   "crosshair alpha value to display when wielding the hook"
+seta crosshair_hook_alpha 0.85 "crosshair alpha value to display when wielding the hook"
 seta crosshair_hook_size 0.5   "crosshair size when wielding the hook"
 seta crosshair_hlac "" "crosshair to display when wielding the H.L.A.C"
 seta crosshair_hlac_color_red 1        "crosshair color red component to display when wielding the H.L.A.C."
 seta crosshair_hlac_color_green 0.65   "crosshair color green component to display when wielding the H.L.A.C."
 seta crosshair_hlac_color_blue 0.2     "crosshair color blue component to display when wielding the H.L.A.C."
-seta crosshair_hlac_color_alpha 1      "crosshair alpha value to display when wielding the H.L.A.C."
+seta crosshair_hlac_alpha 1    "crosshair alpha value to display when wielding the H.L.A.C."
 seta crosshair_hlac_size 0.6   "crosshair size when wielding the H.L.A.C."
 seta crosshair_seeker ""       "crosshair to display when wielding the TAG Seeker"
 seta crosshair_seeker_color_red 1      "crosshair color red component to display when wielding the TAG seeker"
 seta crosshair_seeker_color_green 0.35 "crosshair color green component to display when wielding the TAG seeker"
 seta crosshair_seeker_color_blue 0.35  "crosshair color blue component to display when wielding the TAG seeker"
-seta crosshair_seeker_color_alpha 0.9  "crosshair alpha value to display when wielding the TAG seeker"
+seta crosshair_seeker_alpha 0.9        "crosshair alpha value to display when wielding the TAG seeker"
 seta crosshair_seeker_size 0.8 "crosshair size when wielding the TAG seeker"
 seta crosshair_campingrifle "" "crosshair to display when wielding the campingrifle"
 seta crosshair_campingrifle_color_red 0.85     "crosshair color red component to display when wielding the campingrifle"
 seta crosshair_campingrifle_color_green 0.5    "crosshair color green component to display when wielding the campingrifle"
 seta crosshair_campingrifle_color_blue 0.25    "crosshair color blue component to display when wielding the campingrifle"
-seta crosshair_campingrifle_color_alpha 1      "crosshair alpha value to display when wielding the campingrifle"
+seta crosshair_campingrifle_alpha 1    "crosshair alpha value to display when wielding the campingrifle"
 seta crosshair_campingrifle_size 0.65  "crosshair size when wielding the campingrifle"
 seta crosshair_tuba "" "crosshair to display when wielding the tuba"
 seta crosshair_tuba_color_red 0.85     "crosshair color red component to display when wielding the tuba"
 seta crosshair_tuba_color_green 0.5    "crosshair color green component to display when wielding the tuba"
 seta crosshair_tuba_color_blue 0.25    "crosshair color blue component to display when wielding the tuba"
-seta crosshair_tuba_color_alpha 1      "crosshair alpha value to display when wielding the tuba"
+seta crosshair_tuba_alpha 1    "crosshair alpha value to display when wielding the tuba"
 seta crosshair_tuba_size 1     "crosshair size when wielding the tuba"
 seta crosshair_fireball ""     "crosshair to display when wielding the fireball"
 seta crosshair_fireball_color_red 0.2  "crosshair color red component to display when wielding the fireball"
 seta crosshair_fireball_color_green 1.0        "crosshair color green component to display when wielding the fireball"
 seta crosshair_fireball_color_blue 0.2 "crosshair color blue component to display when wielding the fireball"
-seta crosshair_fireball_color_alpha 1  "crosshair alpha value to display when wielding the fireball"
+seta crosshair_fireball_alpha 1        "crosshair alpha value to display when wielding the fireball"
 seta crosshair_fireball_size 1 "crosshair size when wielding the fireball"
 seta crosshair_ring_size 2     "bullet counter ring size for Rifle, velocity ring for Nex"
 seta crosshair_campingrifle_bulletcounter_alpha 0.15
@@ -487,7 +491,7 @@ alias g_waypointeditor_unreachable "impulse 107"
 
 locs_enable 0
 pausable 0
-seta g_spawnshieldtime 0.3 "number of seconds you are invincible after you spawned, this shield is lost after you fire"
+seta g_spawnshieldtime 0.300000 "number of seconds you are invincible after you spawned, this shield is lost after you fire"
 seta g_antilag 2       "AntiLag (0 = no AntiLag, 1 = verified client side hit scan, 2 = server side hit scan in the past, 3 = unverified client side hit scan)"
 set g_antilag_nudge 0 "don't touch"
 set g_antilag_bullets 1 "Bullets AntiLag (0 = no AntiLag, 1 = server side hit scan in the past) - DO NOT TOUCH (severely changes weapon balance)"
@@ -639,8 +643,8 @@ seta timelimit_suddendeath 5 "number of minutes suddendeath mode lasts after all
 set g_tdm 0 "Team Deathmatch: the team who kills their opponents most often wins"
 
 seta teamplay_default 4 "default teamplay setting in team games. 1 = no friendly fire, self damage. 2 = friendly fire and self damage enabled. 3 = no friendly fire, but self damage enabled. 4 = obey the following four cvars"
-seta g_mirrordamage 0.3        "for teamplay 4: mirror damage factor"
-seta g_friendlyfire 0.1        "for teamplay 4: fiendly fire factor"
+seta g_mirrordamage 0.300000   "for teamplay 4: mirror damage factor"
+seta g_friendlyfire 0.100000   "for teamplay 4: fiendly fire factor"
 seta g_teamdamage_threshold 50 "for teamplay 4: threshold over which to apply mirror damage"
 seta g_teamdamage_resetspeed 30        "for teamplay 4: how fast player's teamdamage count decreases"
 
@@ -1338,6 +1342,9 @@ alias _userbind_call "${$1}"
 alias +userbind "_userbind_call userbind${1}_press"
 alias -userbind "_userbind_call userbind${1}_release"
 
+// we must change its default from 1.0 to 1 to be consistent with menuqc
+seta slowmo 1
+
 seta menu_skin "luminos"
 set menu_slowmo 1
 seta menu_sounds 0 "enables menu sound effects. 1 enables click sounds, 2 also enables hover sounds"
@@ -1591,8 +1598,8 @@ seta sv_status_privacy 1  "hide IP addresses from \"status\" replies shown to cli
 set g_maplist_allow_hidden 0           "allow hidden maps to be, e.g., voted for and in the maplist"
 set g_maplist_allow_frustrating 0      "allow impossible maps to be, e.g., voted for and in the maplist (if set to 2, ONLY impossible maps are allowed)"
 
-seta g_start_delay 0   "delay before the game starts, so everyone can join; recommended to set this to like 15 on a public server"
-       if_dedicated set g_start_delay 15
+if_client set g_start_delay 0  "delay before the game starts, so everyone can join; recommended to set this to like 15 on a public server"
+if_dedicated set g_start_delay 15      "delay before the game starts, so everyone can join; recommended to set this to like 15 on a public server"
 
 alias ons_map           "cl_cmd radar" // legacy alias
 alias radar             "cl_cmd radar"
@@ -1993,5 +2000,9 @@ r_font_hinting 1
 r_font_disable_freetype 0
 r_font_size_snapping 2
 
+// database management
+set sv_db_saveasdump 0 "write server.db in dump format (loads slower, easier to read/parse)"
+set cl_db_saveasdump 0 "write client.db in dump format (loads slower, easier to read/parse)"
+
 // uid2name
 seta cl_allow_uid2name -1 "-1 = ask if the player wants to disable/enable this feature, 0 = disable, 1 = enable uid2name (allows showing your name in race rankings for instance)"
index b36570aab4865bcd52cdabb25186d7b059b04fd9..b0f7b3dd7ca0390e04481a6a30d5977c8824266a 100644 (file)
@@ -4662,7 +4662,7 @@ lightcolor 0.9 0.9 0.2
 // used in qcsrc/server/w_common.qc:                           zcurveparticles_from_tracetoss(particleeffectnum("tr_bullet"), self.origin, trace_endpos, self.velocity)
 // used in qcsrc/client/projectile.qc:                 trailparticles(self, particleeffectnum("tr_bullet"), from, to)
 effect tr_rifle
-trailspacing 256
+trailspacing 128
 type spark
 color 0x800000 0xFF8020
 alpha 256 256 2560
@@ -4672,22 +4672,22 @@ velocitymultiplier 0.7
 effect tr_rifle
 notunderwater
 tex 0 8
-trailspacing 16
+trailspacing 8
 type static
 color 0x202020 0x404040
-size 2 2
-sizeincrease 0.2
+size 4 4
+sizeincrease 0.4
 alpha 256 256 256
 airfriction -4
 velocityjitter 4 4 4
 type smoke
 effect tr_rifle
 underwater
-trailspacing 64
+trailspacing 32
 type bubble
 tex 62 62
 color 0x404040 0x808080
-size 1 1
+size 2 2
 alpha 256 256 128
 gravity -0.125
 bounce 1.5
index d6c09e9b500f259374097d1bec4146b9cb343408..fd0f47738d4a013f4f1b38d5cb71ab6efe71d2e6 100644 (file)
Binary files a/gfx/crosshair1.tga and b/gfx/crosshair1.tga differ
index e7b5774e6f127cbf8a770c14a6a4c74c49f2c4ef..7d3f97a14cb6174ea0986e0e48a4477a1d762997 100644 (file)
Binary files a/gfx/crosshair10.tga and b/gfx/crosshair10.tga differ
index d1486adbe1a6bfb1c07e015b51d79780824cdf36..ed66200bcad124aeae15c00b84d7c40f428ea069 100644 (file)
Binary files a/gfx/crosshair11.tga and b/gfx/crosshair11.tga differ
index 95892abd6cb0279d62b8ebb27e38664885143262..a9e9128a9bbc0d83e8244b85830d3b72da3aaac4 100644 (file)
Binary files a/gfx/crosshair12.tga and b/gfx/crosshair12.tga differ
index e9f17a796c51ff3c6d134fd4ffc964f1aa2c0cfe..257e1499ed18dbbd5e3d8f95ad09b1364dc1c18a 100644 (file)
Binary files a/gfx/crosshair13.tga and b/gfx/crosshair13.tga differ
index b03e14d47a434da58ee829f2a7b9db5ef5115825..95a291490748dd2408372c5ca5c8d899b3dcfd04 100644 (file)
Binary files a/gfx/crosshair14.tga and b/gfx/crosshair14.tga differ
index 3fcdd0b7b52d2406a2e016f645688c2f9977316e..858bc07b9d915ef7e23a8b737e7495394c9bef2a 100644 (file)
Binary files a/gfx/crosshair15.tga and b/gfx/crosshair15.tga differ
index 8e9d2d9fab481cbe5a6d82dd49c1f0305570e940..7424f0a4c602938f78503e6b3cb642604a422902 100644 (file)
Binary files a/gfx/crosshair16.tga and b/gfx/crosshair16.tga differ
index c22551aa09a2aafdb255423d2a4fdc9cee1b51b6..385f6fb77514d39659e23a2352b7369efd3682cd 100644 (file)
Binary files a/gfx/crosshair17.tga and b/gfx/crosshair17.tga differ
index 5a6bfb7b876a98734fe433354eb31113fd81bd8a..8e9d2d9fab481cbe5a6d82dd49c1f0305570e940 100644 (file)
Binary files a/gfx/crosshair18.tga and b/gfx/crosshair18.tga differ
index 13cf4b763dc74d9649032eab8865ef575e49568a..6c597625b01d6a348e0301fe48d8f0abb27af8b6 100644 (file)
Binary files a/gfx/crosshair19.tga and b/gfx/crosshair19.tga differ
index 4e2bd7950b8df50c30c88eeb5b497c231f4c766e..8bd44edc0ed189f3c3f66e91e0052d9040ad81d9 100644 (file)
Binary files a/gfx/crosshair2.tga and b/gfx/crosshair2.tga differ
index 6c597625b01d6a348e0301fe48d8f0abb27af8b6..2dc7a6063f4da5f1e8f0cb54d5ceeb6417ab20db 100644 (file)
Binary files a/gfx/crosshair20.tga and b/gfx/crosshair20.tga differ
diff --git a/gfx/crosshair21.tga b/gfx/crosshair21.tga
deleted file mode 100644 (file)
index 4a7e5f5..0000000
Binary files a/gfx/crosshair21.tga and /dev/null differ
index db5f2cc958ed8aa8e293a6f57040949c9edf1ba3..aef62e30645311e8184d563f882daf0c17e62a48 100644 (file)
Binary files a/gfx/crosshair3.tga and b/gfx/crosshair3.tga differ
index 2c4f312d47ad76535a56315a98a53e149907d16d..5ebc4ff3381bf6c4ce8fc8a97504102d9a2f48d4 100644 (file)
Binary files a/gfx/crosshair4.tga and b/gfx/crosshair4.tga differ
index 905045f22c8e929fc53d653785bcd5595165c1a8..fc3410c2612b765b7de34bb2d146cd65f9d8ef93 100644 (file)
Binary files a/gfx/crosshair5.tga and b/gfx/crosshair5.tga differ
index b005d9643a89a5b9e49e90ffe9f60c545dd12b54..1d3e83d6baaa2338583ce6ab93d0d8186ee33ec8 100644 (file)
Binary files a/gfx/crosshair6.tga and b/gfx/crosshair6.tga differ
index 64f6d5d07ac0ba241cfebc30b0c496b0c8140b26..f76ef23fccbde397406f3173772981ae8f7e2fc6 100644 (file)
Binary files a/gfx/crosshair7.tga and b/gfx/crosshair7.tga differ
index df9e414f7c73cbda181a75b94dc1334b1044e925..8e71e06510baefc49f1097f997426797e496bcaf 100644 (file)
Binary files a/gfx/crosshair8.tga and b/gfx/crosshair8.tga differ
index a1e76940a7ffa0000fa2e2f4c7712dae1c667952..1d3e7ec6b2df18d89784d0ebe131a06932cc40ac 100644 (file)
Binary files a/gfx/crosshair9.tga and b/gfx/crosshair9.tga differ
index a2ffef2b7950aa6e896abb605edc7070c4bdd614..8d8741b5207cb5f3fa6cb654394db763a42ba48c 100644 (file)
Binary files a/gfx/crosshairdot.tga and b/gfx/crosshairdot.tga differ
diff --git a/gfx/menu/default/icon_aeslevel0.tga b/gfx/menu/default/icon_aeslevel0.tga
new file mode 100644 (file)
index 0000000..5c9e66a
Binary files /dev/null and b/gfx/menu/default/icon_aeslevel0.tga differ
diff --git a/gfx/menu/default/icon_aeslevel1.tga b/gfx/menu/default/icon_aeslevel1.tga
new file mode 100644 (file)
index 0000000..f1e9273
Binary files /dev/null and b/gfx/menu/default/icon_aeslevel1.tga differ
diff --git a/gfx/menu/default/icon_aeslevel2.tga b/gfx/menu/default/icon_aeslevel2.tga
new file mode 100644 (file)
index 0000000..7153820
Binary files /dev/null and b/gfx/menu/default/icon_aeslevel2.tga differ
diff --git a/gfx/menu/default/icon_aeslevel3.tga b/gfx/menu/default/icon_aeslevel3.tga
new file mode 100644 (file)
index 0000000..c31bfe8
Binary files /dev/null and b/gfx/menu/default/icon_aeslevel3.tga differ
diff --git a/gfx/menu/default/icon_aeslevel4.tga b/gfx/menu/default/icon_aeslevel4.tga
new file mode 100644 (file)
index 0000000..88963f8
Binary files /dev/null and b/gfx/menu/default/icon_aeslevel4.tga differ
diff --git a/gfx/menu/default/icon_aeslevel5.tga b/gfx/menu/default/icon_aeslevel5.tga
new file mode 100644 (file)
index 0000000..0ed332d
Binary files /dev/null and b/gfx/menu/default/icon_aeslevel5.tga differ
diff --git a/gfx/menu/default/icon_pure0.tga b/gfx/menu/default/icon_pure0.tga
new file mode 100644 (file)
index 0000000..5c9e66a
Binary files /dev/null and b/gfx/menu/default/icon_pure0.tga differ
diff --git a/gfx/menu/default/icon_pure1.tga b/gfx/menu/default/icon_pure1.tga
new file mode 100644 (file)
index 0000000..62980d2
Binary files /dev/null and b/gfx/menu/default/icon_pure1.tga differ
diff --git a/gfx/menu/luminos/icon_aeslevel0.tga b/gfx/menu/luminos/icon_aeslevel0.tga
new file mode 100644 (file)
index 0000000..5c9e66a
Binary files /dev/null and b/gfx/menu/luminos/icon_aeslevel0.tga differ
diff --git a/gfx/menu/luminos/icon_aeslevel1.tga b/gfx/menu/luminos/icon_aeslevel1.tga
new file mode 100644 (file)
index 0000000..f1e9273
Binary files /dev/null and b/gfx/menu/luminos/icon_aeslevel1.tga differ
diff --git a/gfx/menu/luminos/icon_aeslevel2.tga b/gfx/menu/luminos/icon_aeslevel2.tga
new file mode 100644 (file)
index 0000000..7153820
Binary files /dev/null and b/gfx/menu/luminos/icon_aeslevel2.tga differ
diff --git a/gfx/menu/luminos/icon_aeslevel3.tga b/gfx/menu/luminos/icon_aeslevel3.tga
new file mode 100644 (file)
index 0000000..c31bfe8
Binary files /dev/null and b/gfx/menu/luminos/icon_aeslevel3.tga differ
diff --git a/gfx/menu/luminos/icon_aeslevel4.tga b/gfx/menu/luminos/icon_aeslevel4.tga
new file mode 100644 (file)
index 0000000..88963f8
Binary files /dev/null and b/gfx/menu/luminos/icon_aeslevel4.tga differ
diff --git a/gfx/menu/luminos/icon_aeslevel5.tga b/gfx/menu/luminos/icon_aeslevel5.tga
new file mode 100644 (file)
index 0000000..0ed332d
Binary files /dev/null and b/gfx/menu/luminos/icon_aeslevel5.tga differ
diff --git a/gfx/menu/luminos/icon_pure0.tga b/gfx/menu/luminos/icon_pure0.tga
new file mode 100644 (file)
index 0000000..5c9e66a
Binary files /dev/null and b/gfx/menu/luminos/icon_pure0.tga differ
diff --git a/gfx/menu/luminos/icon_pure1.tga b/gfx/menu/luminos/icon_pure1.tga
new file mode 100644 (file)
index 0000000..62980d2
Binary files /dev/null and b/gfx/menu/luminos/icon_pure1.tga differ
diff --git a/gfx/menu/xaw/icon_aeslevel0.tga b/gfx/menu/xaw/icon_aeslevel0.tga
new file mode 100644 (file)
index 0000000..5c9e66a
Binary files /dev/null and b/gfx/menu/xaw/icon_aeslevel0.tga differ
diff --git a/gfx/menu/xaw/icon_aeslevel1.tga b/gfx/menu/xaw/icon_aeslevel1.tga
new file mode 100644 (file)
index 0000000..f1e9273
Binary files /dev/null and b/gfx/menu/xaw/icon_aeslevel1.tga differ
diff --git a/gfx/menu/xaw/icon_aeslevel2.tga b/gfx/menu/xaw/icon_aeslevel2.tga
new file mode 100644 (file)
index 0000000..7153820
Binary files /dev/null and b/gfx/menu/xaw/icon_aeslevel2.tga differ
diff --git a/gfx/menu/xaw/icon_aeslevel3.tga b/gfx/menu/xaw/icon_aeslevel3.tga
new file mode 100644 (file)
index 0000000..c31bfe8
Binary files /dev/null and b/gfx/menu/xaw/icon_aeslevel3.tga differ
diff --git a/gfx/menu/xaw/icon_aeslevel4.tga b/gfx/menu/xaw/icon_aeslevel4.tga
new file mode 100644 (file)
index 0000000..88963f8
Binary files /dev/null and b/gfx/menu/xaw/icon_aeslevel4.tga differ
diff --git a/gfx/menu/xaw/icon_aeslevel5.tga b/gfx/menu/xaw/icon_aeslevel5.tga
new file mode 100644 (file)
index 0000000..0ed332d
Binary files /dev/null and b/gfx/menu/xaw/icon_aeslevel5.tga differ
diff --git a/gfx/menu/xaw/icon_pure0.tga b/gfx/menu/xaw/icon_pure0.tga
new file mode 100644 (file)
index 0000000..5c9e66a
Binary files /dev/null and b/gfx/menu/xaw/icon_pure0.tga differ
diff --git a/gfx/menu/xaw/icon_pure1.tga b/gfx/menu/xaw/icon_pure1.tga
new file mode 100644 (file)
index 0000000..62980d2
Binary files /dev/null and b/gfx/menu/xaw/icon_pure1.tga differ
index e816fe221a13bc4994deb8aaf2f90318b1364e38..0d822e1642777a5c6e586394b8f4e99cfa61d26e 100644 (file)
@@ -265,3 +265,5 @@ float cr_maxbullets;
 
 float bgmtime;
 
+string weaponorder_byimpulse;
+string weaponorder_bypriority;
index 462f289ad2cb032802a2a53bcae44c76a6dbf9be..4846a9fef572aab667fafb724778051d7c69f78c 100644 (file)
@@ -186,7 +186,10 @@ void CSQC_Shutdown(void)
        remove(players);
        db_close(binddb);
        db_close(tempdb);
-       db_save(ClientProgsDB, "client.db");
+       if(cvar("cl_db_saveasdump"))
+               db_dump(ClientProgsDB, "client.db");
+       else
+               db_save(ClientProgsDB, "client.db");
        db_close(ClientProgsDB);
 
        cvar_clientsettemp_restore();
index 5ac1f965e3a1d8714da30cd5ebdea66916917257..074a3be5eec6f8d63eb1e671e48e70ca44189980 100644 (file)
@@ -349,6 +349,8 @@ void CSQC_RAPTOR_HUD();
 vector freeze_pmove_org, freeze_input_angles;
 entity nightvision_noise, nightvision_noise2;
 
+float pickup_crosshair_time, pickup_crosshair_size;
+
 void CSQC_UpdateView(float w, float h)
 {
        entity e;
@@ -356,6 +358,7 @@ void CSQC_UpdateView(float w, float h)
        float f, i, j;
        vector v, vo;
        vector vf_size, vf_min;
+       float a;
 
        vf_size = R_SetView3fv(VF_SIZE);
        vf_min = R_SetView3fv(VF_MIN);
@@ -567,7 +570,6 @@ void CSQC_UpdateView(float w, float h)
        {
                // apply night vision effect
                vector rgb, tc_00, tc_01, tc_10, tc_11;
-               float a;
 
                if(!nightvision_noise)
                {
@@ -698,6 +700,18 @@ void CSQC_UpdateView(float w, float h)
 
                // crosshair goes VERY LAST
                if(!scoreboard_active && !camera_active && intermission != 2) {
+                       string wcross_style;
+                       float wcross_alpha, wcross_resolution;
+                       wcross_style = cvar_string("crosshair");
+                       if (wcross_style == "0")
+                               return;
+                       wcross_resolution = cvar("crosshair_size");
+                       if (wcross_resolution == 0)
+                               return;
+                       wcross_alpha = cvar("crosshair_alpha");
+                       if (wcross_alpha == 0)
+                               return;
+
                        // TrueAim check
                        float shottype;
                        float bullets, ring_scale;
@@ -723,171 +737,183 @@ void CSQC_UpdateView(float w, float h)
                        else
                                shottype = SHOTTYPE_HITWORLD;
 
-                       string wcross_style;
-                       wcross_style = cvar_string("crosshair");
+                       vector wcross_color, wcross_size;
+                       string wcross_wep, wcross_name;
+                       float wcross_scale, wcross_blur;
 
-                       if (wcross_style != "0") {
-                               vector wcross_color, wcross_size;
-                               string wcross_wep, wcross_name;
-                               float wcross_alpha, wcross_scale, wcross_blur, wcross_resolution;
-
-                               wcross_color_x = cvar("crosshair_color_red");
-                               wcross_color_y = cvar("crosshair_color_green");
-                               wcross_color_z = cvar("crosshair_color_blue");
-                               wcross_alpha = cvar("crosshair_color_alpha");
-                               wcross_resolution = cvar("crosshair_size");
-                               if (cvar("crosshair_per_weapon")) {
-                                       e = get_weaponinfo(activeweapon);
-                                       if (e && e.netname != "")
+                       wcross_color_x = cvar("crosshair_color_red");
+                       wcross_color_y = cvar("crosshair_color_green");
+                       wcross_color_z = cvar("crosshair_color_blue");
+                       if (cvar("crosshair_per_weapon")) {
+                               e = get_weaponinfo(activeweapon);
+                               if (e && e.netname != "")
+                               {
+                                       wcross_wep = e.netname;
+                                       wcross_resolution *= cvar(strcat("crosshair_", wcross_wep, "_size"));
+                                       if (wcross_resolution == 0)
+                                               return;
+                                       wcross_alpha *= cvar(strcat("crosshair_", wcross_wep, "_alpha"));
+                                       if (wcross_alpha == 0)
+                                               return;
+
+                                       wcross_style = cvar_string(strcat("crosshair_", wcross_wep));
+                                       if(wcross_style == "")
+                                               wcross_style = e.netname;
+
+                                       if(!cvar("crosshair_color_override"))
                                        {
-                                               wcross_wep = e.netname;
-                                               wcross_style = cvar_string(strcat("crosshair_", wcross_wep));
-                                               if(wcross_style == "")
-                                                       wcross_style = e.netname;
-
-                                               if(!cvar("crosshair_color_override"))
-                                               {
-                                                       wcross_color_x = cvar(strcat("crosshair_", wcross_wep, "_color_red"));
-                                                       wcross_color_y = cvar(strcat("crosshair_", wcross_wep, "_color_green"));
-                                                       wcross_color_z = cvar(strcat("crosshair_", wcross_wep, "_color_blue"));
-                                               }
-
-                                               wcross_alpha *= cvar(strcat("crosshair_", wcross_wep, "_color_alpha"));
-                                               wcross_resolution *= cvar(strcat("crosshair_", wcross_wep, "_size"));
+                                               wcross_color_x = cvar(strcat("crosshair_", wcross_wep, "_color_red"));
+                                               wcross_color_y = cvar(strcat("crosshair_", wcross_wep, "_color_green"));
+                                               wcross_color_z = cvar(strcat("crosshair_", wcross_wep, "_color_blue"));
                                        }
                                }
+                       }
 
-                               wcross_name = strcat("gfx/crosshair", wcross_style);
+                       wcross_name = strcat("gfx/crosshair", wcross_style);
 
-                               if(cvar("crosshair_effect_scalefade"))
+                       if(cvar("crosshair_effect_scalefade"))
+                       {
+                               wcross_scale = wcross_resolution;
+                               wcross_resolution = 1;
+                       }
+                       else
+                       {
+                               wcross_scale = 1;
+                       }
+
+                       if(cvar("crosshair_pickup"))
+                       {
+                               if(pickup_crosshair_time < getstatf(STAT_LAST_PICKUP))
                                {
-                                       wcross_scale = wcross_resolution;
-                                       wcross_resolution = 1;
+                                       pickup_crosshair_size = 1;
+                                       pickup_crosshair_time = getstatf(STAT_LAST_PICKUP);
                                }
+
+                               if(pickup_crosshair_size > 0)
+                                       pickup_crosshair_size -= cvar("crosshair_pickup_speed") * frametime;
                                else
-                               {
-                                       wcross_scale = 1;
-                               }
+                                       pickup_crosshair_size = 0;
 
-                               if(shottype == SHOTTYPE_HITENEMY)
-                                       wcross_scale *= cvar("crosshair_hittest"); // is not queried if hittest is 0
-                               if(shottype == SHOTTYPE_HITTEAM)
-                                       wcross_scale /= cvar("crosshair_hittest"); // is not queried if hittest is 0
+                               wcross_scale += sin(pickup_crosshair_size) * cvar("crosshair_pickup");
+                       }
 
-                               f = cvar("crosshair_effect_speed");
-                               if(f < 0)
-                                       f *= -2 * g_weaponswitchdelay;
-                               if(wcross_scale != wcross_scale_goal_prev || wcross_alpha != wcross_alpha_goal_prev || wcross_color != wcross_color_goal_prev)
-                               {
-                                       wcross_changedonetime = time + f;
-                               }
-                               if(wcross_name != wcross_name_goal_prev || wcross_resolution != wcross_resolution_goal_prev)
-                               {
-                                       wcross_name_changestarttime = time;
-                                       wcross_name_changedonetime = time + f;
-                                       if(wcross_name_goal_prev_prev)
-                                               strunzone(wcross_name_goal_prev_prev);
-                                       wcross_name_goal_prev_prev = wcross_name_goal_prev;
-                                       wcross_name_goal_prev = strzone(wcross_name);
-                                       wcross_name_alpha_goal_prev_prev = wcross_name_alpha_goal_prev;
-                                       wcross_resolution_goal_prev_prev = wcross_resolution_goal_prev;
-                                       wcross_resolution_goal_prev = wcross_resolution;
-                               }
+                       if(shottype == SHOTTYPE_HITENEMY)
+                               wcross_scale *= cvar("crosshair_hittest"); // is not queried if hittest is 0
+                       if(shottype == SHOTTYPE_HITTEAM)
+                               wcross_scale /= cvar("crosshair_hittest"); // is not queried if hittest is 0
 
-                               wcross_scale_goal_prev = wcross_scale;
-                               wcross_alpha_goal_prev = wcross_alpha;
-                               wcross_color_goal_prev = wcross_color;
+                       f = cvar("crosshair_effect_speed");
+                       if(f < 0)
+                               f *= -2 * g_weaponswitchdelay;
+                       if(wcross_scale != wcross_scale_goal_prev || wcross_alpha != wcross_alpha_goal_prev || wcross_color != wcross_color_goal_prev)
+                       {
+                               wcross_changedonetime = time + f;
+                       }
+                       if(wcross_name != wcross_name_goal_prev || wcross_resolution != wcross_resolution_goal_prev)
+                       {
+                               wcross_name_changestarttime = time;
+                               wcross_name_changedonetime = time + f;
+                               if(wcross_name_goal_prev_prev)
+                                       strunzone(wcross_name_goal_prev_prev);
+                               wcross_name_goal_prev_prev = wcross_name_goal_prev;
+                               wcross_name_goal_prev = strzone(wcross_name);
+                               wcross_name_alpha_goal_prev_prev = wcross_name_alpha_goal_prev;
+                               wcross_resolution_goal_prev_prev = wcross_resolution_goal_prev;
+                               wcross_resolution_goal_prev = wcross_resolution;
+                       }
 
-                               if(shottype == SHOTTYPE_HITTEAM || (shottype == SHOTTYPE_HITOBSTRUCTION && cvar("crosshair_hittest_blur") && !cvar("chase_active")))
-                               {
-                                       wcross_blur = 1;
-                                       wcross_alpha *= 0.75;
-                               }
-                               else
-                                       wcross_blur = 0;
-                               // *_prev is at time-frametime
-                               // * is at wcross_changedonetime+f
-                               // what do we have at time?
-                               if(time < wcross_changedonetime)
-                               {
-                                       f = frametime / (wcross_changedonetime - time + frametime);
-                                       wcross_scale = f * wcross_scale + (1 - f) * wcross_scale_prev;
-                                       wcross_alpha = f * wcross_alpha + (1 - f) * wcross_alpha_prev;
-                                       wcross_color = f * wcross_color + (1 - f) * wcross_color_prev;
-                               }
+                       wcross_scale_goal_prev = wcross_scale;
+                       wcross_alpha_goal_prev = wcross_alpha;
+                       wcross_color_goal_prev = wcross_color;
 
-                               wcross_scale_prev = wcross_scale;
-                               wcross_alpha_prev = wcross_alpha;
-                               wcross_color_prev = wcross_color;
+                       if(shottype == SHOTTYPE_HITTEAM || (shottype == SHOTTYPE_HITOBSTRUCTION && cvar("crosshair_hittest_blur") && !cvar("chase_active")))
+                       {
+                               wcross_blur = 1;
+                               wcross_alpha *= 0.75;
+                       }
+                       else
+                               wcross_blur = 0;
+                       // *_prev is at time-frametime
+                       // * is at wcross_changedonetime+f
+                       // what do we have at time?
+                       if(time < wcross_changedonetime)
+                       {
+                               f = frametime / (wcross_changedonetime - time + frametime);
+                               wcross_scale = f * wcross_scale + (1 - f) * wcross_scale_prev;
+                               wcross_alpha = f * wcross_alpha + (1 - f) * wcross_alpha_prev;
+                               wcross_color = f * wcross_color + (1 - f) * wcross_color_prev;
+                       }
 
-                               wcross_scale *= 1 - cvar("_menu_alpha");
-                               wcross_alpha *= 1 - cvar("_menu_alpha");
+                       wcross_scale_prev = wcross_scale;
+                       wcross_alpha_prev = wcross_alpha;
+                       wcross_color_prev = wcross_color;
 
-                               ring_scale = cvar("crosshair_ring_size");
+                       wcross_scale *= 1 - cvar("_menu_alpha");
+                       wcross_alpha *= 1 - cvar("_menu_alpha");
 
-                               float f, a;
-                               wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
+                       ring_scale = cvar("crosshair_ring_size");
 
-                               float nex_charge;
-                               nex_charge = getstatf(STAT_NEX_CHARGE);
+                       wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
 
-                               // ring around crosshair representing bullets left in camping rifle clip
-                               if (activeweapon == WEP_CAMPINGRIFLE && cr_maxbullets)
-                               {
-                                       bullets = getstati(STAT_BULLETS_LOADED);
-                                       f = bound(0, bullets / cr_maxbullets, 1);
+                       float nex_charge;
+                       nex_charge = getstatf(STAT_NEX_CHARGE);
 
-                                       a = cvar("crosshair_campingrifle_bulletcounter_alpha");
-                                       DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
-                               }
-                               else if (activeweapon == WEP_NEX && nex_charge) // ring around crosshair representing velocity-dependent damage for the nex
-                               {
-                                       a = cvar("crosshair_nexvelocity_alpha");
-                                       DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", nex_charge, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
-                               }
+                       // ring around crosshair representing bullets left in camping rifle clip
+                       if (activeweapon == WEP_CAMPINGRIFLE && cr_maxbullets)
+                       {
+                               bullets = getstati(STAT_BULLETS_LOADED);
+                               f = bound(0, bullets / cr_maxbullets, 1);
+
+                               a = cvar("crosshair_campingrifle_bulletcounter_alpha");
+                               DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
+                       }
+                       else if (activeweapon == WEP_NEX && nex_charge) // ring around crosshair representing velocity-dependent damage for the nex
+                       {
+                               a = cvar("crosshair_nexvelocity_alpha");
+                               DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", nex_charge, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
+                       }
 
 #define CROSSHAIR_DO_BLUR(M,sz,wcross_name,wcross_alpha) \
-                               do \
+                       do \
+                       { \
+                               if(wcross_blur > 0) \
+                               { \
+                                       for(i = -2; i <= 2; ++i) \
+                                               for(j = -2; j <= 2; ++j) \
+                                                       M(i,j,sz,wcross_name,wcross_alpha*0.04); \
+                               } \
+                               else \
                                { \
-                                       if(wcross_blur > 0) \
-                                       { \
-                                               for(i = -2; i <= 2; ++i) \
-                                                       for(j = -2; j <= 2; ++j) \
-                                                               M(i,j,sz,wcross_name,wcross_alpha*0.04); \
-                                       } \
-                                       else \
-                                       { \
-                                               M(0,0,sz,wcross_name,wcross_alpha); \
-                                       } \
+                                       M(0,0,sz,wcross_name,wcross_alpha); \
                                } \
-                               while(0)
+                       } \
+                       while(0)
 
 #define CROSSHAIR_DRAW_SINGLE(i,j,sz,wcross_name,wcross_alpha) \
-                               drawpic(wcross_origin - ('0.5 0 0' * (sz * wcross_size_x + i * wcross_blur) + '0 0.5 0' * (sz * wcross_size_y + j * wcross_blur)), wcross_name, sz * wcross_size, wcross_color, wcross_alpha, DRAWFLAG_NORMAL)
+                       drawpic(wcross_origin - ('0.5 0 0' * (sz * wcross_size_x + i * wcross_blur) + '0 0.5 0' * (sz * wcross_size_y + j * wcross_blur)), wcross_name, sz * wcross_size, wcross_color, wcross_alpha, DRAWFLAG_NORMAL)
 
 #define CROSSHAIR_DRAW(sz,wcross_name,wcross_alpha) \
-                               CROSSHAIR_DO_BLUR(CROSSHAIR_DRAW_SINGLE,sz,wcross_name,wcross_alpha)
+                       CROSSHAIR_DO_BLUR(CROSSHAIR_DRAW_SINGLE,sz,wcross_name,wcross_alpha)
 
-                               if(time < wcross_name_changedonetime && wcross_name != wcross_name_goal_prev_prev && wcross_name_goal_prev_prev)
-                               {
-                                       f = (wcross_name_changedonetime - time) / (wcross_name_changedonetime - wcross_name_changestarttime);
-                                       wcross_size = drawgetimagesize(wcross_name_goal_prev_prev) * wcross_scale;
-                                       CROSSHAIR_DRAW(wcross_resolution_goal_prev_prev, wcross_name_goal_prev_prev, wcross_alpha * f * wcross_name_alpha_goal_prev_prev);
-                                       f = 1 - f;
-                               }
-                               else
-                               {
-                                       f = 1;
-                               }
+                       if(time < wcross_name_changedonetime && wcross_name != wcross_name_goal_prev_prev && wcross_name_goal_prev_prev)
+                       {
+                               f = (wcross_name_changedonetime - time) / (wcross_name_changedonetime - wcross_name_changestarttime);
+                               wcross_size = drawgetimagesize(wcross_name_goal_prev_prev) * wcross_scale;
+                               CROSSHAIR_DRAW(wcross_resolution_goal_prev_prev, wcross_name_goal_prev_prev, wcross_alpha * f * wcross_name_alpha_goal_prev_prev);
+                               f = 1 - f;
+                       }
+                       else
+                       {
+                               f = 1;
+                       }
 
-                               wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
-                               CROSSHAIR_DRAW(wcross_resolution, wcross_name, wcross_alpha * f);
+                       wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
+                       CROSSHAIR_DRAW(wcross_resolution, wcross_name, wcross_alpha * f);
 
-                               if(cvar("crosshair_dot"))
-                                       CROSSHAIR_DRAW(wcross_resolution * cvar("crosshair_dot_size"), "gfx/crosshairdot.tga", wcross_alpha * f * cvar("crosshair_dot_alpha"));
+                       if(cvar("crosshair_dot"))
+                               CROSSHAIR_DRAW(wcross_resolution * cvar("crosshair_dot_size"), "gfx/crosshairdot.tga", wcross_alpha * f * cvar("crosshair_dot_alpha"));
 
-                               wcross_name_alpha_goal_prev = f;
-                       }
+                       wcross_name_alpha_goal_prev = f;
                }
                else
                {
@@ -1075,7 +1101,7 @@ void CSQC_SPIDER_HUD()
 
 void CSQC_RAPTOR_HUD()
 {
-       float rockets, reload, heat, hp, shield, energy;
+       float reload, hp, shield, energy;
        vector picsize, hudloc;
 
     // Fetch health & ammo stats
index e34df2ff06ce2935feb9dc828697e952ccd89e61..ea0fcecedfa8ac2a716fe6c23f9012f07093571d 100644 (file)
@@ -59,7 +59,6 @@ var string autocvar_hud_panel_weapons_bg_border;
 var string autocvar_hud_panel_weapons_bg_padding;
 var float autocvar_hud_panel_weapons_aspect;
 var float autocvar_hud_panel_weapons_accuracy;
-var float autocvar_hud_panel_weapons_accuracy_yellow;
 var float autocvar_hud_panel_weapons_ammo;
 var vector autocvar_hud_panel_weapons_ammo_color;
 var float autocvar_hud_panel_weapons_ammo_alpha;
index 78826f8f34925e63b7e38954d0ea623f2773ee8b..86b970c1a1fa1cf8334b8134383e002d1416450d 100644 (file)
@@ -153,14 +153,14 @@ void Ent_GibSplash(float isNew)
        org_z = ReadShort() * 4 + 2;
        vel = decompressShortVector(ReadShort());
 
-       if(cvar("cl_gentle_gibs") || cvar("cl_gentle"))
+       if(autocvar_cl_gentle_gibs || cvar("cl_gentle"))
                type |= 0x80; // set gentle bit
 
        if(type & 0x80)
        {
-               if(cvar("cl_gentle_gibs") == 2)
+               if(autocvar_cl_gentle_gibs == 2)
                        gentle_prefix = "";
-               else if(cvar("cl_gentle_gibs") == 3) 
+               else if(autocvar_cl_gentle_gibs == 3) 
                        gentle_prefix = "happy_";
                else
                        gentle_prefix = "morphed_";
@@ -171,7 +171,7 @@ void Ent_GibSplash(float isNew)
                gentle_prefix = "particlegibs_";
        }
 
-       if not(cvar("cl_gentle_gibs") || cvar("cl_gentle"))
+       if not(autocvar_cl_gentle_gibs || cvar("cl_gentle"))
                amount *= 1 - cvar("cl_nogibs");
 
        if(cvar("ekg"))
index c1e8383aa6daf415356034b8b2bda1bc13193e7c..a995970b45fbbc4499afc306c512e6970d619913 100644 (file)
@@ -1,7 +1,6 @@
 .float HookType; // ENT_CLIENT_*
 .vector origin;
 .vector velocity;
-.float HookSound;
 .float HookSilent;
 .float HookRange;
 
@@ -57,7 +56,7 @@ void Draw_GrapplingHook_trace_callback(vector start, vector hit, vector end)
 void Draw_GrapplingHook()
 {
        vector a, b, atrans;
-       string tex, snd;
+       string tex;
        vector rgb;
        float t;
        float s;
@@ -190,8 +189,16 @@ void Draw_GrapplingHook()
        {
                default:
                case ENT_CLIENT_HOOK:
-                       setorigin(self, trace_endpos); // hook endpoint!
-                       self.angles = vectoangles(trace_endpos - atrans);
+                       if(vlen(trace_endpos - atrans) > 0.5)
+                       {
+                               setorigin(self, trace_endpos); // hook endpoint!
+                               self.angles = vectoangles(trace_endpos - atrans);
+                               self.drawmask = MASK_NORMAL;
+                       }
+                       else
+                       {
+                               self.drawmask = 0;
+                       }
                        break;
                case ENT_CLIENT_LGBEAM:
                case ENT_CLIENT_GAUNTLET:
index c2f4e65c20b2433de0c74cc162b3e2d3f9e749ad..971a791aad847ac58625919380c4b6e81412cba9 100644 (file)
@@ -459,7 +459,7 @@ void HUD_Panel_ExportCfg(string cfgname)
                float i;
                for (i = 0; i < HUD_PANEL_NUM; ++i)
                {
-                       HUD_Panel_GetName(i)
+                       HUD_Panel_GetName(i);
 
                        fputs(fh, strcat("seta hud_panel_", panel_name, " ", cvar_string(strcat("hud_panel_", panel_name)), "\n"));
                        fputs(fh, strcat("seta hud_panel_", panel_name, "_pos \"", cvar_string(strcat("hud_panel_", panel_name, "_pos")), "\"", "\n"));
@@ -540,7 +540,9 @@ void HUD_Panel_HlBorder(float myBorder, vector color, float alpha)
 if(panel_bg != "0")\
        draw_BorderPicture(panel_pos - '1 1 0' * panel_bg_border, panel_bg, panel_size + '1 1 0' * 2 * panel_bg_border, panel_bg_color, panel_bg_alpha * alpha, '1 1 0' * (panel_bg_border/BORDER_MULTIPLIER));\
 if(highlightedPanel_prev == active_panel && autocvar__hud_configure)\
-       HUD_Panel_HlBorder(panel_bg_border + 1.5 * hlBorderSize, '0 0.5 1', 0.25 * (1 - autocvar__menu_alpha) * alpha);
+{\
+       HUD_Panel_HlBorder(panel_bg_border + 1.5 * hlBorderSize, '0 0.5 1', 0.25 * (1 - autocvar__menu_alpha) * alpha);\
+} ENDS_WITH_CURLY_BRACE
 
 void HUD_Panel_DrawProgressBar(vector pos, float vertical, vector mySize, vector color, float alpha, float drawflag)
 {
@@ -594,8 +596,6 @@ vector HUD_Panel_CheckMove(vector myPos, vector mySize)
        vector myTarget;
        myTarget = myPos;
 
-       vector targPos;
-       vector targSize;
        vector myCenter;
        vector targCenter;
        myCenter = '0 0 0'; // shut up fteqcc, there IS a reference
@@ -605,7 +605,7 @@ vector HUD_Panel_CheckMove(vector myPos, vector mySize)
                if(i == highlightedPanel || !panel_enabled)
                        continue;
 
-               HUD_Panel_UpdatePosSizeForId(i)
+               HUD_Panel_UpdatePosSizeForId(i);
 
                panel_pos -= '1 1 0' * panel_bg_border;
                panel_size += '2 2 0' * panel_bg_border;
@@ -665,7 +665,7 @@ vector HUD_Panel_CheckMove(vector myPos, vector mySize)
 
 void HUD_Panel_SetPos(vector pos)
 {
-       HUD_Panel_UpdatePosSizeForId(highlightedPanel)
+       HUD_Panel_UpdatePosSizeForId(highlightedPanel);
        vector mySize;
        mySize = panel_size;
 
@@ -695,12 +695,9 @@ void HUD_Panel_SetPos(vector pos)
 vector HUD_Panel_CheckResize(vector mySize, vector resizeorigin) {
        float i;
 
-       float targBorder;
-       vector targPos;
-       vector targSize;
        vector targEndPos;
 
-       vector dist;
+       float dist_x, dist_y;
        float ratio;
        ratio = mySize_x/mySize_y;
 
@@ -708,7 +705,7 @@ vector HUD_Panel_CheckResize(vector mySize, vector resizeorigin) {
                if(i == highlightedPanel || !panel_enabled)
                        continue;
 
-               HUD_Panel_UpdatePosSizeForId(i)
+               HUD_Panel_UpdatePosSizeForId(i);
 
                panel_pos -= '1 1 0' * panel_bg_border;
                panel_size += '2 2 0' * panel_bg_border;
@@ -807,7 +804,7 @@ vector HUD_Panel_CheckResize(vector mySize, vector resizeorigin) {
 
 void HUD_Panel_SetPosSize(vector mySize)
 {
-       HUD_Panel_UpdatePosSizeForId(highlightedPanel)
+       HUD_Panel_UpdatePosSizeForId(highlightedPanel);
        vector resizeorigin;
        resizeorigin = panel_click_resizeorigin;
        vector myPos;
@@ -941,7 +938,7 @@ void HUD_Panel_Arrow_Action(float nPrimary)
 
        highlightedPanel = highlightedPanel_prev;
 
-       HUD_Panel_UpdatePosSizeForId(highlightedPanel)
+       HUD_Panel_UpdatePosSizeForId(highlightedPanel);
 
        vector prev_pos, prev_size;
        prev_pos = panel_pos;
@@ -1001,7 +998,7 @@ void HUD_Panel_Arrow_Action(float nPrimary)
                HUD_Panel_SetPos(pos);
        }
 
-       HUD_Panel_UpdatePosSizeForId(highlightedPanel)
+       HUD_Panel_UpdatePosSizeForId(highlightedPanel);
 
        if (prev_pos != panel_pos || prev_size != panel_size)
        {
@@ -1014,6 +1011,8 @@ void HUD_Panel_Arrow_Action(float nPrimary)
 
 float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
 {
+       string s;
+
        if(!autocvar__hud_configure)
                return false;
 
@@ -1094,7 +1093,7 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
                        if (highlightedPanel_copied == -1 || highlightedPanel_prev == -1)
                                return true;
 
-                       HUD_Panel_UpdatePosSizeForId(highlightedPanel_prev)
+                       HUD_Panel_UpdatePosSizeForId(highlightedPanel_prev);
 
                        // reduce size if it'd go beyond screen boundaries
                        vector tmp_size = panel_size_copied;
@@ -1111,7 +1110,6 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
                        panel_size_backup = panel_size;
                        highlightedPanel_backup = highlightedPanel_prev;
 
-                       string s;
                        s = strcat(ftos(tmp_size_x/vid_conwidth), " ", ftos(tmp_size_y/vid_conheight));
                        cvar_set(strcat("hud_panel_", panel_name, "_size"), s);
                }
@@ -1122,8 +1120,7 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
                        //restore previous values
                        if (highlightedPanel_backup != -1)
                        {
-                               HUD_Panel_GetName(highlightedPanel_backup)
-                               string s;
+                               HUD_Panel_GetName(highlightedPanel_backup);
                                s = strcat(ftos(panel_pos_backup_x/vid_conwidth), " ", ftos(panel_pos_backup_y/vid_conheight));
                                cvar_set(strcat("hud_panel_", panel_name, "_pos"), s);
                                s = strcat(ftos(panel_size_backup_x/vid_conwidth), " ", ftos(panel_size_backup_y/vid_conheight));
@@ -1161,7 +1158,7 @@ float HUD_Panel_HighlightCheck()
                i = panel_order[j];
                j += 1;
 
-               HUD_Panel_UpdatePosSizeForId(i)
+               HUD_Panel_UpdatePosSizeForId(i);
 
                panelPos = panel_pos;
                panelSize = panel_size;
@@ -1245,7 +1242,7 @@ void HUD_Panel_Highlight()
                i = panel_order[j];
                j += 1;
 
-               HUD_Panel_UpdatePosSizeForId(i)
+               HUD_Panel_UpdatePosSizeForId(i);
 
                panelPos = panel_pos;
                panelSize = panel_size;
@@ -1355,7 +1352,7 @@ void HUD_Panel_Mouse()
                        prev_size = panel_size;
                }
                else
-                       HUD_Panel_UpdatePosSizeForId(highlightedPanel)
+                       HUD_Panel_UpdatePosSizeForId(highlightedPanel);
 
                if (prev_pos != panel_pos || prev_size != panel_size)
                {
@@ -1398,7 +1395,7 @@ void HUD_Panel_Mouse()
                        mouseClicked = 0; // to prevent spam, I guess.
                        menu_enabled = 2;
                        menu_enabled_time = time;
-                       HUD_Panel_GetName(highlightedPanel)
+                       HUD_Panel_GetName(highlightedPanel);
                        localcmd("menu_showhudoptions ", panel_name, "\n");
                        return;
                }
@@ -1413,7 +1410,6 @@ void HUD_Panel_Mouse()
                highlightcheck = HUD_Panel_HighlightCheck();
        }
        // draw cursor after performing move/resize to have the panel pos/size updated before highlightcheck
-       string cursor;
        vector cursorsize;
        cursorsize = '32 32 0';
 
@@ -1435,7 +1431,7 @@ float weaponspace[10];
 #define HUD_Weapons_Clear()\
        float idx;\
        for(idx = 0; idx < 10; ++idx)\
-               weaponspace[idx] = 0;
+               weaponspace[idx] = 0
 
 entity weaponorder[WEP_MAXCOUNT];
 void weaponorder_swap(float i, float j, entity pass)
@@ -1446,7 +1442,6 @@ void weaponorder_swap(float i, float j, entity pass)
        weaponorder[j] = h;
 }
 
-string weaponorder_cmp_str_save;
 string weaponorder_cmp_str;
 float weaponorder_cmp(float i, float j, entity pass)
 {
@@ -1475,7 +1470,6 @@ float GetAmmoTypeForWep(float i)
        {
                case WEP_SHOTGUN: return 0;
                case WEP_UZI: return 1;
-               case WEP_CAMPINGRIFLE: return 1;
                case WEP_GRENADE_LAUNCHER: return 2;
                case WEP_MINE_LAYER: return 2;
                case WEP_ELECTRO: return 3;
@@ -1483,6 +1477,7 @@ float GetAmmoTypeForWep(float i)
                case WEP_HLAC: return 3;
                case WEP_MINSTANEX: return 3;
                case WEP_NEX: return 3;
+               case WEP_CAMPINGRIFLE: return 1;
                case WEP_HAGAR: return 2;
                case WEP_ROCKET_LAUNCHER: return 2;
                case WEP_SEEKER: return 2;
@@ -1494,6 +1489,9 @@ float GetAmmoTypeForWep(float i)
 
 void HUD_Weapons(void)
 {
+       float f, screen_ar;
+       float center_x, center_y;
+
        if(!autocvar_hud_panel_weapons && !autocvar__hud_configure)
                return;
 
@@ -1521,7 +1519,7 @@ void HUD_Weapons(void)
 
        if (timeout && time >= weapontime + timeout && !autocvar__hud_configure)
        {
-               float f = (time - (weapontime + timeout)) / timeout_effect_length;
+               f = (time - (weapontime + timeout)) / timeout_effect_length;
                if (cvar("hud_panel_weapons_timeout_effect"))
                {
                        panel_bg_alpha *= (1 - f);
@@ -1530,10 +1528,9 @@ void HUD_Weapons(void)
                if (cvar("hud_panel_weapons_timeout_effect") == 1)
                {
                        f *= f; // for a cooler movement
-                       vector center;
                        center_x = panel_pos_x + panel_size_x/2;
                        center_y = panel_pos_y + panel_size_y/2;
-                       float screen_ar = vid_conwidth/vid_conheight;
+                       screen_ar = vid_conwidth/vid_conheight;
                        if (center_x/center_y < screen_ar) //bottom left
                        {
                                if ((vid_conwidth - center_x)/center_y < screen_ar) //bottom
@@ -1553,7 +1550,7 @@ void HUD_Weapons(void)
        }
        else if (timeout && time < weaponprevtime + timein_effect_length && !autocvar__hud_configure)
        {
-               float f = (time - weaponprevtime) / timein_effect_length;
+               f = (time - weaponprevtime) / timein_effect_length;
                if (cvar("hud_panel_weapons_timeout_effect"))
                {
                        panel_bg_alpha *= (f);
@@ -1563,10 +1560,9 @@ void HUD_Weapons(void)
                {
                        f *= f; // for a cooler movement
                        f = 1 - f;
-                       vector center;
                        center_x = panel_pos_x + panel_size_x/2;
                        center_y = panel_pos_y + panel_size_y/2;
-                       float screen_ar = vid_conwidth/vid_conheight;
+                       screen_ar = vid_conwidth/vid_conheight;
                        if (center_x/center_y < screen_ar) //bottom left
                        {
                                if ((vid_conwidth - center_x)/center_y < screen_ar) //bottom
@@ -1594,13 +1590,17 @@ void HUD_Weapons(void)
        }
 
        // TODO make this configurable
-       weaponorder_cmp_str = strcat(" ", weaponorder_byimpulse, " ");
-
-       if(weaponorder_cmp_str != weaponorder_cmp_str_save)
+       if(weaponorder_bypriority != cvar_string("cl_weaponpriority"))
        {
-               if(weaponorder_cmp_str_save)
-                       strunzone(weaponorder_cmp_str_save);
-               weaponorder_cmp_str_save = strzone(weaponorder_cmp_str);
+               if(weaponorder_bypriority)
+                       strunzone(weaponorder_bypriority);
+               if(weaponorder_byimpulse)
+                       strunzone(weaponorder_byimpulse);
+
+               weaponorder_bypriority = strzone(cvar_string("cl_weaponpriority"));
+               weaponorder_byimpulse = strzone(W_FixWeaponOrder_BuildImpulseList(W_FixWeaponOrder_ForceComplete(W_NumberWeaponOrder(weaponorder_bypriority))));
+               weaponorder_cmp_str = strcat(" ", weaponorder_byimpulse, " ");
+
                weapon_cnt = 0;
                for(i = WEP_FIRST; i <= WEP_LAST; ++i)
                {
@@ -1612,6 +1612,8 @@ void HUD_Weapons(void)
                        }
                }
                heapsort(weapon_cnt, weaponorder_swap, weaponorder_cmp, world);
+
+               weaponorder_cmp_str = string_null;
        }
 
        HUD_Panel_DrawBg(1);
@@ -1729,8 +1731,7 @@ void HUD_Weapons(void)
                                                default: fullammo = 60;
                                        }
 
-                                       vector barsize;
-                                       vector barpos;
+                                       float barsize_x, barsize_y, barpos_x, barpos_y;
                                        if(wpnsize_x/wpnsize_y > autocvar_hud_panel_weapons_aspect)
                                        {
                                                barsize_x = autocvar_hud_panel_weapons_aspect * wpnsize_y;
@@ -1956,7 +1957,8 @@ void HUD_Ammo(void)
 
 void DrawNumIcon(float iconalign, vector myPos, vector mySize, float x, string icon, float left, vector color, float alpha)
 {
-       vector newSize, newPos;
+       vector newPos;
+       float newSize_x, newSize_y;
        if(mySize_x/mySize_y > 3)
        {
                newSize_x = 3 * mySize_y;
@@ -2100,7 +2102,7 @@ void HUD_Powerups(void) {
 
                        if(autocvar_hud_panel_powerups_progressbar)
                        {
-                               HUD_Panel_GetProgressBarColor(leftname)
+                               HUD_Panel_GetProgressBarColorForString(leftname);
                                HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
                        }
                        if(leftcnt > 1)
@@ -2121,7 +2123,7 @@ void HUD_Powerups(void) {
 
                        if(autocvar_hud_panel_powerups_progressbar)
                        {
-                               HUD_Panel_GetProgressBarColor(rightname)
+                               HUD_Panel_GetProgressBarColorForString(rightname);
                                HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
                        }
                        if(rightcnt > 1)
@@ -2144,7 +2146,7 @@ void HUD_Powerups(void) {
 
                        if(autocvar_hud_panel_powerups_progressbar)
                        {
-                               HUD_Panel_GetProgressBarColor(leftname)
+                               HUD_Panel_GetProgressBarColorForString(leftname);
                                HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
                        }
                        if(leftcnt > 1)
@@ -2165,7 +2167,7 @@ void HUD_Powerups(void) {
 
                        if(autocvar_hud_panel_powerups_progressbar)
                        {
-                               HUD_Panel_GetProgressBarColor(rightname)
+                               HUD_Panel_GetProgressBarColorForString(rightname);
                                HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
                        }
                        if(rightcnt > 1)
@@ -2196,7 +2198,7 @@ void HUD_Powerups(void) {
 
                        if(autocvar_hud_panel_powerups_progressbar)
                        {
-                               HUD_Panel_GetProgressBarColor(leftname)
+                               HUD_Panel_GetProgressBarColorForString(leftname);
                                HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
                        }
                        if(leftcnt <= 5)
@@ -2226,7 +2228,7 @@ void HUD_Powerups(void) {
 
                        if(autocvar_hud_panel_powerups_progressbar)
                        {
-                               HUD_Panel_GetProgressBarColor(rightname)
+                               HUD_Panel_GetProgressBarColorForString(rightname);
                                HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
                        }
                        if(rightcnt <= 5)
@@ -2301,7 +2303,7 @@ void HUD_HealthArmor(void)
                        biggercount = "health";
                        if(autocvar_hud_panel_healtharmor_progressbar)
                        {
-                               HUD_Panel_GetProgressBarColor("health")
+                               HUD_Panel_GetProgressBarColor(health);
                                HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                        }
                        if(armor)
@@ -2312,7 +2314,7 @@ void HUD_HealthArmor(void)
                        biggercount = "armor";
                        if(autocvar_hud_panel_healtharmor_progressbar)
                        {
-                               HUD_Panel_GetProgressBarColor("armor")
+                               HUD_Panel_GetProgressBarColor(armor);
                                HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                        }
                        if(health)
@@ -2330,7 +2332,7 @@ void HUD_HealthArmor(void)
                                barpos = pos;
                                barsize = eX * mySize_x * min(1, fuel/100) + eY * 0.2 * mySize_y;
                        }
-                       HUD_Panel_GetProgressBarColor("fuel")
+                       HUD_Panel_GetProgressBarColor(fuel);
                        HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
                }
        }
@@ -2378,7 +2380,7 @@ void HUD_HealthArmor(void)
 
                                if(autocvar_hud_panel_healtharmor_progressbar)
                                {
-                                       HUD_Panel_GetProgressBarColor(leftname)
+                                       HUD_Panel_GetProgressBarColorForString(leftname);
                                        HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                                }
                                DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, HUD_Get_Num_Color(leftcnt, 200), 1);
@@ -2396,7 +2398,7 @@ void HUD_HealthArmor(void)
 
                                if(autocvar_hud_panel_healtharmor_progressbar)
                                {
-                                       HUD_Panel_GetProgressBarColor(rightname)
+                                       HUD_Panel_GetProgressBarColorForString(rightname);
                                        HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                                }
                                DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, HUD_Get_Num_Color(rightcnt, 200), 1);
@@ -2411,7 +2413,7 @@ void HUD_HealthArmor(void)
                                        barpos = pos;
                                        barsize = eX * mySize_x * min(1, fuel/100) + eY * 0.2 * mySize_y;
                                }
-                               HUD_Panel_GetProgressBarColor("fuel")
+                               HUD_Panel_GetProgressBarColor(fuel);
                                HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
                        }
                }
@@ -2429,7 +2431,7 @@ void HUD_HealthArmor(void)
 
                                if(autocvar_hud_panel_healtharmor_progressbar)
                                {
-                                       HUD_Panel_GetProgressBarColor(leftname)
+                                       HUD_Panel_GetProgressBarColorForString(leftname);
                                        HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                                }
                                DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, HUD_Get_Num_Color(leftcnt, 200), 1);
@@ -2447,7 +2449,7 @@ void HUD_HealthArmor(void)
 
                                if(autocvar_hud_panel_healtharmor_progressbar)
                                {
-                                       HUD_Panel_GetProgressBarColor(rightname)
+                                       HUD_Panel_GetProgressBarColorForString(rightname);
                                        HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                                }
                                DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, HUD_Get_Num_Color(rightcnt, 200), 1);
@@ -2462,7 +2464,7 @@ void HUD_HealthArmor(void)
                                        barpos = pos;
                                        barsize = eX * mySize_x * min(1, fuel/100) + eY * 0.1 * mySize_y;
                                }
-                               HUD_Panel_GetProgressBarColor("fuel")
+                               HUD_Panel_GetProgressBarColor(fuel);
                                HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
                        }
                }
@@ -2488,7 +2490,7 @@ void HUD_HealthArmor(void)
 
                                if(autocvar_hud_panel_healtharmor_progressbar)
                                {
-                                       HUD_Panel_GetProgressBarColor(leftname)
+                                       HUD_Panel_GetProgressBarColorForString(leftname);
                                        HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                                }
                                drawpic_aspect_skin(picpos, leftname, '0.4 0.4 0' * mySize_x, '1 1 1', leftalpha * panel_fg_alpha, DRAWFLAG_NORMAL);
@@ -2515,7 +2517,7 @@ void HUD_HealthArmor(void)
 
                                if(autocvar_hud_panel_healtharmor_progressbar)
                                {
-                                       HUD_Panel_GetProgressBarColor(rightname)
+                                       HUD_Panel_GetProgressBarColorForString(rightname);
                                        HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                                }
                                drawpic_aspect_skin(picpos, rightname, '0.4 0.4 0' * mySize_x, '1 1 1', rightalpha * panel_fg_alpha, DRAWFLAG_NORMAL);
@@ -2531,7 +2533,7 @@ void HUD_HealthArmor(void)
                                        barpos = pos + eY * mySize_y - eY * mySize_y * min(1, fuel/100);
                                        barsize = eX * 0.05 * mySize_x + eY * mySize_y * min(1, fuel/100);
                                }
-                               HUD_Panel_GetProgressBarColor("fuel")
+                               HUD_Panel_GetProgressBarColor(fuel);
                                HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
                        }
                }
@@ -4273,7 +4275,7 @@ void HUD_Mod_NexBall(vector pos, vector mySize)
                        barsize = eX * mySize_x + eY * p * mySize_y;
                        vertical = 1;
                }
-               HUD_Panel_GetProgressBarColor("nexball")
+               HUD_Panel_GetProgressBarColor(nexball);
                HUD_Panel_DrawProgressBar(pos, vertical, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
        }
 
@@ -4337,7 +4339,7 @@ void HUD_Mod_Race(vector pos, vector mySize)
        } else {
                // text on top
                squareSize = min(mySize_x, mySize_y/2);
-               textPos = pos + eY * 0.5 * max(0, mySize_y/2 - squareSize) + eX * 0.5 * (mySize_x - squareSize);;
+               textPos = pos + eY * 0.5 * max(0, mySize_y/2 - squareSize) + eX * 0.5 * (mySize_x - squareSize);
                medalPos = pos + eY * 0.5 * max(0, mySize_y/2 - squareSize) + eY * 0.5 * mySize_y + eX * 0.5 * (mySize_x - squareSize);
        }
 
@@ -4994,10 +4996,12 @@ switch (id) {\
                HUD_EngineInfo(); break;\
        case (HUD_PANEL_INFOMESSAGES):\
                 HUD_InfoMessages(); break;\
-}
+} ENDS_WITH_CURLY_BRACE
 
 void HUD_Main (void)
 {
+       float i;
+
        hud_skin_path = strcat("gfx/hud/", autocvar_hud_skin);
 
        // global hud alpha fade
@@ -5024,7 +5028,6 @@ void HUD_Main (void)
        // HUD configure visible grid
        if(autocvar__hud_configure && autocvar_hud_configure_grid && autocvar_hud_configure_grid_alpha)
        {
-               float i;
                // x-axis
                for(i = 0; i < 1/bound(0.005, autocvar_hud_configure_grid_xsize, 0.2); ++i)
                {
@@ -5089,7 +5092,7 @@ void HUD_Main (void)
 
        // draw chat panel on top if it is maximized
        if(autocvar__con_chat_maximized)
-               HUD_DrawPanel(HUD_PANEL_CHAT);
+               HUD_Chat(); // HUD_DrawPanel(HUD_PANEL_CHAT);
 
        // TODO hud_'ify these
        if (cvar("cl_showspeed"))
index 5e9d59b6ef29e1c0853e81f2d0dddf56ef12148c..7a61b515c80eb6ce87ad35efd1a449d2a73ded30 100644 (file)
@@ -80,16 +80,6 @@ var float panel_bg_border;
 var string panel_bg_border_str;
 var float panel_bg_padding;
 var string panel_bg_padding_str;
-var float panel_accuracy_yellow;
-var float panel_accuracy_onlycurrent;
-var float panel_accuracy_flip;
-var float panel_accuracy_iconalign;
-var float panel_accuracy_baralign;
-var float panel_accuracy_info_top;
-var float panel_accuracy_foreground_alpha;
-var float panel_accuracy_alreadyvoted_alpha;
-
-var string picpath;
 
 // Because calling lots of functions in QC apparently cuts fps in half on many machines:
 // ----------------------
@@ -98,14 +88,16 @@ var string picpath;
 // Little help for the poor people who have to make sense of this: Start from the bottom ;)
 
 #define HUD_Panel_GetProgressBarColor(item) \
+               progressbar_color = autocvar_hud_progressbar_##item##_color
+#define HUD_Panel_GetProgressBarColorForString(item) \
 switch(item) {\
-       case "strength": progressbar_color = autocvar_hud_progressbar_strength_color; break;\
-       case "shield": progressbar_color = autocvar_hud_progressbar_shield_color; break;\
-       case "health": progressbar_color = autocvar_hud_progressbar_health_color; break;\
-       case "armor": progressbar_color = autocvar_hud_progressbar_armor_color; break;\
-       case "fuel": progressbar_color = autocvar_hud_progressbar_fuel_color; break;\
-       case "nexball": progressbar_color = autocvar_hud_progressbar_nexball_color; break;\
-}
+       case "strength": HUD_Panel_GetProgressBarColor(strength); break;\
+       case "shield": HUD_Panel_GetProgressBarColor(shield); break;\
+       case "health": HUD_Panel_GetProgressBarColor(health); break;\
+       case "armor": HUD_Panel_GetProgressBarColor(armor); break;\
+       case "fuel": HUD_Panel_GetProgressBarColor(fuel); break;\
+       case "nexball": HUD_Panel_GetProgressBarColor(nexball); break;\
+} ENDS_WITH_CURLY_BRACE
 
 // Get value for panel_bg: if "" fetch default, else use panel_bg_str
 // comment on last line of macro: // we probably want to see a background in config mode at all times...
@@ -192,7 +184,7 @@ if(panel_bg_border_str == "") {\
        panel_bg_border = autocvar_hud_panel_bg_border;\
 } else {\
        panel_bg_border = stof(panel_bg_border_str);\
-}
+} ENDS_WITH_CURLY_BRACE
 
 // Scale the pos and size vectors to absolute coordinates
 #define HUD_Panel_GetScaledVectors()\
@@ -232,7 +224,7 @@ else\
 panel_pos = (1 - autocvar__menu_alpha) * panel_pos + (autocvar__menu_alpha) * menu_enable_panelpos;
 
 // return smoothly faded size of given panel when a dialog is active
-var vector menu_enable_maxsize;
+var vector menu_enable_maxsize; FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(menu_enable_maxsize);
 var vector menu_enable_size;
 #define HUD_Panel_GetMenuSize()\
 menu_enable_maxsize_x = 0.3 * vid_conwidth;\
@@ -271,7 +263,7 @@ HUD_Panel_StringVars()\
 if(menu_enabled == 2 && active_panel == highlightedPanel) {\
        HUD_Panel_GetMenuSize()\
        HUD_Panel_GetMenuPos()\
-}
+} ENDS_WITH_CURLY_BRACE
 
 // Update all common cvars of given panel id
 #define HUD_Panel_UpdateCvarsForId(id) \
index 049368c1636b07944ae7de43de10008dfbbd9da2..b37e209a569bbd74faa991ea2b75b35f21bc334a 100644 (file)
@@ -460,43 +460,47 @@ void drawpic_tiled(vector pos, string pic, vector sz, vector area, vector color,
 }
 
 // drawpic wrapper to draw an image as large as possible with preserved aspect ratio into a box
-var float imgaspect;
-var float aspect;
+var float _drawpic_imgaspect;
+var float _drawpic_aspect;
+var vector _drawpic_imgsize;
+var vector _drawpic_sz;
+var vector _drawpic_oldsz;
+var string _drawpic_picpath;
 #define drawpic_aspect(pos,pic,mySize,color,alpha,drawflag)\
        do {\
-               vector imgsize;\
-               imgsize = drawgetimagesize(pic);\
-               imgaspect = imgsize_x/imgsize_y;\
-               vector oldsz, sz;\
-               oldsz = sz = mySize;\
-               aspect = sz_x/sz_y;\
-               if(aspect > imgaspect) {\
-                       sz_x = sz_y * imgaspect;\
-                       drawpic(pos + eX * (oldsz_x - sz_x) * 0.5, pic, sz, color, alpha, drawflag);\
+               _drawpic_imgsize = drawgetimagesize(pic);\
+               _drawpic_imgaspect = _drawpic_imgsize_x/_drawpic_imgsize_y;\
+               _drawpic_oldsz = _drawpic_sz = mySize;\
+               _drawpic_aspect = _drawpic_sz_x/_drawpic_sz_y;\
+               if(_drawpic_aspect > _drawpic_imgaspect) {\
+                       _drawpic_sz_x = _drawpic_sz_y * _drawpic_imgaspect;\
+                       drawpic(pos + eX * (_drawpic_oldsz_x - _drawpic_sz_x) * 0.5, pic, _drawpic_sz, color, alpha, drawflag);\
                } else {\
-                       sz_y = sz_x / imgaspect;\
-                       drawpic(pos + eY * (oldsz_y - sz_y) * 0.5, pic, sz, color, alpha, drawflag);\
+                       _drawpic_sz_y = _drawpic_sz_x / _drawpic_imgaspect;\
+                       drawpic(pos + eY * (_drawpic_oldsz_y - _drawpic_sz_y) * 0.5, pic, _drawpic_sz, color, alpha, drawflag);\
                }\
        } while(0)
 
 // draw HUD element with image from gfx/hud/hud_skin/foo.tga if it exists, otherwise gfx/hud/default/foo.tga
 #define drawpic_aspect_skin(pos,pic,sz,color,alpha,drawflag)\
        do{\
-               picpath = strcat(hud_skin_path, "/", pic);\
-               if(precache_pic(picpath) == "") {\
-                       picpath = strcat("gfx/hud/default/", pic);\
+               _drawpic_picpath = strcat(hud_skin_path, "/", pic);\
+               if(precache_pic(_drawpic_picpath) == "") {\
+                       _drawpic_picpath = strcat("gfx/hud/default/", pic);\
                }\
-               drawpic_aspect(pos, picpath, sz, color, alpha, drawflag);\
+               drawpic_aspect(pos, _drawpic_picpath, sz, color, alpha, drawflag);\
+               _drawpic_picpath = string_null;\
        } while(0)
 
 // draw HUD element with image from gfx/hud/hud_skin/foo.tga if it exists, otherwise gfx/hud/default/foo.tga
 #define drawpic_skin(pos,pic,sz,color,alpha,drawflag)\
        do{\
-               picpath = strcat(hud_skin_path, "/", pic);\
-               if(precache_pic(picpath) == "") {\
-                       picpath = strcat("gfx/hud/default/", pic);\
+               _drawpic_picpath = strcat(hud_skin_path, "/", pic);\
+               if(precache_pic(_drawpic_picpath) == "") {\
+                       _drawpic_picpath = strcat("gfx/hud/default/", pic);\
                }\
-               drawpic(pos, picpath, sz, color, alpha, drawflag);\
+               drawpic(pos, _drawpic_picpath, sz, color, alpha, drawflag);\
+               _drawpic_picpath = string_null;\
        } while(0)
 
 void drawpic_aspect_skin_expanding(vector position, string pic, vector scale, vector rgb, float alpha, float flag, float fadelerp)
index 5f0afd7cfdd0476065174b76e71573f181d2079f..b61568a2aeeb9c18ae9f2a16fd14d1892c4be305 100644 (file)
@@ -976,7 +976,6 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
                        float padding;
                        padding = (weapon_width - stringwidth(s, FALSE, '1 0 0' * fontsize)) / 2; // center the accuracy value
 
-                       float weapon_hit, weapon_damage;
                        weapon_damage = weapon_fired[self.weapon-WEP_FIRST];
                        if(weapon_damage)
                        {
index 55b56507476011a0985115fd04612b0c03f10de3..a486af68edbbe1c16bf7962b02ed14b91f35dc3f 100644 (file)
@@ -172,7 +172,6 @@ float hud_panel_radar_scale;
 float hud_panel_radar_foreground_alpha;
 float hud_panel_radar_rotation;
 vector hud_panel_radar_size;
-vector hud_panel_radar_position;
 float hud_panel_radar_zoommode;
 
 void teamradar_loadcvars()
@@ -191,8 +190,7 @@ void teamradar_loadcvars()
        if(!hud_panel_radar_size_y) hud_panel_radar_size_y = hud_panel_radar_size_x;
 
        hud_panel_radar_size_z = 0;
-       hud_panel_radar_nohudhack = hud_panel_radar_position_z;
-       hud_panel_radar_position_z = 0;
+       hud_panel_radar_nohudhack = 0;
 }
 
 // radar links
index 5265cb1bbf0f01a641c21f437341e3997b92c5af..cf33b0183136745cc332ce033c22b93a46235c0a 100644 (file)
@@ -1,5 +1,6 @@
 #define TUBA_STARTNOTE(n) strcat((checkextension("DP_SND_SETPARAMS") ? "weapons/tuba_loopnote" : "weapons/tuba_note"), ftos(n), ".wav")
 .float cnt; // note
+.float attenuate; // if set, attenuate it
 
 void Ent_TubaNote_Think()
 {
@@ -16,14 +17,14 @@ void Ent_TubaNote_Think()
                remove(self);
        }
        else
-               sound(self, CHAN_PROJECTILE, "", self.cnt, cvar("g_balance_tuba_attenuation"));
+               sound(self, CHAN_PROJECTILE, "", self.cnt, self.attenuate * cvar("g_balance_tuba_attenuation"));
 }
 
 void Ent_TubaNote_UpdateSound()
 {
        self.enemy.cnt = bound(0, VOL_BASE * cvar("g_balance_tuba_volume"), 1);
        self.enemy.count = self.enemy.cnt;
-       sound(self.enemy, CHAN_PROJECTILE, TUBA_STARTNOTE(self.cnt), self.enemy.cnt, cvar("g_balance_tuba_attenuation"));
+       sound(self.enemy, CHAN_PROJECTILE, TUBA_STARTNOTE(self.cnt), self.enemy.cnt, self.enemy.attenuate * cvar("g_balance_tuba_attenuation"));
 }
 
 void Ent_TubaNote_StopSound()
@@ -52,6 +53,7 @@ void Ent_TubaNote(float bIsNew)
                self.enemy.origin_y = ReadCoord();
                self.enemy.origin_z = ReadCoord();
                setorigin(self.enemy, self.enemy.origin);
+               self.enemy.attenuate = ReadByte();
        }
        self.think = Ent_TubaNote_StopSound;
        self.entremove = Ent_TubaNote_StopSound;
index 1c30f4eec289b6b3cedd9aefc6b08390cbc52373..f53c60f0c3e1a89fdd1b000956f4e53eaa2ef8ee 100644 (file)
@@ -8,7 +8,6 @@ void Ent_Wall_Draw()
 {
        float f;
        float d;
-       vector save;
        var .vector fld;
 
        if(self.bgmscriptangular)
index 4dd3bf76e369d0d44b6cbd88d34005704db5cc20..29029f6e457562aa1a6427d7ff131b5a8d229a98 100644 (file)
@@ -310,7 +310,8 @@ const float STAT_SHOTORG = 46; // compressShotOrigin
 const float STAT_LEADLIMIT = 47;
 const float STAT_BULLETS_LOADED = 48;
 const float STAT_NEX_CHARGE = 49;
-const float STAT_HUD = 50;
+const float    STAT_LAST_PICKUP = 50;
+const float STAT_HUD = 51;
 
 // see DP source, quakedef.h
 const float STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW = 222;
index 33b48371502aaa00f1cdb922fe53cd6f3662a789..37ffb25e7c3cff3b49e3581dc69a179048483212 100644 (file)
@@ -26,8 +26,6 @@ float w_null(float dummy)
 }
 void register_weapons_done()
 {
-       entity wi;
-
        dummy_weapon_info = spawn();
        dummy_weapon_info.classname = "weapon_info";
        dummy_weapon_info.weapon = 0; // you can recognize dummies by this
@@ -48,25 +46,7 @@ void register_weapons_done()
        for(i = 24; i >= 1; --i)
                if(weapon_info[i-1])
                        weaponorder_byid = strcat(weaponorder_byid, " ", ftos(i));
-
-       float imp;
-       weaponorder_byimpulse = "";
-       for(i = 1; i <= 24; ++i)
-       {
-               wi = weapon_info[i-1];
-               if(wi && wi.impulse == 0)
-                       weaponorder_byimpulse = strcat(weaponorder_byimpulse, " ", ftos(i));
-       }
-       for(imp = 9; imp > 0; --imp)
-               for(i = 1; i <= 24; ++i)
-               {
-                       wi = weapon_info[i-1];
-                       if(wi && wi.impulse == imp)
-                               weaponorder_byimpulse = strcat(weaponorder_byimpulse, " ", ftos(i));
-               }
-
        weaponorder_byid = strzone(substring(weaponorder_byid, 1, strlen(weaponorder_byid) - 1));
-       weaponorder_byimpulse = strzone(substring(weaponorder_byimpulse, 1, strlen(weaponorder_byimpulse) - 1));
 }
 entity get_weaponinfo(float id)
 {
@@ -111,3 +91,54 @@ string W_NumberWeaponOrder(string order)
 {
        return mapPriorityList(order, W_NumberWeaponOrder_MapFunc);
 }
+
+float W_FixWeaponOrder_BuildImpulseList_buf[WEP_MAXCOUNT];
+string W_FixWeaponOrder_BuildImpulseList_order;
+void W_FixWeaponOrder_BuildImpulseList_swap(float i, float j, entity pass)
+{
+       float h;
+       h = W_FixWeaponOrder_BuildImpulseList_buf[i];
+       W_FixWeaponOrder_BuildImpulseList_buf[i] = W_FixWeaponOrder_BuildImpulseList_buf[j];
+       W_FixWeaponOrder_BuildImpulseList_buf[j] = h;
+}
+float W_FixWeaponOrder_BuildImpulseList_cmp(float i, float j, entity pass)
+{
+       entity e1, e2;
+       float d;
+       e1 = get_weaponinfo(W_FixWeaponOrder_BuildImpulseList_buf[i]);
+       e2 = get_weaponinfo(W_FixWeaponOrder_BuildImpulseList_buf[j]);
+       d = mod(e1.impulse + 9, 10) - mod(e2.impulse + 9, 10);
+       if(d != 0)
+               return -d; // high impulse first!
+       return
+               strstrofs(strcat(" ", W_FixWeaponOrder_BuildImpulseList_order, " "), sprintf(" %d ", W_FixWeaponOrder_BuildImpulseList_buf[i]), 0)
+               -
+               strstrofs(strcat(" ", W_FixWeaponOrder_BuildImpulseList_order, " "), sprintf(" %d ", W_FixWeaponOrder_BuildImpulseList_buf[j]), 0)
+               ; // low char index first!
+}
+string W_FixWeaponOrder_BuildImpulseList(string o)
+{
+       float i;
+       W_FixWeaponOrder_BuildImpulseList_order = o;
+       for(i = WEP_FIRST; i <= WEP_LAST; ++i)
+               W_FixWeaponOrder_BuildImpulseList_buf[i - WEP_FIRST] = i;
+       heapsort(WEP_LAST - WEP_FIRST + 1, W_FixWeaponOrder_BuildImpulseList_swap, W_FixWeaponOrder_BuildImpulseList_cmp, world);
+       o = "";
+       for(i = WEP_FIRST; i <= WEP_LAST; ++i)
+               o = strcat(o, " ", ftos(W_FixWeaponOrder_BuildImpulseList_buf[i - WEP_FIRST]));
+       W_FixWeaponOrder_BuildImpulseList_order = string_null;
+       return substring(o, 1, -1);
+}
+
+string W_FixWeaponOrder_AllowIncomplete(string order)
+{
+       return W_FixWeaponOrder(order, 0);
+}
+
+string W_FixWeaponOrder_ForceComplete(string order)
+{
+       if(order == "")
+               order = W_NumberWeaponOrder(cvar_defstring("cl_weaponpriority"));
+       return W_FixWeaponOrder(order, 1);
+}
+
index 62f2d8551e7c58716280895cd8c7bbc0ce531745..64d7abd644b5f9de2240e4d1779596c19ccd15e0 100644 (file)
@@ -53,7 +53,6 @@ float AMMO_COUNT = 4; // amount of ammo types to show in the inventory panel
 
 // variables:
 string weaponorder_byid;
-string weaponorder_byimpulse;
 
 // functions:
 entity get_weaponinfo(float id);
@@ -111,3 +110,11 @@ float WEPBIT_ALL;
 
 #undef REGISTER_WEAPON
 ACCUMULATE_FUNCTION(RegisterWeapons, register_weapons_done)
+
+
+string W_FixWeaponOrder(string order, float complete);
+string W_NumberWeaponOrder(string order);
+string W_NameWeaponOrder(string order);
+string W_FixWeaponOrder_BuildImpulseList(string o);
+string W_FixWeaponOrder_AllowIncomplete(string order);
+string W_FixWeaponOrder_ForceComplete(string order);
index 43a05b1c0a77bdbcb7dc0a3e424ac687e7d1b482..33889827e36deebad5975fc15b7cc171b79ff708 100644 (file)
@@ -231,7 +231,7 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp
        }
        if(fh < 0)
                return 0;
-       print("Analyzing ", fn, " to generate initial mapinfo; please edit that file later\n");
+       print("Analyzing ", fn, " to generate initial mapinfo\n");
 
        inWorldspawn = 2;
        MapInfo_Map_flags = 0;
@@ -804,69 +804,76 @@ float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, float pGametype
        fh = fopen(fn, FILE_READ);
        if(fh < 0)
        {
-               if(!pAllowGenerate)
-                       return 0;
-               _MapInfo_Map_Reset();
-               r = _MapInfo_Generate(pFilename);
-               if(!r)
-                       return 0;
-               fh = fopen(fn, FILE_WRITE);
-               fputs(fh, strcat("title ", MapInfo_Map_title, "\n"));
-               fputs(fh, strcat("description ", MapInfo_Map_description, "\n"));
-               fputs(fh, strcat("author ", MapInfo_Map_author, "\n"));
-               if(_MapInfo_Map_worldspawn_music != "")
+               fn = strcat("maps/autogenerated/", pFilename, ".mapinfo");
+               fh = fopen(fn, FILE_READ);
+               if(fh < 0)
                {
-                       if(
-                               substring(_MapInfo_Map_worldspawn_music, strlen(_MapInfo_Map_worldspawn_music) - 4, 4) == ".wav"
-                               ||
-                               substring(_MapInfo_Map_worldspawn_music, strlen(_MapInfo_Map_worldspawn_music) - 4, 4) == ".ogg"
-                       )
-                               fputs(fh, strcat("cdtrack ", substring(_MapInfo_Map_worldspawn_music, 0, strlen(_MapInfo_Map_worldspawn_music) - 4), "\n"));
+                       if(!pAllowGenerate)
+                               return 0;
+                       _MapInfo_Map_Reset();
+                       r = _MapInfo_Generate(pFilename);
+                       if(!r)
+                               return 0;
+                       fh = fopen(fn, FILE_WRITE);
+                       fputs(fh, strcat("title ", MapInfo_Map_title, "\n"));
+                       fputs(fh, strcat("description ", MapInfo_Map_description, "\n"));
+                       fputs(fh, strcat("author ", MapInfo_Map_author, "\n"));
+                       if(_MapInfo_Map_worldspawn_music != "")
+                       {
+                               if(
+                                       substring(_MapInfo_Map_worldspawn_music, strlen(_MapInfo_Map_worldspawn_music) - 4, 4) == ".wav"
+                                       ||
+                                       substring(_MapInfo_Map_worldspawn_music, strlen(_MapInfo_Map_worldspawn_music) - 4, 4) == ".ogg"
+                               )
+                                       fputs(fh, strcat("cdtrack ", substring(_MapInfo_Map_worldspawn_music, 0, strlen(_MapInfo_Map_worldspawn_music) - 4), "\n"));
+                               else
+                                       fputs(fh, strcat("cdtrack ", _MapInfo_Map_worldspawn_music, "\n"));
+                       }
                        else
-                               fputs(fh, strcat("cdtrack ", _MapInfo_Map_worldspawn_music, "\n"));
-               }
-               else
-               {
-                       n = tokenize_console(cvar_string("g_cdtracks_remaplist"));
-                       s = strcat(" ", cvar_string("g_cdtracks_dontusebydefault"), " ");
-                       for(;;)
                        {
-                               i = floor(random() * n);
-                               if(strstrofs(s, strcat(" ", argv(i), " "), 0) < 0)
-                                       break;
+                               n = tokenize_console(cvar_string("g_cdtracks_remaplist"));
+                               s = strcat(" ", cvar_string("g_cdtracks_dontusebydefault"), " ");
+                               for(;;)
+                               {
+                                       i = floor(random() * n);
+                                       if(strstrofs(s, strcat(" ", argv(i), " "), 0) < 0)
+                                               break;
+                               }
+                               fputs(fh, strcat("cdtrack ", ftos(i + 1), "\n"));
                        }
-                       fputs(fh, strcat("cdtrack ", ftos(i + 1), "\n"));
-               }
-               if(MapInfo_Map_supportedFeatures & MAPINFO_FEATURE_WEAPONS)
-                       fputs(fh, "has weapons\n");
-               else
-                       fputs(fh, "// uncomment this if you added weapon pickups: has weapons\n");
-               if(MapInfo_Map_flags & MAPINFO_FLAG_FRUSTRATING)
-                       fputs(fh, "frustrating\n");
+                       if(MapInfo_Map_supportedFeatures & MAPINFO_FEATURE_WEAPONS)
+                               fputs(fh, "has weapons\n");
+                       else
+                               fputs(fh, "// uncomment this if you added weapon pickups: has weapons\n");
+                       if(MapInfo_Map_flags & MAPINFO_FLAG_FRUSTRATING)
+                               fputs(fh, "frustrating\n");
 
-               for(i = 1; i <= MapInfo_Map_supportedGametypes; i *= 2)
-                       if(MapInfo_Map_supportedGametypes & i)
-                               fputs(fh, sprintf("gametype %s // defaults: %s\n", MapInfo_Type_ToString(i), _MapInfo_GetDefaultEx(i)));
+                       for(i = 1; i <= MapInfo_Map_supportedGametypes; i *= 2)
+                               if(MapInfo_Map_supportedGametypes & i)
+                                       fputs(fh, sprintf("gametype %s // defaults: %s\n", MapInfo_Type_ToString(i), _MapInfo_GetDefaultEx(i)));
 
-               fh2 = fopen(strcat("scripts/", pFilename, ".arena"), FILE_READ);
-               if(fh2 >= 0)
-               {
-                       fclose(fh2);
-                       fputs(fh, "settemp_for_type all sv_q3acompat_machineshotgunswap 1\n");
-               }
+                       fh2 = fopen(strcat("scripts/", pFilename, ".arena"), FILE_READ);
+                       if(fh2 >= 0)
+                       {
+                               fclose(fh2);
+                               fputs(fh, "settemp_for_type all sv_q3acompat_machineshotgunswap 1\n");
+                       }
 
-               fputs(fh, "// optional: fog density red green blue alpha mindist maxdist\n");
-               fputs(fh, "// optional: settemp_for_type (all|gametypename) cvarname value\n");
-               fputs(fh, "// optional: clientsettemp_for_type (all|gametypename) cvarname value\n");
-               fputs(fh, "// optional: size mins_x mins_y mins_z maxs_x maxs_y maxs_z\n");
-               fputs(fh, "// optional: hidden\n");
+                       fputs(fh, "// optional: fog density red green blue alpha mindist maxdist\n");
+                       fputs(fh, "// optional: settemp_for_type (all|gametypename) cvarname value\n");
+                       fputs(fh, "// optional: clientsettemp_for_type (all|gametypename) cvarname value\n");
+                       fputs(fh, "// optional: size mins_x mins_y mins_z maxs_x maxs_y maxs_z\n");
+                       fputs(fh, "// optional: hidden\n");
 
-               fclose(fh);
-               r = 2;
-               // return r;
-               fh = fopen(fn, FILE_READ);
-               if(fh < 0)
-                       error("... but I just wrote it!");
+                       fclose(fh);
+                       r = 2;
+                       // return r;
+                       fh = fopen(fn, FILE_READ);
+                       if(fh < 0)
+                               error("... but I just wrote it!");
+               }
+
+               print("WARNING: autogenerated mapinfo file ", fn, " has been loaded; please edit that file and move it to maps/", pFilename, ".mapinfo\n");
        }
 
        _MapInfo_Map_Reset();
index 2472374df33dc485ba5373a107aad432972d6f49..e7d67392ae01c4e6eeb53b569540694b36fa4e9c 100644 (file)
@@ -1,3 +1,6 @@
+#pragma flag enable subscope
+#pragma flag enable lo
+
 //float log(float x);
 #define log log_builtin \
        #undef log \
index 1efc0e3738a06a4d9e5c33cd5681571c0d1b0444..42be955f0c48d0b851c56077442b4c3cfecb9f59 100644 (file)
@@ -309,7 +309,8 @@ float db_load(string pFilename)
        fh = fopen(pFilename, FILE_READ);
        if(fh < 0)
                return db;
-       if(stof(fgets(fh)) == DB_BUCKETS)
+       l = fgets(fh);
+       if(stof(l) == DB_BUCKETS)
        {
                i = 0;
                while((l = fgets(fh)))
@@ -321,14 +322,18 @@ float db_load(string pFilename)
        }
        else
        {
-               // different count of buckets?
+               // different count of buckets, or a dump?
                // need to reorganize the database then (SLOW)
-               while((l = fgets(fh)))
+               //
+               // note: we also parse the first line (l) in case the DB file is
+               // missing the bucket count
+               do
                {
                        n = tokenizebyseparator(l, "\\");
                        for(j = 2; j < n; j += 2)
                                db_put(db, argv(j-1), uri_unescape(argv(j)));
                }
+               while((l = fgets(fh)));
        }
        fclose(fh);
        return db;
index 65bede381e453829e834ca5e330b42e58034e7ed..2de439ff2732a7775d9670b98e4ce3bd49d11fb2 100644 (file)
@@ -1,3 +1,6 @@
+// a dummy macro that prevents the "hanging ;" warning
+#define ENDS_WITH_CURLY_BRACE
+
 #define ACCUMULATE_FUNCTION(func,otherfunc) \
        #ifdef func \
        void __merge__##otherfunc() { func(); otherfunc(); } \
@@ -216,7 +219,7 @@ float get_model_parameters(string mod, float skn); // call with string_null to c
 switch(id) {\
        case HUD_PANEL_ENGINEINFO: panel_name = HUD_PANELNAME_ENGINEINFO; break; \
        case HUD_PANEL_INFOMESSAGES: panel_name = HUD_PANELNAME_INFOMESSAGES; break; \
-}
+} ENDS_WITH_CURLY_BRACE
 
 // Get name of specified panel id
 #define HUD_Panel_GetName(id) \
index b93ecaa7ce84d5f4cc63dd9099c78e1963b0e3f9..afea3e752fd871c079df07fd8cc013995297894c 100644 (file)
@@ -222,6 +222,7 @@ SKINBEGIN
        SKINVECTOR(COLOR_SERVERLIST_FAVORITE, '1 1 1');
        SKINFLOAT(ALPHA_SERVERLIST_IMPOSSIBLE, 0.7);
        SKINVECTOR(COLOR_SERVERLIST_IMPOSSIBLE, '0.3 0.3 0.3');
+       SKINSTRING(GFX_SERVERLIST_ICON, "icon");
 
        // item: server info
        SKINVECTOR(COLOR_SERVERINFO_NAME, '1 1 1');
index 058bfd7eb16638eb4722631ce48d2f022685050d..645b9320750fcedced0f2c6b7f0ec5947a7af888 100644 (file)
@@ -66,7 +66,7 @@ void XonoticCrosshairButton_draw(entity me)
        float a;
 
        rgb = eX * cvar("crosshair_color_red") + eY * cvar("crosshair_color_green") + eZ * cvar("crosshair_color_blue");
-       a = cvar("crosshair_color_alpha");
+       a = cvar("crosshair_alpha");
 
        if(!me.checked && !me.focused)
        {
index 2d75d43652512e6cdcf2dac5b010de2bf13f320f..a49e3529c0cbcc099a78094f1e68e690fc01ce86 100644 (file)
@@ -6,7 +6,7 @@ CLASS(XonoticAdvancedDialog) EXTENDS(XonoticDialog)
        ATTRIB(XonoticAdvancedDialog, title, string, "Advanced server settings")
        ATTRIB(XonoticAdvancedDialog, color, vector, SKINCOLOR_DIALOG_ADVANCED)
        ATTRIB(XonoticAdvancedDialog, intendedWidth, float, 0.5)
-       ATTRIB(XonoticAdvancedDialog, rows, float, 14)
+       ATTRIB(XonoticAdvancedDialog, rows, float, 13)
        ATTRIB(XonoticAdvancedDialog, columns, float, 3)
        ATTRIB(XonoticAdvancedDialog, refilterEntity, entity, NULL)
 ENDCLASS(XonoticAdvancedDialog)
@@ -30,10 +30,6 @@ void XonoticAdvancedDialog_fill(entity me)
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Spawn shield:"));
                me.TD(me, 1, 1.7, e = makeXonoticSlider(0, 15, 0.5, "g_spawnshieldtime"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Start delay:"));
-               me.TD(me, 1, 1.7, e = makeXonoticSlider(0, 30, 0.5, "g_start_delay"));
        me.TR(me);
        me.TR(me);
                me.TDempty(me, 0.2);
index 21eefeae6d72ef0ea83f5878215f6b85c7276321..ec006bd82141162885aa53262756d503c4e24b9e 100644 (file)
@@ -5,7 +5,7 @@ CLASS(XonoticServerInfoDialog) EXTENDS(XonoticDialog)
        ATTRIB(XonoticServerInfoDialog, title, string, "Server Information")
        ATTRIB(XonoticServerInfoDialog, color, vector, SKINCOLOR_DIALOG_SERVERINFO)
        ATTRIB(XonoticServerInfoDialog, intendedWidth, float, 0.68)
-       ATTRIB(XonoticServerInfoDialog, rows, float, 14)
+       ATTRIB(XonoticServerInfoDialog, rows, float, 15)
        ATTRIB(XonoticServerInfoDialog, columns, float, 12)
 
        ATTRIB(XonoticServerInfoDialog, currentServerName, string, string_null)
@@ -21,7 +21,7 @@ CLASS(XonoticServerInfoDialog) EXTENDS(XonoticDialog)
        ATTRIB(XonoticServerInfoDialog, currentServerKey, string, string_null)
        ATTRIB(XonoticServerInfoDialog, currentServerID, string, string_null)
        ATTRIB(XonoticServerInfoDialog, currentServerEncrypt, string, string_null)
-       ATTRIB(XonoticServerInfoDialog, currentServerCanConnect, string, string_null)
+       ATTRIB(XonoticServerInfoDialog, currentServerPure, string, string_null)
 
        ATTRIB(XonoticServerInfoDialog, nameLabel, entity, NULL)
        ATTRIB(XonoticServerInfoDialog, cnameLabel, entity, NULL)
@@ -37,6 +37,7 @@ CLASS(XonoticServerInfoDialog) EXTENDS(XonoticDialog)
        ATTRIB(XonoticServerInfoDialog, idLabel, entity, NULL)
        ATTRIB(XonoticServerInfoDialog, encryptLabel, entity, NULL)
        ATTRIB(XonoticServerInfoDialog, canConnectLabel, entity, NULL)
+       ATTRIB(XonoticServerInfoDialog, pureLabel, entity, NULL)
 ENDCLASS(XonoticServerInfoDialog)
 
 float SLIST_FIELD_NAME;
@@ -55,8 +56,52 @@ void Join_Click(entity btn, entity me);
 #ifdef IMPLEMENTATION
 void XonoticServerInfoDialog_loadServerInfo(entity me, float i)
 {
-       float m;
-       string s, typestr, versionstr, numh, maxp;
+       float m, pure, j;
+       string s, typestr, versionstr, numh, maxp, k, v;
+
+       if(me.currentServerName)
+               strunzone(me.currentServerName);
+       me.currentServerName = string_null;
+       if(me.currentServerCName)
+               strunzone(me.currentServerCName);
+       me.currentServerCName = string_null;
+       if(me.currentServerType)
+               strunzone(me.currentServerType);
+       me.currentServerType = string_null;
+       if(me.currentServerMap)
+               strunzone(me.currentServerMap);
+       me.currentServerMap = string_null;
+       if(me.currentServerPlayers)
+               strunzone(me.currentServerPlayers);
+       me.currentServerPlayers = string_null;
+       if(me.currentServerNumPlayers)
+               strunzone(me.currentServerNumPlayers);
+       me.currentServerNumPlayers = string_null;
+       if(me.currentServerNumBots)
+               strunzone(me.currentServerNumBots);
+       me.currentServerNumBots = string_null;
+       if(me.currentServerMod)
+               strunzone(me.currentServerMod);
+       me.currentServerMod = string_null;
+       if(me.currentServerVersion)
+               strunzone(me.currentServerVersion);
+       me.currentServerVersion = string_null;
+       if(me.currentServerPing)
+               strunzone(me.currentServerPing);
+       me.currentServerPing = string_null;
+       if(me.currentServerKey)
+               strunzone(me.currentServerKey);
+       me.currentServerKey = string_null;
+       if(me.currentServerID)
+               strunzone(me.currentServerID);
+       me.currentServerID = string_null;
+       // not zoned!
+       //if(me.currentServerEncrypt)
+       //      strunzone(me.currentServerEncrypt);
+       //me.currentServerEncrypt = string_null;
+       if(me.currentServerPure)
+               strunzone(me.currentServerPure);
+       me.currentServerPure = string_null;
 
        SLIST_FIELD_NAME = gethostcacheindexforkey("name");
        me.currentServerName = strzone(gethostcachestring(SLIST_FIELD_NAME, i));
@@ -66,19 +111,28 @@ void XonoticServerInfoDialog_loadServerInfo(entity me, float i)
        me.currentServerCName = strzone(gethostcachestring(SLIST_FIELD_CNAME, i));
        me.cnameLabel.setText(me.cnameLabel, me.currentServerCName);
 
+       pure = -1;
+       typestr = "N/A";
+       versionstr = "N/A";
+
        SLIST_FIELD_QCSTATUS = gethostcacheindexforkey("qcstatus");
        s = gethostcachestring(SLIST_FIELD_QCSTATUS, i);
        m = tokenizebyseparator(s, ":");
-       if(m > 1)
+       if(m >= 2)
        {
-               typestr = argv (0);
+               typestr = argv(0);
                versionstr = argv(1);
        }
-       else
+       for(j = 2; j < m; ++j)
        {
-               typestr = "N/A";
-               versionstr = "N/A";
+               if(argv(j) == "")
+                       break;
+               k = substring(argv(j), 0, 1);
+               v = substring(argv(j), 1, -1);
+               if(k == "P")
+                       pure = stof(v);
        }
+
        me.currentServerType = strzone(typestr);
        me.typeLabel.setText(me.typeLabel, me.currentServerType);
 
@@ -109,6 +163,10 @@ void XonoticServerInfoDialog_loadServerInfo(entity me, float i)
        me.currentServerVersion = strzone(versionstr);
        me.versionLabel.setText(me.versionLabel, me.currentServerVersion);
 
+       me.currentServerPure = ((pure < 0) ? "N/A" : (pure == 0) ? "Official settings" : sprintf("%d modified settings", pure));
+       me.currentServerPure = strzone(me.currentServerPure);
+       me.pureLabel.setText(me.pureLabel, me.currentServerPure);
+
        SLIST_FIELD_PING = gethostcacheindexforkey("ping");
        s = ftos(gethostcachenumber(SLIST_FIELD_PING, i));
        me.currentServerPing = strzone(s);
@@ -192,6 +250,11 @@ void XonoticServerInfoDialog_fill(entity me)
                me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
                        e.allowCut = 1;
                        me.mapLabel = e;
+       me.TR(me);
+               me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Gameplay:"));
+               me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
+                       e.allowCut = 1;
+                       me.pureLabel = e;
        me.TR(me);
                me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Players:"));
                me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
index 751c5559180c592e5ac2b350dea2ad1b00afb0d6..2a075f4c921e943a796e2483eedeace3b48d6e1e 100644 (file)
@@ -92,7 +92,8 @@ void XonoticPlayerSettingsTab_fill(entity me)
        me.TR(me);
                sl = makeXonoticSlider(0.45, 0.75, 0.01, "cl_bobcycle");
                me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, sl, "View bobbing:"));
-               me.TD(me, 1, 2, sl);    
+               makeMulti(sl, "cl_bob2cycle");
+               me.TD(me, 1, 2, sl);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Zoom factor:"));
                me.TD(me, 1, 2, e = makeXonoticSlider(2, 16, 0.5, "cl_zoomfactor"));
@@ -131,7 +132,7 @@ void XonoticPlayerSettingsTab_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair alpha:"));
-               me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.1, "crosshair_color_alpha"));
+               me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.1, "crosshair_alpha"));
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair red:"));
index 584e1d9b1cd0f448a80c3518319aa54b04b04280..dcc6a64f3681652d777d6fcf090ccf9779b60059 100644 (file)
@@ -22,7 +22,7 @@ string XonoticWaypointDialog_toString(entity me)
 }
 void XonoticWaypointDialog_fill(entity me)
 {
-       entity e, sl;
+       entity e;
        
        me.TR(me);
                me.TD(me, 1, 4, makeXonoticTextLabel(0, "Waypoint settings:"));
index d5fbd82fd94c89692f55ab0f9fcf52cb41b43f4c..19b232f8ca504f2abffc9e454be90f6b72292e0f 100644 (file)
@@ -34,11 +34,11 @@ float updateCompression()
 {
        float fh;
        float have_dds, have_jpg, have_tga;
-       if((have_dds = (fh = fopen("dds/particles/particlefont.dds", FILE_READ) >= 0)))
+       if((have_dds = ((fh = fopen("dds/particles/particlefont.dds", FILE_READ)) >= 0)))
                fclose(fh);
-       if((have_jpg = (fh = fopen("particles/particlefont.jpg", FILE_READ) >= 0)))
+       if((have_jpg = ((fh = fopen("particles/particlefont.jpg", FILE_READ)) >= 0)))
                fclose(fh);
-       if((have_tga = (fh = fopen("particles/particlefont.tga", FILE_READ) >= 0)))
+       if((have_tga = ((fh = fopen("particles/particlefont.tga", FILE_READ)) >= 0)))
                fclose(fh);
        if(have_dds && (have_jpg || have_tga))
        {
index f4f7526f04bd610070fc8a4b738baeb773e6ca0d..bbef3a6b1c2d6acdeb245a401e18f3d4b1afa00c 100644 (file)
@@ -99,15 +99,15 @@ void XonoticPlayerModelSelector_destroy(entity me)
 
 void XonoticPlayerModelSelector_loadCvars(entity me)
 {
-       string skin, model;
+       string skin, modelname;
        float i;
 
        skin = cvar_string("_cl_playerskin");
-       model = cvar_string("_cl_playermodel");
+       modelname = cvar_string("_cl_playermodel");
 
        for(i = 0; i < me.numModels; ++i)
        {
-               if(bufstr_get(me.bufModels, BUFMODELS_COUNT*i+BUFMODELS_MODEL) == model)
+               if(bufstr_get(me.bufModels, BUFMODELS_COUNT*i+BUFMODELS_MODEL) == modelname)
                if(bufstr_get(me.bufModels, BUFMODELS_COUNT*i+BUFMODELS_SKIN) == skin)
                        break;
        }
index 95e1f80b81d2971d37658f40ae85da4c1e7448b5..ce9676f3781dbafaf81d8f267917d4ebcbfdbbfa 100644 (file)
@@ -10,6 +10,8 @@ CLASS(XonoticServerList) EXTENDS(XonoticListBox)
 
        ATTRIB(XonoticServerList, realFontSize, vector, '0 0 0')
        ATTRIB(XonoticServerList, realUpperMargin, float, 0)
+       ATTRIB(XonoticServerList, columnIconsOrigin, float, 0)
+       ATTRIB(XonoticServerList, columnIconsSize, float, 0)
        ATTRIB(XonoticServerList, columnPingOrigin, float, 0)
        ATTRIB(XonoticServerList, columnPingSize, float, 0)
        ATTRIB(XonoticServerList, columnNameOrigin, float, 0)
@@ -490,12 +492,14 @@ void XonoticServerList_resizeNotify(entity me, vector relOrigin, vector relSize,
        me.realFontSize_x = me.fontSize / (absSize_x * (1 - me.controlWidth));
        me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
 
-       me.columnPingOrigin = 0;
+       me.columnIconsOrigin = 0;
+       me.columnIconsSize = me.realFontSize_x * 2;
        me.columnPingSize = me.realFontSize_x * 4;
        me.columnMapSize = me.realFontSize_x * 12;
        me.columnTypeSize = me.realFontSize_x * 4;
        me.columnPlayersSize = me.realFontSize_x * 6;
-       me.columnNameSize = 1 - me.columnPlayersSize - me.columnMapSize - me.columnPingSize - me.columnTypeSize - 4 * me.realFontSize_x;
+       me.columnNameSize = 1 - me.columnPlayersSize - me.columnMapSize - me.columnPingSize - me.columnIconsSize - me.columnTypeSize - 5 * me.realFontSize_x;
+       me.columnPingOrigin = me.columnIconsOrigin + me.columnIconsSize + me.realFontSize_x;
        me.columnNameOrigin = me.columnPingOrigin + me.columnPingSize + me.realFontSize_x;
        me.columnMapOrigin = me.columnNameOrigin + me.columnNameSize + me.realFontSize_x;
        me.columnTypeOrigin = me.columnMapOrigin + me.columnMapSize + me.realFontSize_x;
@@ -598,7 +602,44 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
                theColor = SKINCOLOR_SERVERLIST_IMPOSSIBLE;
                theAlpha = SKINALPHA_SERVERLIST_IMPOSSIBLE;
        }
-       // TODO show an icon for encryption status
+
+       if(q == 1)
+       {
+               if(cvar("crypto_aeslevel") >= 2)
+                       q |= 4;
+       }
+       if(q == 2)
+       {
+               if(cvar("crypto_aeslevel") >= 1)
+                       q |= 4;
+       }
+       if(q == 3)
+               q = 5;
+       if(q >= 3)
+               q -= 2;
+       // possible status:
+       // 0: crypto off
+       // 1: AES possible
+       // 2: AES recommended but not available
+       // 3: AES possible and will be used
+       // 4: AES recommended and will be used
+       // 5: AES required
+
+       s = gethostcachestring(SLIST_FIELD_QCSTATUS, i);
+       {
+               vector iconSize;
+               iconSize_y = 1;
+               iconSize_x = iconSize_y * (absSize_y / absSize_x);
+
+               vector iconPos;
+               iconPos_x = (me.columnIconsSize - 2 * iconSize_x) * 0.5;
+               iconPos_y = (1 - iconSize_y) * 0.5;
+
+               draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_pure", ftos(strstrofs(s, ":P0:", 0) >= 0)), iconSize, '1 1 1', 1);
+
+               iconPos_x += iconSize_x;
+               draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_aeslevel", ftos(q)), iconSize, '1 1 1', 1);
+       }
 
        s = ftos(p);
        draw_Text(me.realUpperMargin * eY + (me.columnPingSize - draw_TextWidth(s, 0, me.realFontSize)) * eX, s, me.realFontSize, theColor, theAlpha, 0);
index 66b58df8c356f6f57900ccd9d510bc8dce07c5f4..36334b27127b218ece882fbbc6ea47da559fdad9 100644 (file)
@@ -1,4 +1,3 @@
 float autocvar_sv_cheats;
 float autocvar_g_bastet;
 var float autocvar_g_movement_highspeed = 1;
-var float autocvar_sys_ticrate;
index 4d150fcca9da9e9d0338c83eb6394d8f500e152c..196e3d7b6963d5ba34ac2e56b0ca679645360264 100644 (file)
@@ -101,7 +101,7 @@ entity bot_getplace(string placename)
        {
                e = find(world, targetname, placename);
                if(!e)
-                       print("invalid place ", s, "\n");
+                       print("invalid place ", placename, "\n");
                return e;
        }
 }
index 76f81c8d7497080cc9ea3a3171631d42f824d859..66a838a31cfa0e2ebdfb8aee4ccad1a6e197bc68 100644 (file)
@@ -1712,6 +1712,8 @@ void ClientDisconnect (void)
                strunzone(self.netname_previous);
        if(self.clientstatus)
                strunzone(self.clientstatus);
+       if(self.weaponorder_byimpulse)
+               strunzone(self.weaponorder_byimpulse);
 
        ClearPlayerSounds();
 
@@ -2240,6 +2242,7 @@ void SpectateCopy(entity spectatee) {
        self.health = spectatee.health;
        self.impulse = 0;
        self.items = spectatee.items;
+       self.last_pickup = spectatee.last_pickup;
        self.metertime = spectatee.metertime;
        self.strength_finished = spectatee.strength_finished;
        self.invincible_finished = spectatee.invincible_finished;
index 782ecd65caa9718805c85878f3976bbaf555e5eb..e211275b0f3eb4f7d1af694562ada31beabe39ae 100644 (file)
@@ -37,8 +37,6 @@ float sv_airspeedlimit_nonqw;
 .float multijump_ready;
 .float prevjumpbutton;
 
-.float nexspeed;
-
 /*
 =============
 PlayerJump
@@ -268,7 +266,7 @@ void RaceCarPhysics()
        // using this move type for "big rigs"
        // the engine does not push the entity!
 
-       float accel, steer, f;
+       float accel, steer, f, myspeed, steerfactor;
        vector angles_save, rigvel;
 
        angles_save = self.angles;
@@ -294,7 +292,7 @@ void RaceCarPhysics()
 
        if(self.flags & FL_ONGROUND || g_bugrigs_air_steering)
        {
-               float myspeed, upspeed, steerfactor, accelfactor;
+               float upspeed, accelfactor;
 
                myspeed = self.velocity * v_forward;
                upspeed = self.velocity * v_up;
index db8bc4bfc94ec7b8bda49b0a2146bc58576348eb..d890f5d591ad49bc4ef21d0a9a2456704f5a5752 100644 (file)
@@ -488,15 +488,18 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
 
                                        if(sound_allowed(MSG_BROADCAST, attacker))
                                        if(!DEATH_ISWEAPON(deathtype, WEP_LASER) || attacker != self || self.health < 2 * cvar("g_balance_laser_primary_damage") * cvar("g_balance_selfdamagepercent") + 1)
+                                       if(self.health > 1)
                                        // exclude pain sounds for laserjumps as long as you aren't REALLY low on health and would die of the next two
                                        {
-                                               if(self.health > 75) // TODO make a "gentle" version?
+                                               if(deathtype == DEATH_FALL)
+                                                       PlayerSound(playersound_fall, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
+                                               else if(self.health > 75) // TODO make a "gentle" version?
                                                        PlayerSound(playersound_pain100, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
                                                else if(self.health > 50)
                                                        PlayerSound(playersound_pain75, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
                                                else if(self.health > 25)
                                                        PlayerSound(playersound_pain50, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
-                                               else if(self.health > 1)
+                                               else
                                                        PlayerSound(playersound_pain25, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
                                        }
                                }
@@ -855,6 +858,7 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f
 {
        string msgstr, colorstr, cmsgstr, namestr, fullmsgstr, sourcemsgstr, fullcmsgstr, sourcecmsgstr, privatemsgprefix;
        float flood, privatemsgprefixlen;
+       var .float flood_field;
        entity head;
        float ret;
 
@@ -936,7 +940,6 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f
                float flood_spl;
                float flood_burst;
                float flood_lmax;
-               var .float flood_field;
                float lines;
                if(privatesay)
                {
@@ -998,10 +1001,10 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f
                        else
                                flood = 1;
                }
-       }
 
-       if (timeoutStatus == 2) //when game is paused, no flood protection
-               source.flood_field = flood = 0;
+               if (timeoutStatus == 2) //when game is paused, no flood protection
+                       source.flood_field = flood = 0;
+       }
 
        if(flood == 2) // cannot happen for empty msgstr
        {
index 540e3f84acbba076156d31ddbe8cb20f54a6339f..477b641ba7e61d21ba7d28989827ccbe20a5ef8a 100644 (file)
@@ -123,7 +123,7 @@ void W_NextWeapon(float list)
        if(list == 0)
                W_CycleWeapon(weaponorder_byid, -1);
        else if(list == 1)
-               W_CycleWeapon(weaponorder_byimpulse, -1);
+               W_CycleWeapon(self.weaponorder_byimpulse, -1);
        else if(list == 2)
                W_CycleWeapon(self.cvar_cl_weaponpriority, -1);
 }
@@ -134,23 +134,11 @@ void W_PreviousWeapon(float list)
        if(list == 0)
                W_CycleWeapon(weaponorder_byid, +1);
        else if(list == 1)
-               W_CycleWeapon(weaponorder_byimpulse, +1);
+               W_CycleWeapon(self.weaponorder_byimpulse, +1);
        else if(list == 2)
                W_CycleWeapon(self.cvar_cl_weaponpriority, +1);
 }
 
-string W_FixWeaponOrder_AllowIncomplete(string order)
-{
-       return W_FixWeaponOrder(order, 0);
-}
-
-string W_FixWeaponOrder_ForceComplete(string order)
-{
-       if(order == "")
-               order = W_NumberWeaponOrder(cvar_string("cl_weaponpriority"));
-       return W_FixWeaponOrder(order, 1);
-}
-
 float w_getbestweapon(entity e)
 {
        return W_GetCycleWeapon(e, e.cvar_cl_weaponpriority, 0, -1, FALSE, TRUE);
index a92da718fe3583cdcd068c358f039adf2b2467ca..df19ab592f4779beb94a38881992e37150a43ae0 100644 (file)
@@ -364,6 +364,8 @@ void SV_ParseClientCommand(string s) {
                Score_NicePrint(self);
        } else if(cmd == "cvar_changes") {
                sprint(self, cvar_changes);
+       } else if(cmd == "cvar_purechanges") {
+               sprint(self, cvar_purechanges);
        } else if(CheatCommand(tokens)) {
        } else {
                //if(ctf_clientcommand())
index 9295547c530f03e929d6310ffaa267628e43f955..45394eb7925db2bf34fd5e10818131e5646af2dc 100644 (file)
@@ -227,7 +227,6 @@ float WS_READY                      = 4; // idle frame
 void weapon_defaultspawnfunc(float wpn);
 
 string w_deathtypestring;
-float w_deathtype;
 
 void(entity client, string s) centerprint_builtin = #73;
 .vector dest1, dest2;
@@ -297,7 +296,6 @@ string getTimeoutText(float addOneSecond);
 .entity flagcarried;
 
 .entity lastrocket;
-.entity lastmine;
 
 .float playerid;
 float playerid_last;
@@ -329,6 +327,8 @@ float sv_loddistance2;
 .float cvar_cl_gunalign;
 .float cvar_cl_noantilag;
 
+.string weaponorder_byimpulse;
+
 .float cvar_cl_allow_uid2name;
 .string stored_netname;
 
@@ -526,6 +526,8 @@ string clientstuff;
 .string fog;
 
 string cvar_changes;
+string cvar_purechanges;
+float cvar_purechanges_count;
 
 float game_starttime; //point in time when the countdown is over
 .float stat_game_starttime;
@@ -606,6 +608,8 @@ string matchid;
 .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);
 
index ab0638387e472b6eeaf43830a065a388fd78a733..6f8c9490ef907175c088a5c51315dcaef1ce8f38 100644 (file)
@@ -278,7 +278,7 @@ void Send_CSQC_Centerprint(entity e, string s1, string s2, float msg, float type
 void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
 {
        string  s, a, msg;
-       float p, w, type;
+       float w, type;
 
        if (targ.classname == "player" || targ.classname == "corpse")
        {
@@ -342,7 +342,6 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                        }
                        else
                        {
-                               string blood_message, victim_message;
                                if (!checkrules_firstblood)
                                {
                                        checkrules_firstblood = TRUE;
index ce3d9b72b8fe9db1f484e27ac4bc620d90bd3b53..88e1ced882da3542ae100acae2851010993a6694 100644 (file)
@@ -268,7 +268,7 @@ void GrapplingHookThink()
        }
 
        makevectors(self.angles_x * '-1 0 0' + self.angles_y * '0 1 0');
-       myorg = WarpZone_RefSys_TransformOrigin(self, self.owner, self.origin) + v_forward * (-9);
+       myorg = WarpZone_RefSys_TransformOrigin(self, self.owner, self.origin); // + v_forward * (-9);
 
        if(myorg != self.hook_start)
        {
@@ -343,6 +343,10 @@ void FireGrapplingHook (void)
        // UGLY WORKAROUND: play this on CHAN_WEAPON2 so it can't cut off fire sounds
        sound (self, CHAN_WEAPON2, "weapons/hook_fire.wav", VOL_BASE, ATTN_NORM);
        org = self.origin + self.view_ofs + v_forward * vs_x + v_right * -vs_y + v_up * vs_z;
+
+       tracebox(self.origin + self.view_ofs, '-3 -3 -3', '3 3 3', org, MOVE_NORMAL, self);
+       org = trace_endpos;
+
        pointparticles(particleeffectnum("grapple_muzzleflash"), org, '0 0 0', 1);
 
        missile = WarpZone_RefSys_SpawnSameRefSys(self);
index 64226b21b2a3e16d30807a80159fd62a1edab0e5..21208a2a197acaa25e38e55f8f4aaf81e227c7f4 100644 (file)
@@ -1242,4 +1242,8 @@ float TetrisPostFrame()
        return 1;
 };
 
+#else
+
+FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(autocvar_g_bastet);
+
 #endif
index b761e97c7696a764d2a3fde35b4341089bc5d653..ce7b8e2a15720eec91658e0c48b93faf9e832b8b 100644 (file)
@@ -213,16 +213,23 @@ void cvar_changes_init()
 {
        float h;
        string k, v, d;
-       float n, i;
+       float n, i, adding, pureadding;
 
        if(cvar_changes)
                strunzone(cvar_changes);
        cvar_changes = string_null;
+       if(cvar_purechanges)
+               strunzone(cvar_purechanges);
+       cvar_purechanges = string_null;
+       cvar_purechanges_count = 0;
 
        h = buf_create();
        buf_cvarlist(h, "", "_"); // exclude all _ cvars as they are temporary
        n = buf_getsize(h);
 
+       adding = TRUE;
+       pureadding = TRUE;
+
        for(i = 0; i < n; ++i)
        {
                k = bufstr_get(h, i);
@@ -239,22 +246,30 @@ void cvar_changes_init()
                BADPREFIX("sv_world");
 
                // client
+               BADPREFIX("chase_");
                BADPREFIX("cl_");
                BADPREFIX("con_");
+               BADPREFIX("scoreboard_");
                BADPREFIX("g_campaign");
                BADPREFIX("gl_");
                BADPREFIX("joy");
+               BADPREFIX("hud_");
                BADPREFIX("menu_");
                BADPREFIX("net_slist_");
                BADPREFIX("r_");
                BADPREFIX("sbar_");
                BADPREFIX("scr_");
+               BADPREFIX("snd_");
                BADPREFIX("userbind");
                BADPREFIX("v_");
                BADPREFIX("vid_");
                BADPREFIX("crosshair");
                BADCVAR("mod_q3bsp_lightmapmergepower");
                BADCVAR("mod_q3bsp_nolightmaps");
+               BADCVAR("fov");
+               BADCVAR("mastervolume");
+               BADCVAR("volume");
+               BADCVAR("bgmvolume");
 
                // private
                BADCVAR("serverconfig");
@@ -282,6 +297,9 @@ void cvar_changes_init()
                BADCVAR("timestamps");
                BADCVAR("net_address");
                BADCVAR("net_address_ipv6");
+               BADPREFIX("sv_weaponstats_");
+               BADCVAR("developer");
+               BADPREFIX("developer_");
 
                // mapinfo
                BADCVAR("timelimit");
@@ -307,27 +325,124 @@ void cvar_changes_init()
                BADCVAR("g_maplist");
                BADCVAR("g_maplist_mostrecent");
                BADCVAR("sv_motd");
-#undef BADPREFIX
-#undef BADCVAR
 
                v = cvar_string(k);
                d = cvar_defstring(k);
-               if(v != d)
+               if(v == d)
+                       continue;
+
+               if(adding)
                {
                        cvar_changes = strcat(cvar_changes, k, " \"", v, "\" // \"", d, "\"\n");
                        if(strlen(cvar_changes) > 16384)
                        {
                                cvar_changes = "// too many settings have been changed to show them here\n";
-                               break;
+                               adding = 0;
                        }
                }
+
+               // now check if the changes are actually gameplay relevant
+
+               // does nothing visible
+               BADPREFIX("prvm_");
+               BADPREFIX("crypto_");
+               BADPREFIX("g_chat_");
+               BADPREFIX("sv_fragmessage_");
+               BADPREFIX("sv_vote_");
+               BADPREFIX("timelimit_");
+
+               // allowed changes to server admins (please sync this to server.cfg)
+               // vi commands:
+               //   :/"impure"/,$d
+               //   :g!,^\/\/[^ /],d
+               //   :%s,//\([^ ]*\).*,BADCVAR("\1");,
+               //   :%!sort
+               // yes, this does contain some redundant stuff, don't really care
+               BADCVAR("bot_number");
+               BADCVAR("bot_prefix");
+               BADCVAR("bot_suffix");
+               BADCVAR("capturelimit_override");
+               BADCVAR("fraglimit_override");
+               BADCVAR("gametype");
+               BADCVAR("g_antilag");
+               BADCVAR("g_balance_teams");
+               BADCVAR("g_balance_teams_force");
+               BADCVAR("g_ban_sync_trusted_servers");
+               BADCVAR("g_ban_sync_uri");
+               BADCVAR("g_ctf_capture_limit");
+               BADCVAR("g_ctf_ignore_frags");
+               BADCVAR("g_ctf_win_mode");
+               BADCVAR("g_domination_point_limit");
+               BADCVAR("g_fullbrightitems");
+               BADCVAR("g_fullbrightplayers");
+               BADCVAR("g_keyhunt_point_limit");
+               BADCVAR("g_keyhunt_teams_override");
+               BADCVAR("g_lms_lives_override");
+               BADCVAR("g_maplist");
+               BADCVAR("g_maplist_check_waypoints");
+               BADCVAR("g_maplist_mostrecent_count");
+               BADCVAR("g_maplist_shuffle");
+               BADCVAR("g_maplist_votable");
+               BADCVAR("g_maplist_votable_abstain");
+               BADCVAR("g_maplist_votable_nodetail");
+               BADCVAR("g_maplist_votable_suggestions");
+               BADCVAR("g_nexball_goallimit");
+               BADCVAR("g_runematch_point_limit");
+               BADCVAR("g_start_delay");
+               BADCVAR("hostname");
+               BADCVAR("log_file");
+               BADCVAR("maxplayers");
+               BADCVAR("minplayers");
+               BADCVAR("net_address");
+               BADCVAR("port");
+               BADCVAR("rcon_password");
+               BADCVAR("rcon_restricted_commands");
+               BADCVAR("rcon_restricted_password");
+               BADCVAR("skill");
+               BADCVAR("sv_autoscreenshot");
+               BADCVAR("sv_curl_defaulturl");
+               BADCVAR("sv_defaultcharacter");
+               BADCVAR("sv_defaultplayermodel");
+               BADCVAR("sv_defaultplayerskin");
+               BADCVAR("sv_maxrate");
+               BADCVAR("sv_maxidle");
+               BADCVAR("sv_motd");
+               BADCVAR("sv_public");
+               BADCVAR("sv_ready_restart");
+               BADCVAR("sv_status_privacy");
+               BADCVAR("sv_vote_call");
+               BADCVAR("sv_vote_commands");
+               BADCVAR("sv_vote_majority_factor");
+               BADCVAR("sv_vote_master");
+               BADCVAR("sv_vote_master_commands");
+               BADCVAR("sv_vote_master_password");
+               BADCVAR("sv_vote_simple_majority_factor");
+               BADCVAR("timelimit_override");
+#undef BADPREFIX
+#undef BADCVAR
+
+               if(pureadding)
+               {
+                       cvar_purechanges = strcat(cvar_purechanges, k, " \"", v, "\" // \"", d, "\"\n");
+                       if(strlen(cvar_purechanges) > 16384)
+                       {
+                               cvar_purechanges = "// too many settings have been changed to show them here\n";
+                               pureadding = 0;
+                       }
+               }
+               ++cvar_purechanges_count;
        }
        buf_del(h);
        if(cvar_changes == "")
-               cvar_changes = "// this server runs at default settings\n";
+               cvar_changes = "// this server runs at default server settings\n";
        else
-               cvar_changes = strcat("// this server runs at modified settings:\n", cvar_changes);
+               cvar_changes = strcat("// this server runs at modified server settings:\n", cvar_changes);
        cvar_changes = strzone(cvar_changes);
+       if(cvar_purechanges == "")
+               cvar_purechanges = "// this server runs at default gameplay settings\n";
+       else
+               cvar_purechanges = strcat("// this server runs at modified gameplay settings:\n", cvar_purechanges);
+       cvar_purechanges = strzone(cvar_purechanges);
 }
 
 void detect_maptype()
@@ -438,6 +553,8 @@ void spawnfunc_worldspawn (void)
 
        check_unacceptable_compiler_bugs();
 
+       cvar_changes_init(); // do this very early now so it REALLY matches the server config
+
        compressShortVector_init();
 
        allowed_to_spawn = TRUE;
@@ -641,6 +758,7 @@ void spawnfunc_worldspawn (void)
        addstat(STAT_SHOTORG, AS_INT, stat_shotorg);
        addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit);
        addstat(STAT_BULLETS_LOADED, AS_INT, campingrifle_bulletcounter);
+       addstat(STAT_LAST_PICKUP, AS_FLOAT, last_pickup);
 
        addstat(STAT_NEX_CHARGE, AS_FLOAT, nex_charge);
 
@@ -655,7 +773,6 @@ void spawnfunc_worldspawn (void)
        addstat(STAT_MOVEVARS_AIRSTRAFEACCEL_QW, AS_FLOAT, stat_sv_airstrafeaccel_qw);
 
        next_pingtime = time + 5;
-       InitializeEntity(self, cvar_changes_init, INITPRIO_CVARS);
 
        detect_maptype();
 
@@ -2782,9 +2899,19 @@ void SV_Shutdown()
                print("Saving persistent data...\n");
                Ban_SaveBans();
                if(!cheatcount_total)
-                       db_save(ServerProgsDB, "server.db");
+               {
+                       if(cvar("sv_db_saveasdump"))
+                               db_dump(ServerProgsDB, "server.db");
+                       else
+                               db_save(ServerProgsDB, "server.db");
+               }
                if(cvar("developer"))
-                       db_save(TemporaryDB, "server-temp.db");
+               {
+                       if(cvar("sv_db_saveasdump"))
+                               db_dump(TemporaryDB, "server-temp.db");
+                       else
+                               db_save(TemporaryDB, "server-temp.db");
+               }
                CheatShutdown(); // must be after cheatcount check
                db_close(ServerProgsDB);
                db_close(TemporaryDB);
index 0d7e0295f9d26b82ee65617fb03b126f9bcc0ba9..90b06a5a3d92a5950fa42d3213263c4f337db8e3 100644 (file)
@@ -651,6 +651,7 @@ void GameCommand(string command)
                print("  radarmap [--force] [--quit | --loop] [sharpness]\n");
                print("  bbox\n");
                print("  cvar_changes\n");
+               print("  cvar_purechanges\n");
                print("  find classname\n");
                GameCommand_Vote("help", world);
                GameCommand_Ban("help");
@@ -912,6 +913,11 @@ void GameCommand(string command)
                print(cvar_changes);
                return;
        }
+       if (argv(0) == "cvar_purechanges")
+       {
+               print(cvar_purechanges);
+               return;
+       }
        if (argv(0) == "find") if(argc == 2)
        {
                for(client = world; (client = find(client, classname, argv(1))); )
index bcec7355895744cf74a9887c31f8564b59fd0225..a20c31dd63e18ee5d133bf46dc62b970b1414e8d 100644 (file)
@@ -578,9 +578,19 @@ void GetCvars_handleFloatOnce(string thisname, float f, .float field, string nam
                        stuffcmd(self, strcat("cl_cmd sendcvar ", name, "\n"));
        }
 }
-string W_FixWeaponOrder_ForceComplete(string s);
-string W_FixWeaponOrder_AllowIncomplete(string s);
 float w_getbestweapon(entity e);
+string W_FixWeaponOrder_ForceComplete_AndBuildImpulseList(string wo)
+{
+       string o;
+       o = W_FixWeaponOrder_ForceComplete(wo);
+       if(self.weaponorder_byimpulse)
+       {
+               strunzone(self.weaponorder_byimpulse);
+               self.weaponorder_byimpulse = string_null;
+       }
+       self.weaponorder_byimpulse = strzone(W_FixWeaponOrder_BuildImpulseList(o));
+       return o;
+}
 void GetCvars(float f)
 {
        string s;
@@ -597,7 +607,7 @@ void GetCvars(float f)
        GetCvars_handleFloat(s, f, cvar_cl_shownames, "cl_shownames");
        GetCvars_handleString(s, f, cvar_g_xonoticversion, "g_xonoticversion");
        GetCvars_handleFloat(s, f, cvar_cl_handicap, "cl_handicap");
-       GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriority, "cl_weaponpriority", W_FixWeaponOrder_ForceComplete);
+       GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriority, "cl_weaponpriority", W_FixWeaponOrder_ForceComplete_AndBuildImpulseList);
        GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriorities[0], "cl_weaponpriority0", W_FixWeaponOrder_AllowIncomplete);
        GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriorities[1], "cl_weaponpriority1", W_FixWeaponOrder_AllowIncomplete);
        GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriorities[2], "cl_weaponpriority2", W_FixWeaponOrder_AllowIncomplete);
@@ -1720,7 +1730,6 @@ void precache()
 #define INITPRIO_FIRST              0
 #define INITPRIO_GAMETYPE           0
 #define INITPRIO_GAMETYPE_FALLBACK  1
-#define INITPRIO_CVARS              5
 #define INITPRIO_FINDTARGET        10
 #define INITPRIO_DROPTOFLOOR       20
 #define INITPRIO_SETLOCATION       90
index 4cd26a41daf42ef779933a5a8ba34f4349e82e6a..d1957b01f76aaa5fd074d8544fa252b198b37a2b 100644 (file)
@@ -22,8 +22,6 @@ MUTATOR_HOOKFUNCTION(rocketflying_BuildMutatorsPrettyString)
 
 MUTATOR_DEFINITION(mutator_rocketflying)
 {
-       entity e;
-
        MUTATOR_HOOK(EditProjectile, rocketflying_EditProjectile, CBC_ORDER_ANY);
        MUTATOR_HOOK(BuildMutatorsString, rocketflying_BuildMutatorsString, CBC_ORDER_ANY);
        MUTATOR_HOOK(BuildMutatorsPrettyString, rocketflying_BuildMutatorsPrettyString, CBC_ORDER_ANY);
index d492a04ed3cb7f81e77a5b5c1ae978bd2c0868bf..1443317181bce327261646dc82f259619ae091f1 100644 (file)
@@ -1,12 +1,12 @@
 ../../progs.dat // output filename
 
 ../common/util-pre.qh
+
 sys.qh
 pre-builtins.qh
 builtins.qh
 extensions.qh
 post-builtins.qh
-autocvars.qh
 
 ../warpzonelib/anglestransform.qh
 ../warpzonelib/mathlib.qh
@@ -14,11 +14,12 @@ autocvars.qh
 ../warpzonelib/util_server.qh
 ../warpzonelib/server.qh
 
-constants.qh
 ../common/constants.qh
 ../common/util.qh
 ../common/items.qh
 
+autocvars.qh
+constants.qh
 defs.qh                // Should rename this, it has fields and globals
 
 mutators/base.qh
@@ -81,7 +82,6 @@ teamplay.qc
 cl_physics.qc
 
 // tZork's libs
-verbstack.qc
 movelib.qc
 steerlib.qc
 pathlib/pathlib.qh
index 59480ab656db12c789baf9852b8a52ad5e41f4d8..fbddca71df4438742f9e125f57bc458e2cf42173 100644 (file)
@@ -369,7 +369,8 @@ void WinningConditionHelper()
 
        s = GetGametype();
        s = strcat(s, ":", cvar_string("g_xonoticversion"));
-       s = strcat(s, "::", GetPlayerScoreString(world, 2)); // make this 1 once we can
+       s = strcat(s, ":P", ftos(cvar_purechanges_count));
+       s = strcat(s, "::", GetPlayerScoreString(world, 1)); // make this 1 once we can, note: this doesn't contain any :<letter>
 
        fullstatus = cvar("g_full_getstatus_responses");
 
index 3b7d77d58be6ef819dfcd4ae68266588e1ed36fc..5b8ca7ff867daae82bfe1f4f9ac5f03fabe2f037 100644 (file)
@@ -75,13 +75,7 @@ void CreatureFrame (void)
                                else
                                        dm = min((dm - cvar("g_balance_falldamage_minspeed")) * cvar("g_balance_falldamage_factor"), cvar("g_balance_falldamage_maxdamage"));
                                if (dm > 0)
-                               {
                                        Damage (self, world, world, dm, DEATH_FALL, self.origin, '0 0 0');
-                                       // this must be allowed to cut the normal pain sounds (played after them and on the same channel)
-                                       // there's no way to detect falling damage and prevent the pain sounds for this to be played instead
-                                       if(self.health > 0)
-                                               PlayerSound(playersound_fall, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
-                               }
                        }
 
                        maxspeed = cvar("g_maxspeed");
index ba0cb8bb3e00c9873fcad5ada9cede5d344a61d8..9f0075afa53756b1f278443e979f7d37bde3c424 100644 (file)
@@ -489,6 +489,8 @@ void Item_Touch (void)
        if(!Item_GiveTo(self, other))
                return;
 
+       other.last_pickup = time;
+
        pointparticles(particleeffectnum("item_pickup"), self.origin, '0 0 0', 1);
 
        if (self.classname == "droppedweapon")
index d338cf637dd156e811409064ff0133dda7468140..d92a2539d42487fb436bfa19c0c53999170e1bfc 100644 (file)
@@ -423,12 +423,6 @@ void func_bobbing_controller_think()
                self.owner.velocity = (v - self.owner.origin) * 10;
 };
 
-void bobbing_blocked()
-{
-       // no need to duplicate code
-       generic_plat_blocked();
-}
-
 /*QUAKED spawnfunc_func_bobbing (0 .5 .8) ? X_AXIS Y_AXIS
 Brush model that moves back and forth on one axis (default Z).
 speed : how long one cycle takes in seconds (default 4)
@@ -458,7 +452,7 @@ void spawnfunc_func_bobbing()
        self.active = ACTIVE_ACTIVE;
 
        // damage when blocked
-       self.blocked = bobbing_blocked;
+       self.blocked = generic_plat_blocked;
        if(self.dmg & (!self.message))
                self.message = " was squished";
     if(self.dmg && (!self.message2))
@@ -493,6 +487,81 @@ void spawnfunc_func_bobbing()
        // TODO make a reset function for this one
 };
 
+.float freq;
+void func_pendulum_controller_think()
+{
+       local float v;
+       self.nextthink = time + 0.1;
+
+       if not (self.owner.active == ACTIVE_ACTIVE)
+       {
+               self.owner.avelocity_x = 0;
+               return;
+       }
+
+       // calculate sinewave using makevectors
+       makevectors((self.nextthink * self.owner.freq + self.owner.phase) * '0 360 0');
+       v = self.owner.speed * v_forward_y + self.cnt;
+       if(self.owner.classname == "func_pendulum") // don't brake stuff if the func_bobbing was killtarget'ed
+       {
+               // * 10 so it will arrive in 0.1 sec
+               self.owner.avelocity_z = (remainder(v - self.owner.angles_z, 360)) * 10;
+       }
+};
+
+void spawnfunc_func_pendulum()
+{
+       local entity controller;
+       if (self.noise != "")
+       {
+               precache_sound(self.noise);
+               soundto(MSG_INIT, self, CHAN_TRIGGER, self.noise, VOL_BASE, ATTN_IDLE);
+       }
+
+       self.active = ACTIVE_ACTIVE;
+
+       // keys: angle, speed, phase, noise, freq
+
+       if(!self.speed)
+               self.speed = 30;
+       // not initializing self.dmg to 2, to allow damageless pendulum
+
+       if(self.dmg & (!self.message))
+               self.message = " was squished";
+       if(self.dmg && (!self.message2))
+               self.message2 = "was squished by";
+       if(self.dmg && (!self.dmgtime))
+               self.dmgtime = 0.25;
+       self.dmgtime2 = time;
+
+       self.blocked = generic_plat_blocked;
+
+       if not(InitMovingBrushTrigger())
+               return;
+
+       if(!self.freq)
+       {
+               // find pendulum length (same formula as Q3A)
+               self.freq = 1 / (M_PI * 2) * sqrt(cvar("sv_gravity") / (3 * max(8, fabs(self.mins_z))));
+       }
+
+       // copy initial angle
+       self.cnt = self.angles_z;
+
+       // wait for targets to spawn
+       controller = spawn();
+       controller.classname = "func_pendulum_controller";
+       controller.owner = self;
+       controller.nextthink = time + 1;
+       controller.think = func_pendulum_controller_think;
+       self.nextthink = self.ltime + 999999999;
+       self.think = SUB_Null;
+
+       //self.effects |= EF_LOWPRECISION;
+
+       // TODO make a reset function for this one
+};
+
 // button and multiple button
 
 void() button_wait;
index 83fc8acb5de47e9f58406588fdebce20099ba899..5730744037ea4908168572f68da0afb4bc9fded6 100644 (file)
@@ -1,3 +1,6 @@
+// ONLY EVER ADD NEW WEAPONS AT THE END. IF YOU REMOVE ONE, PUT THE LAST ONE ON
+// ITS PLACE. THIS IS TO AVOID UNNECESSARY RENUMBERING OF WEAPON IMPULSES.
+// IF YOU DISREGARD THIS NOTICE, I'LL KILL YOU WITH THE @!#%'N TUBA
 #include "w_laser.qc"
 #include "w_shotgun.qc"
 #include "w_uzi.qc"
index d0b6f4ed8836b449143539af5d3c0e6a3dbe8b93..07268a7a0fae0c9efa3389f494f7cb4776b33906 100644 (file)
@@ -1,5 +1,5 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(CAMPINGRIFLE, w_campingrifle, IT_NAILS, 3, WEP_FLAG_NORMAL | WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_MID, "campingrifle", "campingrifle", "Rifle");
+REGISTER_WEAPON(CAMPINGRIFLE, w_campingrifle, IT_NAILS, 7, WEP_FLAG_NORMAL | WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_MID, "campingrifle", "campingrifle", "Sniper Rifle");
 #else
 #ifdef SVQC
 //Camping rifle Primary mode: manually operated bolt*, Secondary: full automatic**
index 08b1a678269e3b88c8aa1a106a108f35c7aee022..b74f60e00e28437bb33ab7f016443640bfb134dc 100644 (file)
@@ -51,9 +51,9 @@ void Seeker_Missile_Think()
        {
                e               = self.enemy;
                eorg            = 0.5 * (e.absmin + e.absmax);
-               turnrate        = cvar("g_balance_seeker_missile_turnrate");                // how fast to turn
+               turnrate        = cvar("g_balance_seeker_missile_turnrate"); // how fast to turn
                desireddir      = normalize(eorg - self.origin);
-               olddir          = normalize(self.velocity);                                         // get my current direction
+               olddir          = normalize(self.velocity); // get my current direction
                dist            = vlen(eorg - self.origin);
 
                // Do evasive maneuvers for world objects? ( this should be a cpu hog. :P )
@@ -66,18 +66,14 @@ void Seeker_Missile_Think()
                                traceline(self.origin, eorg, FALSE, self);
 
                        // Setup adaptive tracelength
-                       self.wait = vlen(self.origin - trace_endpos);
-                       if (self.wait < cvar("g_balance_seeker_missile_smart_trace_min")) self.wait = cvar("g_balance_seeker_missile_smart_trace_min");
-                       if (self.wait > cvar("g_balance_seeker_missile_smart_trace_max")) self.wait = cvar("g_balance_seeker_missile_smart_trace_max");
+                       self.wait = bound(cvar("g_balance_seeker_missile_smart_trace_min"), vlen(self.origin - trace_endpos), self.wait = cvar("g_balance_seeker_missile_smart_trace_max"));
 
                        // Calc how important it is that we turn and add this to the desierd (enemy) dir.
                        desireddir  = normalize(((trace_plane_normal * (1 - trace_fraction)) + (desireddir * trace_fraction)) * 0.5);
                }
-
-               //newdir = normalize((olddir + desireddir * turnrate) * 0.5);// take the average of the 2 directions; not the best method but simple & easy
-               newdir = normalize(olddir + desireddir * turnrate);// take the average of the 2 directions; not the best method but simple & easy
-
-               self.velocity = newdir * self.switchweapon;                                         // make me fly in the new direction at my flight speed
+               
+               newdir = normalize(olddir + desireddir * turnrate); // take the average of the 2 directions; not the best method but simple & easy
+               self.velocity = newdir * self.switchweapon; // make me fly in the new direction at my flight speed
        }
 
        // Proxy
@@ -114,9 +110,8 @@ void Seeker_Missile_Think()
                return;
        }
 
-       self.angles = vectoangles(self.velocity);                       // turn model in the new flight direction
-       self.nextthink = time + 0.05;
-
+       //self.angles = vectoangles(self.velocity);                     // turn model in the new flight direction
+       self.nextthink = time;// + 0.05; // csqc projectiles
        UpdateCSQCProjectile(self);
 }
 
@@ -124,21 +119,19 @@ void Seeker_Missile_Think()
 
 void Seeker_Missile_Damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
 {
-       float d;
-       d = damage;
-
        if (self.health <= 0)
                return;
 
        if (self.owner == attacker)
-               d = d * 0.25;
-
-       self.health = self.health - d;
-
+               self.health = self.health - (damage * 0.25);
+       else
+               self.health = self.health - damage;
+               
        if (self.health <= 0)
                W_PrepareExplosionByDamage(attacker, Seeker_Missile_Explode);
 }
 
+/*
 void Seeker_Missile_Animate()
 {
        self.frame = self.frame +1;
@@ -161,6 +154,7 @@ void Seeker_Missile_Animate()
 
        UpdateCSQCProjectile(self);
 }
+*/
 
 void Seeker_Fire_Missile(vector f_diff)
 {
@@ -182,30 +176,25 @@ void Seeker_Fire_Missile(vector f_diff)
        missile.bot_dodge       = TRUE;
        missile.bot_dodgerating = cvar("g_balance_seeker_missile_damage");
 
-       missile.think           = Seeker_Missile_Animate;
-
-       //if (!cvar("g_balance_seeker_missile_proxy"))
+       missile.think           = Seeker_Missile_Think;
        missile.touch           = Seeker_Missile_Touch;
-
        missile.event_damage    = Seeker_Missile_Damage;
        missile.nextthink       = time;// + 0.2;// + cvar("g_balance_seeker_missile_activate_delay");
        missile.cnt             = time + cvar("g_balance_seeker_missile_lifetime");
        missile.enemy           = self.enemy;
        missile.solid           = SOLID_BBOX;
        missile.scale           = 2;
-       missile.takedamage          = DAMAGE_YES;
+       missile.takedamage      = DAMAGE_YES;
        missile.health          = cvar("g_balance_seeker_missile_health");
        missile.damageforcescale = cvar("g_balance_seeker_missile_damageforcescale");
        missile.projectiledeathtype = WEP_SEEKER;
+       //missile.think           = Seeker_Missile_Animate; // csqc projectiles.
+
 
        setorigin (missile, w_shotorg);
        setsize (missile, '-4 -4 -4', '4 4 4');
-
-
-       missile.movetype    = MOVETYPE_FLYMISSILE;// MOVETYPE_TOSS;
-
+       missile.movetype    = MOVETYPE_FLYMISSILE;
        missile.flags       = FL_PROJECTILE;
-
        W_SETUPPROJECTILEVELOCITY_UP(missile, g_balance_seeker_missile);
 
        missile.switchweapon = vlen(missile.velocity);
@@ -276,17 +265,13 @@ void Seeker_Tag_Damage (entity inflictor, entity attacker, float damage, float d
                Seeker_Tag_Explode();
 }
 
-void Seeker_Tag_Think()
-{
-       remove(self);
-       return;
-}
 
 void Seeker_Tag_Touch()
 {
        vector dir;
        vector org2;
-
+       entity e;
+       
        dir     = normalize (self.owner.origin - self.origin);
        org2    = findbetterlocation (self.origin, 8);
 
@@ -296,28 +281,19 @@ void Seeker_Tag_Touch()
        Damage_DamageInfo(self.origin, 0, 0, 0, self.velocity, WEP_SEEKER | HITTYPE_HEADSHOT, self);
 
        if (other.takedamage == DAMAGE_AIM && other.deadflag == DEAD_NO)
-       {
-               entity e;
+       {               
                e           = spawn();
                e.cnt       = cvar("g_balance_seeker_missile_count");
                e.owner     = self.owner;
                e.enemy     = other;
                e.think     = Seeker_Vollycontroler_Think;
                e.nextthink = time;
-
-               //sprint(self.owner, "^1Target lock ^3[^7 ",other.netname, " ^3]^1 acquired - autofire activated.\n");
-               //sprint(other,"^1You are targeted!\n");
-
-               // stuffcmd(other,"play2 weapons/zany-alarm4.ogg\n");
-               // stuffcmd(self.owner, "play2 weapons/zany-lock4.ogg\n");
        }
 
        remove(self);
        return;
 }
 
-
-
 void Seeker_Fire_Tag()
 {
        local entity missile;
@@ -332,7 +308,7 @@ void Seeker_Fire_Tag()
        missile.bot_dodge       = TRUE;
        missile.bot_dodgerating = 50;
        missile.touch           = Seeker_Tag_Touch;
-       missile.think           = Seeker_Tag_Think;
+       missile.think           = SUB_Remove;
        missile.nextthink       = time + cvar("g_balance_seeker_tag_lifetime");
        missile.movetype        = MOVETYPE_FLY;
        missile.solid           = SOLID_BBOX;
@@ -405,28 +381,29 @@ void Seeker_Fire_Flac()
 
        pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
-       missile = spawn ();
-       missile.owner = missile.realowner = self;
-       missile.classname = "missile";
-       missile.bot_dodge = TRUE;
+       missile                                 = spawn ();
+       missile.owner                   = missile.realowner = self;
+       missile.classname               = "missile";
+       missile.bot_dodge               = TRUE;
        missile.bot_dodgerating = cvar("g_balance_seeker_flac_damage");
-       missile.touch = Seeker_Flac_Explode;
-       missile.use = Seeker_Flac_Explode;
-       missile.think = adaptor_think2use_hittype_splash;
-       missile.nextthink = time + cvar("g_balance_seeker_flac_lifetime") + cvar("g_balance_seeker_flac_lifetime_rand");
-       missile.solid = SOLID_BBOX;
-       missile.scale = 0.4; // BUG: the model is too big
+       missile.touch                   = Seeker_Flac_Explode;
+       missile.use                     = Seeker_Flac_Explode; 
+       missile.think                   = adaptor_think2use_hittype_splash;
+       missile.nextthink               = time + cvar("g_balance_seeker_flac_lifetime") + cvar("g_balance_seeker_flac_lifetime_rand");
+       missile.solid                   = SOLID_BBOX;
+       missile.movetype                = MOVETYPE_FLY; 
        missile.projectiledeathtype = WEP_SEEKER;
+       missile.projectiledeathtype = WEP_SEEKER | HITTYPE_SECONDARY;
+       missile.flags                           = FL_PROJECTILE;
+       
+       // csqc projectiles
+       //missile.angles                                = vectoangles (missile.velocity);       
+       //missile.scale = 0.4; // BUG: the model is too big 
+       
        setorigin (missile, w_shotorg);
        setsize (missile, '-2 -2 -2', '2 2 2');
-       missile.projectiledeathtype = WEP_SEEKER | HITTYPE_SECONDARY;
-
-       missile.movetype = MOVETYPE_FLY;
+               
        W_SETUPPROJECTILEVELOCITY_UP(missile, g_balance_seeker_flac);
-
-       missile.angles = vectoangles (missile.velocity);
-       missile.flags = FL_PROJECTILE;
-
        CSQCProjectile(missile, TRUE, PROJECTILE_FLAC, TRUE);
 
        other = missile; MUTATOR_CALLHOOK(EditProjectile);
index c89735e55930fc81a8f8bc752890c5bd1fa1f73d..491030fcbcc486cfde1249c03d5d560e09b22bb4 100644 (file)
@@ -83,13 +83,14 @@ float W_Tuba_NoteSendEntity(entity to, float sf)
                WriteCoord(MSG_ENTITY, self.origin_x);
                WriteCoord(MSG_ENTITY, self.origin_y);
                WriteCoord(MSG_ENTITY, self.origin_z);
+               WriteByte(MSG_ENTITY, self.owner != to);
        }
        return TRUE;
 }
 
 void W_Tuba_NoteThink()
 {
-       float needchange, dist_mult;
+       float dist_mult;
        float vol0, vol1;
        vector dir0, dir1;
        vector v;
@@ -102,7 +103,6 @@ void W_Tuba_NoteThink()
        }
        self.nextthink = time;
        dist_mult = cvar("g_balance_tuba_attenuation") / cvar("snd_soundradius");
-       needchange = 0;
        FOR_EACH_REALCLIENT(e)
        if(e != self.owner)
        {
index 725f84ffbd24a8f09150431c7aa44e1c2f2860d2..f02fa4a30266d097b9c595d413829300999eeb4d 100644 (file)
@@ -15,7 +15,7 @@ void WarpZone_Read(float isnew)
 {
        float f;
 
-       ++warpzone_warpzones_exist;
+       warpzone_warpzones_exist = 1;
        if not(self.enemy)
        {
                self.enemy = spawn();
@@ -84,7 +84,7 @@ void WarpZone_Read(float isnew)
 void WarpZone_Camera_Read(float isnew)
 {
        float f;
-       ++warpzone_cameras_exist;
+       warpzone_cameras_exist = 1;
        self.classname = "func_warpzone_camera";
 
        f = ReadByte();
@@ -170,7 +170,6 @@ void WarpZone_Outside()
 
 vector WarpZone_FixNearClip(vector o, vector c0, vector c1, vector c2, vector c3)
 {
-       float nearclipdistance;
        vector mi, ma;
        entity e;
        float pd;
@@ -210,7 +209,7 @@ var float autocvar_cl_rollkillspeed = 10;
 #endif
 void WarpZone_FixView()
 {
-       float pd, f;
+       float f;
        vector o;
        entity e;
        vector corner0, corner1, corner2, corner3, nearclip;
index bc23cd11ba117713b6ccc9c99ba36e0d6d68626a..e76bc0eb96761c5efa52f02a07400b51fa28cdaa 100644 (file)
@@ -1,5 +1,5 @@
 float trace_dphitcontents;
-.float dphitcontents;
+.float dphitcontentsmask;
 
 void WarpZone_Accumulator_Clear(entity acc)
 {
@@ -411,8 +411,6 @@ void WarpZone_TraceToss(entity e, entity forent)
 
 entity WarpZone_TrailParticles_trace_callback_own;
 float WarpZone_TrailParticles_trace_callback_eff;
-float WarpZone_TrailParticles_trace_callback_f;
-float WarpZone_TrailParticles_trace_callback_flags;
 void WarpZone_TrailParticles_trace_callback(vector from, vector endpos, vector to)
 {
        trailparticles(WarpZone_TrailParticles_trace_callback_own, WarpZone_TrailParticles_trace_callback_eff, from, endpos);
@@ -426,6 +424,8 @@ void WarpZone_TrailParticles(entity own, float eff, vector org, vector end)
 }
 
 #ifdef CSQC
+float WarpZone_TrailParticles_trace_callback_f;
+float WarpZone_TrailParticles_trace_callback_flags;
 void WarpZone_TrailParticles_WithMultiplier_trace_callback(vector from, vector endpos, vector to)
 {
        boxparticles(WarpZone_TrailParticles_trace_callback_eff, WarpZone_TrailParticles_trace_callback_own, from, endpos, WarpZone_TrailParticles_trace_callback_own.velocity, WarpZone_TrailParticles_trace_callback_own.velocity, WarpZone_TrailParticles_trace_callback_f, WarpZone_TrailParticles_trace_callback_flags);
index 42cc94c3af1e25b65ad044e033753bc0469305b9..f71fbe2d985b37fc9279f11f98009f307c5540c5 100644 (file)
@@ -359,7 +359,7 @@ void WarpZoneCamera_InitStep_FindTarget()
                error("Camera with nonexisting target");
                return;
        }
-       ++warpzone_cameras_exist;
+       warpzone_cameras_exist = 1;
        WarpZone_Camera_SetUp(self, self.enemy.origin, self.enemy.angles);
        self.SendFlags = 0xFFFFFF;
 }
@@ -494,7 +494,7 @@ void WarpZone_InitStep_FinalizeTransform()
                return;
        }
 
-       ++warpzone_warpzones_exist;
+       warpzone_warpzones_exist = 1;
        WarpZone_SetUp(self, self.warpzone_origin, self.warpzone_angles, self.enemy.warpzone_origin, self.enemy.warpzone_angles);
        self.touch = WarpZone_Touch;
        self.SendFlags = 0xFFFFFF;