]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into samual/keepaway
authorSamual <samual@xonotic.org>
Mon, 10 Jan 2011 03:10:47 +0000 (22:10 -0500)
committerSamual <samual@xonotic.org>
Mon, 10 Jan 2011 03:10:47 +0000 (22:10 -0500)
112 files changed:
_hud_descriptions.cfg
balance25.cfg
balanceLeeStricklin.cfg
balanceSamual.cfg
balanceXonotic.cfg
balancetZork.cfg
defaultSamual.cfg
defaultXPM.cfg
defaultXonotic.cfg
effectinfo.txt
effects-ultimate.cfg
effects-ultra.cfg
fixbalance.sh [new file with mode: 0755]
gfx/hud/default/weaponcampingrifle.tga [deleted file]
gfx/hud/default/weaponsniperrifle.tga [new file with mode: 0644]
gfx/hud/luminos/weaponcampingrifle.tga [deleted file]
gfx/hud/luminos/weaponsniperrifle.tga [new file with mode: 0644]
gfx/hud/old/weaponcampingrifle.tga [deleted file]
gfx/hud/old/weaponsniperrifle.tga [new file with mode: 0644]
gfx/loading.tga
hook-firing_swap.cfg
hud_luminos.cfg
hud_luminos_minimal.cfg
hud_luminos_xhair_minimal.cfg
hud_nexuiz.cfg
keybinds.txt
models/weapons/g_crylink.md3
models/weapons/g_hlac.md3
models/weapons/g_laser.md3
models/weapons/g_minelayer.md3
models/weapons/g_nex.md3
models/weapons/g_porto.md3
models/weapons/v_crylink.md3
models/weapons/v_hlac.md3
models/weapons/v_hookgun.md3
models/weapons/v_laser.md3
models/weapons/v_minelayer.md3
models/weapons/v_nex.md3
models/weapons/v_porto.md3
particles/nexbeam.tga [deleted file]
qcsrc/client/Defs.qc
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/autocvars.qh
qcsrc/client/hud.qc
qcsrc/client/hud.qh
qcsrc/client/main.qh
qcsrc/client/mapvoting.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/projectile.qc
qcsrc/client/scoreboard.qc
qcsrc/client/waypointsprites.qc
qcsrc/common/constants.qh
qcsrc/common/util.qc
qcsrc/menu/gamecommand.qc
qcsrc/menu/xonotic/dialog_hudpanel_notification.c
qcsrc/menu/xonotic/dialog_multiplayer_create_advanced.c
qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c
qcsrc/menu/xonotic/dialog_settings_effects.c
qcsrc/menu/xonotic/keybinder.c
qcsrc/menu/xonotic/slider_picmip.c
qcsrc/menu/xonotic/util.qc
qcsrc/menu/xonotic/util.qh
qcsrc/server/anticheat.qc
qcsrc/server/assault.qc
qcsrc/server/autocvars.qh
qcsrc/server/bot/aim.qc
qcsrc/server/bot/havocbot/havocbot.qc
qcsrc/server/bot/havocbot/roles.qc
qcsrc/server/bot/navigation.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_physics.qc
qcsrc/server/cl_player.qc
qcsrc/server/cl_weaponsystem.qc
qcsrc/server/clientcommands.qc
qcsrc/server/defs.qh
qcsrc/server/func_breakable.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_hook.qc
qcsrc/server/g_subs.qc
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/base.qh
qcsrc/server/mutators/gamemode_freezetag.qc
qcsrc/server/playerstats.qc
qcsrc/server/scores_rules.qc
qcsrc/server/t_jumppads.qc
qcsrc/server/t_plats.qc
qcsrc/server/t_quake3.qc
qcsrc/server/tturrets/system/system_aimprocs.qc
qcsrc/server/tturrets/system/system_damage.qc
qcsrc/server/tturrets/system/system_main.qc
qcsrc/server/tturrets/units/unit_fusionreactor.qc
qcsrc/server/tturrets/units/unit_walker.qc
qcsrc/server/vehicles/spiderbot.qc
qcsrc/server/w_all.qc
qcsrc/server/w_campingrifle.qc [deleted file]
qcsrc/server/w_common.qc
qcsrc/server/w_crylink.qc
qcsrc/server/w_electro.qc
qcsrc/server/w_hlac.qc
qcsrc/server/w_minelayer.qc
qcsrc/server/w_nex.qc
qcsrc/server/w_shotgun.qc
qcsrc/server/w_sniperrifle.qc [new file with mode: 0644]
qcsrc/server/w_uzi.qc
qcsrc/server/waypointsprites.qc
qcsrc/warpzonelib/server.qc
quake.rc
textures/hlac_glass.tga [new file with mode: 0644]
textures/hlac_plasma.tga [new file with mode: 0644]

index 932e95bf9fb4577a7e0e7afe2cf7398c1a09de46..269b07c526ce3dc2293a7cf67e38bb2c81066359 100644 (file)
@@ -47,6 +47,8 @@ seta hud_panel_weapons_complainbubble_color_donthave "" "color of the complainbu
 seta hud_panel_weapons_complainbubble_color_unavailable "" "color of the complainbubble when showing weapon unavailable message"
 seta hud_panel_weapons_ammo_color "" "color of status bar"
 seta hud_panel_weapons_ammo_alpha "" "alpha of status bar"
+seta hud_panel_weapons_timeout "" "panel disappears if you don't switch weapon for this amount of seconds"
+seta hud_panel_weapons_timeout_effect "" "disappearance effect: 0) no effect; 1) panel moves out of screen; 2) panel fades out"
 
 seta hud_panel_ammo "" "enable/disable this panel"
 seta hud_panel_ammo_pos "" "position of this panel"
index 3806e8b122650d7a676ef68ed743c46d654f81f1..f50eb7e290b70ac7635499a0cdb6ca6c1cb35681 100644 (file)
@@ -13,7 +13,7 @@ set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provid
 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_sniperrifle -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"
@@ -267,6 +267,7 @@ set g_balance_uzi_mode 0                            // Activates varible spread for sustained & burst m
 set g_balance_uzi_spread_min 0.02
 set g_balance_uzi_spread_max 0.6
 set g_balance_uzi_spread_add 0.012
+
 set g_balance_uzi_burst 0                              // # of bullets in a burst (if set to 2 or more)
 set g_balance_uzi_burst_refire 0.05            // refire between burst bullets
 set g_balance_uzi_burst_refire2 0.75   // refire after burst
@@ -274,17 +275,20 @@ set g_balance_uzi_burst_spread 0.04
 set g_balance_uzi_burst_damage 18              
 set g_balance_uzi_burst_force 50
 set g_balance_uzi_burst_ammo 3
+
 set g_balance_uzi_first 1
 set g_balance_uzi_first_damage 30
 set g_balance_uzi_first_force 50
 set g_balance_uzi_first_spread 0.015
 set g_balance_uzi_first_refire 0.2
 set g_balance_uzi_first_ammo 1
+
 set g_balance_uzi_sustained_damage 15
 set g_balance_uzi_sustained_force 27
 set g_balance_uzi_sustained_spread 0.05
 set g_balance_uzi_sustained_refire 0.1
 set g_balance_uzi_sustained_ammo 1
+
 set g_balance_uzi_speed 18000
 set g_balance_uzi_bulletconstant 115 // 13.1qu
 // }}}
@@ -328,7 +332,7 @@ set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
 set g_balance_grenadelauncher_bouncefactor 0.5
 set g_balance_grenadelauncher_bouncestop 0.075
 // }}}
-// {{{ minelayer // TODO
+// {{{ minelayer
 set g_balance_minelayer_damage 35
 set g_balance_minelayer_edgedamage 30
 set g_balance_minelayer_force 250
@@ -406,6 +410,7 @@ set g_balance_crylink_primary_refire 0.4
 set g_balance_crylink_primary_animtime 0.3
 set g_balance_crylink_primary_ammo 2
 set g_balance_crylink_primary_bouncedamagefactor 0.5
+set g_balance_crylink_primary_joindelay 0
 set g_balance_crylink_primary_joinspread 0
 set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_joinexplode 0
@@ -433,6 +438,7 @@ set g_balance_crylink_secondary_refire 0.5
 set g_balance_crylink_secondary_animtime 0.3
 set g_balance_crylink_secondary_ammo 2
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
+set g_balance_crylink_secondary_joindelay 0
 set g_balance_crylink_secondary_joinspread 0
 set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_joinexplode 0                  
@@ -600,38 +606,38 @@ set g_balance_hlac_secondary_animtime 0.3
 set g_balance_hlac_secondary_ammo 10
 set g_balance_hlac_secondary_shots 6
 // }}}
-// {{{ campingrifle
-set g_balance_campingrifle_magazinecapacity 8
-set g_balance_campingrifle_reloadtime 2 // matches reload anim
-set g_balance_campingrifle_auto_reload_on_switch 0
-set g_balance_campingrifle_bursttime 0
-set g_balance_campingrifle_primary_tracer 0
-set g_balance_campingrifle_primary_damage 60
-set g_balance_campingrifle_primary_headshotaddeddamage 100
-set g_balance_campingrifle_primary_spread 0
-set g_balance_campingrifle_primary_force 2
-set g_balance_campingrifle_primary_speed 35000
-set g_balance_campingrifle_primary_lifetime 5
-set g_balance_campingrifle_primary_refire 0.8
-set g_balance_campingrifle_primary_animtime 0.3
-set g_balance_campingrifle_primary_ammo 10
-set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
-set g_balance_campingrifle_primary_burstcost 0
-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 35
-set g_balance_campingrifle_secondary_headshotaddeddamage 15 // 50 damage only on head
-set g_balance_campingrifle_secondary_spread 0.008
-set g_balance_campingrifle_secondary_force 1
-set g_balance_campingrifle_secondary_speed 20000
-set g_balance_campingrifle_secondary_lifetime 5
-set g_balance_campingrifle_secondary_refire 0.15
-set g_balance_campingrifle_secondary_animtime 0.1
-set g_balance_campingrifle_secondary_ammo 10
-set g_balance_campingrifle_secondary_bulletconstant 130 // 18.3qu
-set g_balance_campingrifle_secondary_burstcost 0
-set g_balance_campingrifle_secondary_bullethail 0 // empty magazine on shot
+// {{{ sniperrifle
+set g_balance_sniperrifle_magazinecapacity 8
+set g_balance_sniperrifle_reloadtime 2 // matches reload anim
+set g_balance_sniperrifle_auto_reload_on_switch 0
+set g_balance_sniperrifle_bursttime 0
+set g_balance_sniperrifle_primary_tracer 0
+set g_balance_sniperrifle_primary_damage 60
+set g_balance_sniperrifle_primary_headshotaddeddamage 100
+set g_balance_sniperrifle_primary_spread 0
+set g_balance_sniperrifle_primary_force 2
+set g_balance_sniperrifle_primary_speed 35000
+set g_balance_sniperrifle_primary_lifetime 5
+set g_balance_sniperrifle_primary_refire 0.8
+set g_balance_sniperrifle_primary_animtime 0.3
+set g_balance_sniperrifle_primary_ammo 10
+set g_balance_sniperrifle_primary_bulletconstant 130 // 56.3qu
+set g_balance_sniperrifle_primary_burstcost 0
+set g_balance_sniperrifle_primary_bullethail 0 // empty magazine on shot
+set g_balance_sniperrifle_secondary 1
+set g_balance_sniperrifle_secondary_tracer 0
+set g_balance_sniperrifle_secondary_damage 35
+set g_balance_sniperrifle_secondary_headshotaddeddamage 15 // 50 damage only on head
+set g_balance_sniperrifle_secondary_spread 0.008
+set g_balance_sniperrifle_secondary_force 1
+set g_balance_sniperrifle_secondary_speed 20000
+set g_balance_sniperrifle_secondary_lifetime 5
+set g_balance_sniperrifle_secondary_refire 0.15
+set g_balance_sniperrifle_secondary_animtime 0.1
+set g_balance_sniperrifle_secondary_ammo 10
+set g_balance_sniperrifle_secondary_bulletconstant 130 // 18.3qu
+set g_balance_sniperrifle_secondary_burstcost 0
+set g_balance_sniperrifle_secondary_bullethail 0 // empty magazine on shot
 // }}}
 // {{{ tuba
 set g_balance_tuba_refire 0.05
index 37a589fd36d6a2bc46de506576c92ee2317afcd4..dd1a2022ad500f852ce2c9d5e285c5613278754a 100644 (file)
@@ -13,7 +13,7 @@ set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provid
 set g_start_weapon_porto -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
 set g_start_weapon_hook -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
 set g_start_weapon_hlac 0 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_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_sniperrifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
 set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
 set g_start_weapon_fireball 0 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
 set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
@@ -267,6 +267,7 @@ set g_balance_uzi_mode 0                            // Activates varible spread for sustained & burst m
 set g_balance_uzi_spread_min 0.02
 set g_balance_uzi_spread_max 0.6
 set g_balance_uzi_spread_add 0.012
+
 set g_balance_uzi_burst 0                              // # of bullets in a burst (if set to 2 or more)
 set g_balance_uzi_burst_refire 0.05            // refire between burst bullets
 set g_balance_uzi_burst_refire2 0.75   // refire after burst
@@ -274,21 +275,24 @@ set g_balance_uzi_burst_spread 0.04
 set g_balance_uzi_burst_damage 18              
 set g_balance_uzi_burst_force 50
 set g_balance_uzi_burst_ammo 3
+
 set g_balance_uzi_first 1
 set g_balance_uzi_first_damage 26
 set g_balance_uzi_first_force -30
 set g_balance_uzi_first_spread 0.01
 set g_balance_uzi_first_refire 0.2
 set g_balance_uzi_first_ammo 1
+
 set g_balance_uzi_sustained_damage 17
 set g_balance_uzi_sustained_force 27
 set g_balance_uzi_sustained_spread 0.05
 set g_balance_uzi_sustained_refire 0.1
 set g_balance_uzi_sustained_ammo 1
+
 set g_balance_uzi_speed 18000
 set g_balance_uzi_bulletconstant 300 // 13.1qu
 // }}}
-// {{{ mortar // TODO
+// {{{ mortar
 set g_balance_grenadelauncher_primary_type 0
 set g_balance_grenadelauncher_primary_damage 65
 set g_balance_grenadelauncher_primary_edgedamage 35
@@ -328,7 +332,7 @@ set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
 set g_balance_grenadelauncher_bouncefactor 0.7
 set g_balance_grenadelauncher_bouncestop 0.12
 // }}}
-// {{{ minelayer // TODO
+// {{{ minelayer
 set g_balance_minelayer_damage 65
 set g_balance_minelayer_edgedamage 30
 set g_balance_minelayer_force 250
@@ -350,7 +354,7 @@ set g_balance_minelayer_remote_edgedamage 40
 set g_balance_minelayer_remote_radius 200
 set g_balance_minelayer_remote_force 300
 // }}}
-// {{{ electro // TODO
+// {{{ electro
 set g_balance_electro_lightning 0
 set g_balance_electro_primary_damage 55
 set g_balance_electro_primary_edgedamage 5
@@ -398,7 +402,7 @@ set g_balance_crylink_primary_damage 23
 set g_balance_crylink_primary_edgedamage 0
 set g_balance_crylink_primary_force -55
 set g_balance_crylink_primary_radius 80
-set g_balance_crylink_primary_speed 6950
+set g_balance_crylink_primary_speed 6820
 set g_balance_crylink_primary_spread 0.03
 set g_balance_crylink_primary_shots 4
 set g_balance_crylink_primary_bounces 2
@@ -406,6 +410,7 @@ set g_balance_crylink_primary_refire 0.4
 set g_balance_crylink_primary_animtime 0.30008
 set g_balance_crylink_primary_ammo 3
 set g_balance_crylink_primary_bouncedamagefactor 0.2
+set g_balance_crylink_primary_joindelay 0
 set g_balance_crylink_primary_joinspread 0
 set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_joinexplode 0
@@ -433,6 +438,7 @@ set g_balance_crylink_secondary_refire 0.5
 set g_balance_crylink_secondary_animtime 0.3
 set g_balance_crylink_secondary_ammo 3
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
+set g_balance_crylink_secondary_joindelay 0
 set g_balance_crylink_secondary_joinspread 0
 set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_joinexplode 0                  
@@ -448,19 +454,19 @@ 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 78
+set g_balance_nex_primary_damage 72
 set g_balance_nex_primary_force 600
 set g_balance_nex_primary_refire 1.505
 set g_balance_nex_primary_animtime 0.3
-set g_balance_nex_primary_ammo 13
+set g_balance_nex_primary_ammo 5
 set g_balance_nex_primary_damagefalloff_mindist 9999999
 set g_balance_nex_primary_damagefalloff_maxdist 9999999
 set g_balance_nex_primary_damagefalloff_halflife 9999999
 set g_balance_nex_primary_damagefalloff_forcehalflife 9999999
 
-set g_balance_nex_secondary 0
-set g_balance_nex_secondary_charge 0
-set g_balance_nex_secondary_charge_rate 0.1
+set g_balance_nex_secondary 1
+set g_balance_nex_secondary_charge 1
+set g_balance_nex_secondary_charge_rate 0.25
 set g_balance_nex_secondary_chargepool 0
 set g_balance_nex_secondary_chargepool_regen 0.15
 set g_balance_nex_secondary_chargepool_pause_regen 1
@@ -469,23 +475,23 @@ set g_balance_nex_secondary_damage 80
 set g_balance_nex_secondary_force -500
 set g_balance_nex_secondary_refire 1.25
 set g_balance_nex_secondary_animtime 0.75
-set g_balance_nex_secondary_ammo 5
+set g_balance_nex_secondary_ammo 2
 set g_balance_nex_secondary_damagefalloff_mindist 9999999
 set g_balance_nex_secondary_damagefalloff_maxdist 9999999
 set g_balance_nex_secondary_damagefalloff_halflife 9999999
 set g_balance_nex_secondary_damagefalloff_forcehalflife 9999999
 
-set g_balance_nex_charge 0
+set g_balance_nex_charge 1
 set g_balance_nex_charge_mindmg 40
 set g_balance_nex_charge_start 0
 set g_balance_nex_charge_rate 0.1
 set g_balance_nex_charge_limit 0.5
 set g_balance_nex_charge_rot_rate 0
 set g_balance_nex_charge_rot_pause 0 // Dont rot down untill this long after release of charge button
-set g_balance_nex_charge_shot_multiplier 0.5
+set g_balance_nex_charge_shot_multiplier 0
 set g_balance_nex_charge_velocity_rate 0.2
-set g_balance_nex_charge_minspeed 400
-set g_balance_nex_charge_maxspeed 1000
+set g_balance_nex_charge_minspeed ""
+set g_balance_nex_charge_maxspeed ""
 // }}}
 // {{{ minstanex
 set g_balance_minstanex_refire 1
@@ -514,7 +520,7 @@ set g_balance_hagar_secondary_lifetime_rand 0
 set g_balance_hagar_secondary_refire 0.15
 set g_balance_hagar_secondary_ammo 2
 // }}}
-// {{{ rocketlauncher // TODO
+// {{{ rocketlauncher
 set g_balance_rocketlauncher_damage 65
 set g_balance_rocketlauncher_edgedamage 25
 set g_balance_rocketlauncher_force 360
@@ -600,38 +606,38 @@ set g_balance_hlac_secondary_animtime 0.3
 set g_balance_hlac_secondary_ammo 11
 set g_balance_hlac_secondary_shots 6
 // }}}
-// {{{ campingrifle
-set g_balance_campingrifle_magazinecapacity 8
-set g_balance_campingrifle_reloadtime 2 // matches reload anim
-set g_balance_campingrifle_auto_reload_on_switch 0
-set g_balance_campingrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
-set g_balance_campingrifle_primary_tracer 0
-set g_balance_campingrifle_primary_damage 75
-set g_balance_campingrifle_primary_headshotaddeddamage 90
-set g_balance_campingrifle_primary_spread 0
-set g_balance_campingrifle_primary_force 2
-set g_balance_campingrifle_primary_speed 35000
-set g_balance_campingrifle_primary_lifetime 5
-set g_balance_campingrifle_primary_refire 0.7
-set g_balance_campingrifle_primary_animtime 0.3
-set g_balance_campingrifle_primary_ammo 10
-set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
-set g_balance_campingrifle_primary_burstcost 0 // require same cooldown as secondary, note it's smaller than primary refire time
-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 40
-set g_balance_campingrifle_secondary_headshotaddeddamage 20
-set g_balance_campingrifle_secondary_spread 0.008
-set g_balance_campingrifle_secondary_force 1
-set g_balance_campingrifle_secondary_speed 20000
-set g_balance_campingrifle_secondary_lifetime 5
-set g_balance_campingrifle_secondary_refire 0.0006
-set g_balance_campingrifle_secondary_animtime 0.1
-set g_balance_campingrifle_secondary_ammo 10
-set g_balance_campingrifle_secondary_bulletconstant 130 // 18.3qu
-set g_balance_campingrifle_secondary_burstcost 0
-set g_balance_campingrifle_secondary_bullethail 0
+// {{{ sniperrifle
+set g_balance_sniperrifle_magazinecapacity 8
+set g_balance_sniperrifle_reloadtime 2 // matches reload anim
+set g_balance_sniperrifle_auto_reload_on_switch 0
+set g_balance_sniperrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
+set g_balance_sniperrifle_primary_tracer 0
+set g_balance_sniperrifle_primary_damage 75
+set g_balance_sniperrifle_primary_headshotaddeddamage 90
+set g_balance_sniperrifle_primary_spread 0
+set g_balance_sniperrifle_primary_force 2
+set g_balance_sniperrifle_primary_speed 35000
+set g_balance_sniperrifle_primary_lifetime 5
+set g_balance_sniperrifle_primary_refire 0.7
+set g_balance_sniperrifle_primary_animtime 0.3
+set g_balance_sniperrifle_primary_ammo 10
+set g_balance_sniperrifle_primary_bulletconstant 130 // 56.3qu
+set g_balance_sniperrifle_primary_burstcost 0 // require same cooldown as secondary, note it's smaller than primary refire time
+set g_balance_sniperrifle_primary_bullethail 0 // empty magazine on shot
+set g_balance_sniperrifle_secondary 1
+set g_balance_sniperrifle_secondary_tracer 0
+set g_balance_sniperrifle_secondary_damage 40
+set g_balance_sniperrifle_secondary_headshotaddeddamage 20
+set g_balance_sniperrifle_secondary_spread 0.008
+set g_balance_sniperrifle_secondary_force 1
+set g_balance_sniperrifle_secondary_speed 20000
+set g_balance_sniperrifle_secondary_lifetime 5
+set g_balance_sniperrifle_secondary_refire 0.0006
+set g_balance_sniperrifle_secondary_animtime 0.1
+set g_balance_sniperrifle_secondary_ammo 10
+set g_balance_sniperrifle_secondary_bulletconstant 130 // 18.3qu
+set g_balance_sniperrifle_secondary_burstcost 0
+set g_balance_sniperrifle_secondary_bullethail 0
 // }}}
 // {{{ tuba
 set g_balance_tuba_refire 0.05
index d7e64bb4f2412709b33d26390ebbfa666eeb9f26..bfe331b151860f02269de54245f3b32f542af4d6 100644 (file)
@@ -13,7 +13,7 @@ set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provid
 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_sniperrifle -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"
@@ -267,6 +267,7 @@ set g_balance_uzi_mode 0                            // Activates varible spread for sustained & burst m
 set g_balance_uzi_spread_min 0.02
 set g_balance_uzi_spread_max 0.6
 set g_balance_uzi_spread_add 0.012
+
 set g_balance_uzi_burst 0                              // # of bullets in a burst (if set to 2 or more)
 set g_balance_uzi_burst_refire 0.05            // refire between burst bullets
 set g_balance_uzi_burst_refire2 0.75   // refire after burst
@@ -274,17 +275,20 @@ set g_balance_uzi_burst_spread 0.04
 set g_balance_uzi_burst_damage 18              
 set g_balance_uzi_burst_force 50
 set g_balance_uzi_burst_ammo 3
+
 set g_balance_uzi_first 1
 set g_balance_uzi_first_damage 18
 set g_balance_uzi_first_force 20
 set g_balance_uzi_first_spread 0.03
 set g_balance_uzi_first_refire 0.2
 set g_balance_uzi_first_ammo 1
+
 set g_balance_uzi_sustained_damage 10
 set g_balance_uzi_sustained_force 10
 set g_balance_uzi_sustained_spread 0.08
 set g_balance_uzi_sustained_refire 0.1
 set g_balance_uzi_sustained_ammo 1
+
 set g_balance_uzi_speed 18000
 set g_balance_uzi_bulletconstant 115 // 13.1qu
 // }}}
@@ -328,7 +332,7 @@ set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
 set g_balance_grenadelauncher_bouncefactor 0.5
 set g_balance_grenadelauncher_bouncestop 0.075
 // }}}
-// {{{ minelayer // TODO
+// {{{ minelayer
 set g_balance_minelayer_damage 35
 set g_balance_minelayer_edgedamage 30
 set g_balance_minelayer_force 250
@@ -350,7 +354,7 @@ set g_balance_minelayer_remote_edgedamage 40
 set g_balance_minelayer_remote_radius 200
 set g_balance_minelayer_remote_force 300
 // }}}
-// {{{ electro // TODO
+// {{{ electro
 set g_balance_electro_lightning 1
 set g_balance_electro_primary_damage 90
 set g_balance_electro_primary_edgedamage 0
@@ -393,7 +397,7 @@ set g_balance_electro_combo_radius 250
 set g_balance_electro_combo_comboradius 0
 set g_balance_electro_combo_speed 400
 // }}}
-// {{{ crylink 
+// {{{ crylink
 set g_balance_crylink_primary_damage 10
 set g_balance_crylink_primary_edgedamage 0
 set g_balance_crylink_primary_force -55
@@ -406,6 +410,7 @@ set g_balance_crylink_primary_refire 0.4
 set g_balance_crylink_primary_animtime 0.3
 set g_balance_crylink_primary_ammo 2
 set g_balance_crylink_primary_bouncedamagefactor 0.5
+set g_balance_crylink_primary_joindelay 0
 set g_balance_crylink_primary_joinspread 0
 set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_joinexplode 0
@@ -433,6 +438,7 @@ set g_balance_crylink_secondary_refire 0.2
 set g_balance_crylink_secondary_animtime 0.2
 set g_balance_crylink_secondary_ammo 2
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
+set g_balance_crylink_secondary_joindelay 0
 set g_balance_crylink_secondary_joinspread 0
 set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_joinexplode 0                  
@@ -600,38 +606,38 @@ set g_balance_hlac_secondary_animtime 0.3
 set g_balance_hlac_secondary_ammo 10
 set g_balance_hlac_secondary_shots 6
 // }}}
-// {{{ campingrifle
-set g_balance_campingrifle_magazinecapacity 8 // make it pretty much useless in close combat
-set g_balance_campingrifle_reloadtime 2 // matches reload anim
-set g_balance_campingrifle_auto_reload_on_switch 0
-set g_balance_campingrifle_bursttime 0
-set g_balance_campingrifle_primary_tracer 1
-set g_balance_campingrifle_primary_damage 65
-set g_balance_campingrifle_primary_headshotaddeddamage 75
-set g_balance_campingrifle_primary_spread 0
-set g_balance_campingrifle_primary_force 2
-set g_balance_campingrifle_primary_speed 40000
-set g_balance_campingrifle_primary_lifetime 5
-set g_balance_campingrifle_primary_refire 0.75
-set g_balance_campingrifle_primary_animtime 0.3
-set g_balance_campingrifle_primary_ammo 10
-set g_balance_campingrifle_primary_bulletconstant 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 0.1
-set g_balance_campingrifle_secondary_animtime 0.1
-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
+// {{{ sniperrifle
+set g_balance_sniperrifle_magazinecapacity 8 // make it pretty much useless in close combat
+set g_balance_sniperrifle_reloadtime 2 // matches reload anim
+set g_balance_sniperrifle_auto_reload_on_switch 0
+set g_balance_sniperrifle_bursttime 0
+set g_balance_sniperrifle_primary_tracer 1
+set g_balance_sniperrifle_primary_damage 65
+set g_balance_sniperrifle_primary_headshotaddeddamage 75
+set g_balance_sniperrifle_primary_spread 0
+set g_balance_sniperrifle_primary_force 2
+set g_balance_sniperrifle_primary_speed 40000
+set g_balance_sniperrifle_primary_lifetime 5
+set g_balance_sniperrifle_primary_refire 0.75
+set g_balance_sniperrifle_primary_animtime 0.3
+set g_balance_sniperrifle_primary_ammo 10
+set g_balance_sniperrifle_primary_bulletconstant 110 // 62.2qu
+set g_balance_sniperrifle_primary_burstcost 0
+set g_balance_sniperrifle_primary_bullethail 0 // empty magazine on shot
+set g_balance_sniperrifle_secondary 1
+set g_balance_sniperrifle_secondary_tracer 0
+set g_balance_sniperrifle_secondary_damage 50
+set g_balance_sniperrifle_secondary_headshotaddeddamage 50 // 50 damage only on head
+set g_balance_sniperrifle_secondary_spread 0
+set g_balance_sniperrifle_secondary_force 2
+set g_balance_sniperrifle_secondary_speed 20000
+set g_balance_sniperrifle_secondary_lifetime 5
+set g_balance_sniperrifle_secondary_refire 0.1
+set g_balance_sniperrifle_secondary_animtime 0.1
+set g_balance_sniperrifle_secondary_ammo 10
+set g_balance_sniperrifle_secondary_bulletconstant 110 // 15.5qu
+set g_balance_sniperrifle_secondary_burstcost 0
+set g_balance_sniperrifle_secondary_bullethail 0 // empty magazine on shot
 // }}}
 // {{{ tuba
 set g_balance_tuba_refire 0.05
index 72283286f3831fc29beff6cad238f71069b9da31..b66ef86bd6682d916cb3850f50cbd46414ef41b6 100644 (file)
@@ -13,7 +13,7 @@ set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provid
 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_sniperrifle -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"
@@ -145,7 +145,7 @@ set g_balance_fuel_limit 999
 
 // {{{ misc
 set g_balance_selfdamagepercent 0.65
-set g_balance_weaponswitchdelay 0.1
+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"
@@ -219,7 +219,7 @@ set g_balance_laser_primary_radius 60
 set g_balance_laser_primary_speed 5000
 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_animtime 0.4
 set g_balance_laser_primary_lifetime 5
 set g_balance_laser_primary_shotangle 0
 set g_balance_laser_primary_delay 0
@@ -248,7 +248,7 @@ set g_balance_shotgun_primary_damage 4
 set g_balance_shotgun_primary_force 20
 set g_balance_shotgun_primary_spread 0.18
 set g_balance_shotgun_primary_refire 1
-set g_balance_shotgun_primary_animtime 0.4
+set g_balance_shotgun_primary_animtime 0.3
 set g_balance_shotgun_primary_ammo 1
 set g_balance_shotgun_primary_speed 12000
 set g_balance_shotgun_primary_bulletconstant 75 // 3.8qu
@@ -305,7 +305,7 @@ set g_balance_grenadelauncher_primary_spread 0
 set g_balance_grenadelauncher_primary_lifetime 5
 set g_balance_grenadelauncher_primary_lifetime2 0.65
 set g_balance_grenadelauncher_primary_refire 0.8
-set g_balance_grenadelauncher_primary_animtime 0.4
+set g_balance_grenadelauncher_primary_animtime 0.3
 set g_balance_grenadelauncher_primary_ammo 2
 set g_balance_grenadelauncher_primary_health 80
 set g_balance_grenadelauncher_primary_damageforcescale 0
@@ -323,7 +323,7 @@ set g_balance_grenadelauncher_secondary_spread 0
 set g_balance_grenadelauncher_secondary_lifetime 3
 set g_balance_grenadelauncher_secondary_lifetime2 0.65
 set g_balance_grenadelauncher_secondary_refire 0.8
-set g_balance_grenadelauncher_secondary_animtime 0.4
+set g_balance_grenadelauncher_secondary_animtime 0.3
 set g_balance_grenadelauncher_secondary_ammo 2
 set g_balance_grenadelauncher_secondary_health 40
 set g_balance_grenadelauncher_secondary_damageforcescale 0
@@ -341,7 +341,7 @@ 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_animtime 0.3
 set g_balance_minelayer_ammo 5
 set g_balance_minelayer_health 15
 set g_balance_minelayer_limit 4 // 0 disables the limit
@@ -356,7 +356,7 @@ set g_balance_minelayer_remote_force 300
 // }}}
 // {{{ electro
 set g_balance_electro_lightning 1
-set g_balance_electro_primary_damage 92
+set g_balance_electro_primary_damage 100
 set g_balance_electro_primary_edgedamage 0
 set g_balance_electro_primary_force 425
 set g_balance_electro_primary_force_up 125
@@ -366,7 +366,7 @@ 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_animtime 0.2
 set g_balance_electro_primary_ammo 5
 set g_balance_electro_primary_range 800
 set g_balance_electro_primary_falloff_mindist 0
@@ -407,9 +407,10 @@ set g_balance_crylink_primary_spread 0.05
 set g_balance_crylink_primary_shots 7
 set g_balance_crylink_primary_bounces 2
 set g_balance_crylink_primary_refire 0.8
-set g_balance_crylink_primary_animtime 0.4
+set g_balance_crylink_primary_animtime 0.3
 set g_balance_crylink_primary_ammo 2
 set g_balance_crylink_primary_bouncedamagefactor 0.2
+set g_balance_crylink_primary_joindelay 0
 set g_balance_crylink_primary_joinspread 0.2
 set g_balance_crylink_primary_jointime 0.1
 set g_balance_crylink_primary_joinexplode 0
@@ -437,6 +438,7 @@ 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_joindelay 0
 set g_balance_crylink_secondary_joinspread 0
 set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_joinexplode 0                  
@@ -455,7 +457,7 @@ set g_balance_crylink_secondary_line_fadetime 2
 set g_balance_nex_primary_damage 90
 set g_balance_nex_primary_force 500
 set g_balance_nex_primary_refire 1
-set g_balance_nex_primary_animtime 0.4
+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
@@ -493,7 +495,7 @@ set g_balance_nex_charge_maxspeed 1000
 // }}}
 // {{{ minstanex
 set g_balance_minstanex_refire 1
-set g_balance_minstanex_animtime 0.75
+set g_balance_minstanex_animtime 0.50
 set g_balance_minstanex_ammo 10
 // }}}
 // {{{ hagar
@@ -528,7 +530,7 @@ set g_balance_rocketlauncher_speedaccel 1400
 set g_balance_rocketlauncher_speedstart 800
 set g_balance_rocketlauncher_lifetime 5
 set g_balance_rocketlauncher_refire 1
-set g_balance_rocketlauncher_animtime 0.4
+set g_balance_rocketlauncher_animtime 0.3
 set g_balance_rocketlauncher_ammo 3
 set g_balance_rocketlauncher_health 0
 set g_balance_rocketlauncher_damageforcescale 0
@@ -545,7 +547,7 @@ 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_animtime 0.2
 set g_balance_porto_primary_speed 2000
 set g_balance_porto_primary_lifetime 5
 set g_balance_portal_health 200 // these get recharged whenever the portal is used
@@ -554,7 +556,7 @@ set g_balance_portal_lifetime 15 // these get recharged whenever the portal is u
 // {{{ 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_animtime 0.2 // 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
@@ -567,7 +569,7 @@ 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_animtime 0.2 // 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
 // }}}
@@ -585,7 +587,7 @@ set g_balance_hlac_primary_speed 9000
 set g_balance_hlac_primary_lifetime 5
 
 set g_balance_hlac_primary_refire 0.1
-set g_balance_hlac_primary_animtime 0.3
+set g_balance_hlac_primary_animtime 0.2
 set g_balance_hlac_primary_ammo 1
 
 set g_balance_hlac_secondary 1
@@ -600,42 +602,42 @@ set g_balance_hlac_secondary_speed 9000
 set g_balance_hlac_secondary_lifetime 5
 
 set g_balance_hlac_secondary_refire 0.8
-set g_balance_hlac_secondary_animtime 0.6
+set g_balance_hlac_secondary_animtime 0.4
 set g_balance_hlac_secondary_ammo 4
 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_on_switch 0
-set g_balance_campingrifle_bursttime 0
-set g_balance_campingrifle_primary_tracer 1
-set g_balance_campingrifle_primary_damage 60
-set g_balance_campingrifle_primary_headshotaddeddamage 100
-set g_balance_campingrifle_primary_spread 0
-set g_balance_campingrifle_primary_force 2
-set g_balance_campingrifle_primary_speed 40000
-set g_balance_campingrifle_primary_lifetime 5
-set g_balance_campingrifle_primary_refire 1.5
-set g_balance_campingrifle_primary_animtime 1.4
-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 42
-set g_balance_campingrifle_secondary_headshotaddeddamage 70
-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 1.4
-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
+// {{{ sniperrifle
+set g_balance_sniperrifle_magazinecapacity 8 // make it pretty much useless in close combat
+set g_balance_sniperrifle_reloadtime 2 // matches reload anim
+set g_balance_sniperrifle_auto_reload_on_switch 0
+set g_balance_sniperrifle_bursttime 0
+set g_balance_sniperrifle_primary_tracer 1
+set g_balance_sniperrifle_primary_damage 60
+set g_balance_sniperrifle_primary_headshotaddeddamage 60
+set g_balance_sniperrifle_primary_spread 0
+set g_balance_sniperrifle_primary_force 2
+set g_balance_sniperrifle_primary_speed 40000
+set g_balance_sniperrifle_primary_lifetime 5
+set g_balance_sniperrifle_primary_refire 1.5
+set g_balance_sniperrifle_primary_animtime 1.4
+set g_balance_sniperrifle_primary_ammo 10
+set g_balance_sniperrifle_primary_bulletconstant 110 // 62.2qu
+set g_balance_sniperrifle_primary_burstcost 0
+set g_balance_sniperrifle_primary_bullethail 0 // empty magazine on shot
+set g_balance_sniperrifle_secondary 1
+set g_balance_sniperrifle_secondary_tracer 0
+set g_balance_sniperrifle_secondary_damage 42
+set g_balance_sniperrifle_secondary_headshotaddeddamage 42
+set g_balance_sniperrifle_secondary_spread 0
+set g_balance_sniperrifle_secondary_force 2
+set g_balance_sniperrifle_secondary_speed 20000
+set g_balance_sniperrifle_secondary_lifetime 5
+set g_balance_sniperrifle_secondary_refire 1.5
+set g_balance_sniperrifle_secondary_animtime 1.4
+set g_balance_sniperrifle_secondary_ammo 10
+set g_balance_sniperrifle_secondary_bulletconstant 110 // 15.5qu
+set g_balance_sniperrifle_secondary_burstcost 0
+set g_balance_sniperrifle_secondary_bullethail 0 // empty magazine on shot
 // }}}
 // {{{ tuba
 set g_balance_tuba_refire 0.05
@@ -650,7 +652,7 @@ 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_animtime 0.2
 set g_balance_fireball_primary_bfgdamage 100
 set g_balance_fireball_primary_bfgforce 0
 set g_balance_fireball_primary_bfgradius 1000
@@ -670,7 +672,7 @@ 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_animtime 0.2
 set g_balance_fireball_secondary_damage 40
 set g_balance_fireball_secondary_damageforcescale 4
 set g_balance_fireball_secondary_damagetime 5
@@ -702,7 +704,7 @@ set g_balance_seeker_flac_speed_z 0
 set g_balance_seeker_flac_spread 0.4
 set g_balance_seeker_missile_accel 1400
 set g_balance_seeker_missile_ammo 2
-set g_balance_seeker_missile_animtime 0.3
+set g_balance_seeker_missile_animtime 0.2
 set g_balance_seeker_missile_count 8
 set g_balance_seeker_missile_damage 15
 set g_balance_seeker_missile_damageforcescale 4
@@ -728,7 +730,7 @@ set g_balance_seeker_missile_speed_max 1400
 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_animtime 0.2
 set g_balance_seeker_tag_damageforcescale 4
 set g_balance_seeker_tag_health 5
 set g_balance_seeker_tag_lifetime 15
index bff56f2338ad346fa758ec12c549681cde7c50af..e7f5431d045aefcd0946461e388ab07b0922ec62 100644 (file)
@@ -13,7 +13,7 @@ set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provid
 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_sniperrifle -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"
@@ -55,67 +55,52 @@ set g_balance_nix_ammoincr_fuel 2
 // {{{ pickup items
 set g_pickup_ammo_anyway 1
 set g_pickup_weapons_anyway 1
-
 set g_pickup_shells 20
 set g_pickup_shells_weapon 10
 set g_pickup_shells_max 50
-
 set g_pickup_nails 60
 set g_pickup_nails_weapon 60
 set g_pickup_nails_max 300
-
 set g_pickup_rockets 25
 set g_pickup_rockets_weapon 15
 set g_pickup_rockets_max 150
-
 set g_pickup_cells 30
 set g_pickup_cells_weapon 20
 set g_pickup_cells_max 300
-
 set g_pickup_fuel 25
 set g_pickup_fuel_weapon 15
 set g_pickup_fuel_jetpack 50
 set g_pickup_fuel_max 999
-
 set g_pickup_armorsmall 5
 set g_pickup_armorsmall_max 999
 set g_pickup_armorsmall_anyway 0
-
 set g_pickup_armormedium 25
 set g_pickup_armormedium_max 100
 set g_pickup_armormedium_anyway 0
-
 set g_pickup_armorbig 50
 set g_pickup_armorbig_max 150
 set g_pickup_armorbig_anyway 0
-
 set g_pickup_armorlarge 100
 set g_pickup_armorlarge_max 999
 set g_pickup_armorlarge_anyway 0
-
 set g_pickup_healthsmall 5
 set g_pickup_healthsmall_max 999
 set g_pickup_healthsmall_anyway 0
-
 set g_pickup_healthmedium 25
 set g_pickup_healthmedium_max 100
 set g_pickup_healthmedium_anyway 0
-
 set g_pickup_healthlarge 50
 set g_pickup_healthlarge_max 150
 set g_pickup_healthlarge_anyway 0
-
 set g_pickup_healthmega 100
 set g_pickup_healthmega_max 999
 set g_pickup_healthmega_anyway 0
-
 set g_pickup_respawntime_short 15
 set g_pickup_respawntime_medium 20
 set g_pickup_respawntime_long 30
 set g_pickup_respawntime_powerup 120
 set g_pickup_respawntime_weapon 20
 set g_pickup_respawntime_ammo 15
-
 set g_pickup_respawntimejitter_short 0
 set g_pickup_respawntimejitter_medium 0
 set g_pickup_respawntimejitter_long 0
@@ -277,7 +262,6 @@ set g_balance_shotgun_secondary_force 150
 set g_balance_shotgun_secondary_refire 1.1
 set g_balance_shotgun_secondary_animtime 1
 // }}}
-
 // {{{ uzi
 set g_balance_uzi_mode 1                               // Activates varible spread for sustained & burst mode secondary
 set g_balance_uzi_spread_min 0.02
@@ -348,7 +332,7 @@ set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
 set g_balance_grenadelauncher_bouncefactor 0.5
 set g_balance_grenadelauncher_bouncestop 0.075
 // }}}
-// {{{ minelayer // TODO
+// {{{ minelayer
 set g_balance_minelayer_damage 35
 set g_balance_minelayer_edgedamage 30
 set g_balance_minelayer_force 250
@@ -388,7 +372,6 @@ set g_balance_electro_primary_range 0
 set g_balance_electro_primary_falloff_mindist 255 // 0.3 * radius
 set g_balance_electro_primary_falloff_maxdist 850
 set g_balance_electro_primary_falloff_halflifedist 425
-
 set g_balance_electro_secondary_damage 25
 set g_balance_electro_secondary_edgedamage 0
 set g_balance_electro_secondary_force 50
@@ -407,7 +390,6 @@ set g_balance_electro_secondary_damageforcescale 2
 set g_balance_electro_secondary_count 3
 set g_balance_electro_secondary_bouncefactor 0.5
 set g_balance_electro_secondary_bouncestop 0.075
-
 set g_balance_electro_combo_damage 80
 set g_balance_electro_combo_edgedamage 10
 set g_balance_electro_combo_force 150
@@ -428,6 +410,7 @@ 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_joindelay 0
 set g_balance_crylink_primary_joinspread 0.1
 set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_joinexplode 1                            //if != 0 do a extra damage pass when projectiles join
@@ -436,6 +419,7 @@ set g_balance_crylink_primary_joinexplode_edgedamage 20
 set g_balance_crylink_primary_joinexplode_radius 200
 set g_balance_crylink_primary_joinexplode_force 400
 set g_balance_crylink_primary_linkexplode 0
+
 set g_balance_crylink_primary_middle_lifetime 5 
 set g_balance_crylink_primary_middle_fadetime 0.25
 set g_balance_crylink_primary_other_lifetime 2 // range: 800 full, fades to 1300
@@ -454,6 +438,7 @@ 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_joindelay 0
 set g_balance_crylink_secondary_joinspread 0
 set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_joinexplode 0                  
@@ -535,7 +520,7 @@ 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
+// {{{ rocketlauncher
 set g_balance_rocketlauncher_damage 120
 set g_balance_rocketlauncher_edgedamage 25
 set g_balance_rocketlauncher_force 350
@@ -615,43 +600,44 @@ set g_balance_hlac_secondary_force 100
 set g_balance_hlac_secondary_radius 50
 set g_balance_hlac_secondary_speed 15000
 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_on_switch 0
-set g_balance_campingrifle_bursttime 0
-set g_balance_campingrifle_primary_tracer 1
-set g_balance_campingrifle_primary_damage 40
-set g_balance_campingrifle_primary_headshotaddeddamage 100
-set g_balance_campingrifle_primary_spread 0
-set g_balance_campingrifle_primary_force 2
-set g_balance_campingrifle_primary_speed 40000
-set g_balance_campingrifle_primary_lifetime 5
-set g_balance_campingrifle_primary_refire 0.65
-set g_balance_campingrifle_primary_animtime 0.6
-set g_balance_campingrifle_primary_ammo 10
-set g_balance_campingrifle_primary_bulletconstant 110 // 62.2qu
-set g_balance_campingrifle_primary_burstcost 0
-set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
-set g_balance_campingrifle_secondary 1
-set g_balance_campingrifle_secondary_tracer 0
-set g_balance_campingrifle_secondary_damage 50
-set g_balance_campingrifle_secondary_headshotaddeddamage 50 // 50 damage only on head
-set g_balance_campingrifle_secondary_spread 0
-set g_balance_campingrifle_secondary_force 2
-set g_balance_campingrifle_secondary_speed 20000
-set g_balance_campingrifle_secondary_lifetime 5
-set g_balance_campingrifle_secondary_refire 1.5
-set g_balance_campingrifle_secondary_animtime 0.6
-set g_balance_campingrifle_secondary_ammo 10
-set g_balance_campingrifle_secondary_bulletconstant 110 // 15.5qu
-set g_balance_campingrifle_secondary_burstcost 0
-set g_balance_campingrifle_secondary_bullethail 0 // empty magazine on shot
+// {{{ sniperrifle
+set g_balance_sniperrifle_magazinecapacity 8 // make it pretty much useless in close combat
+set g_balance_sniperrifle_reloadtime 2 // matches reload anim
+set g_balance_sniperrifle_auto_reload_on_switch 0
+set g_balance_sniperrifle_bursttime 0
+set g_balance_sniperrifle_primary_tracer 1
+set g_balance_sniperrifle_primary_damage 40
+set g_balance_sniperrifle_primary_headshotaddeddamage 100
+set g_balance_sniperrifle_primary_spread 0
+set g_balance_sniperrifle_primary_force 2
+set g_balance_sniperrifle_primary_speed 40000
+set g_balance_sniperrifle_primary_lifetime 5
+set g_balance_sniperrifle_primary_refire 0.65
+set g_balance_sniperrifle_primary_animtime 0.6
+set g_balance_sniperrifle_primary_ammo 10
+set g_balance_sniperrifle_primary_bulletconstant 110 // 62.2qu
+set g_balance_sniperrifle_primary_burstcost 0
+set g_balance_sniperrifle_primary_bullethail 0 // empty magazine on shot
+set g_balance_sniperrifle_secondary 1
+set g_balance_sniperrifle_secondary_tracer 0
+set g_balance_sniperrifle_secondary_damage 50
+set g_balance_sniperrifle_secondary_headshotaddeddamage 50 // 50 damage only on head
+set g_balance_sniperrifle_secondary_spread 0
+set g_balance_sniperrifle_secondary_force 2
+set g_balance_sniperrifle_secondary_speed 20000
+set g_balance_sniperrifle_secondary_lifetime 5
+set g_balance_sniperrifle_secondary_refire 1.5
+set g_balance_sniperrifle_secondary_animtime 0.6
+set g_balance_sniperrifle_secondary_ammo 10
+set g_balance_sniperrifle_secondary_bulletconstant 110 // 15.5qu
+set g_balance_sniperrifle_secondary_burstcost 0
+set g_balance_sniperrifle_secondary_bullethail 0 // empty magazine on shot
 // }}}
 // {{{ tuba
 set g_balance_tuba_refire 0.05
@@ -716,7 +702,6 @@ 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 1400
 set g_balance_seeker_missile_ammo 2
 set g_balance_seeker_missile_animtime 0.3
@@ -744,7 +729,6 @@ set g_balance_seeker_missile_speed_z 0
 set g_balance_seeker_missile_speed_max 1400
 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
index c0dce41e134e5c73fad86305edbac252e5486451..4aacf09f1cff3d7c049302aacfc546330896f0d8 100644 (file)
@@ -15,7 +15,7 @@ set g_weaponreplace_porto ""
 set g_weaponreplace_minstanex ""
 set g_weaponreplace_hook ""
 set g_weaponreplace_hlac 0 // Maybe will be enabled later after I figure out what I want to do with it
-set g_weaponreplace_campingrifle ""
+set g_weaponreplace_sniperrifle ""
 set g_weaponreplace_tuba "" 
 set g_weaponreplace_fireball 0 // Same with this
 set g_weaponreplace_seeker 0 // Same with this
index 35d5da985993d7ad40c8d974ebf7620ba60ac08b..b8a5ce7a17658bd11f6a50107cde738c5d8aaaf7 100644 (file)
@@ -7,6 +7,7 @@ exec defaultXonotic.cfg
 
 // players
 sv_fbskin_green // visible playermodel forced on everyone
+set teamplay_mode 2 // friendly fire and self damage
 
 //================
 // impure changes
@@ -25,8 +26,6 @@ set g_shootfromcenter 1 // hit where you point at with the crosshair (almost so,
 // match rules
 set timelimit_overtimes 1 // overtimes on, draw matches are less interesting! :)
 set g_forced_respawn 1 // no delaying/cheating a match by not spawning
-set g_mirrordamage 0 // hurting teammates does not hurt you...
-set g_friendlyfire 1 // ...it hurts them.
 
 // info
 set sv_fragmessage_information_stats 0 // don't reveal how much health/armor the attacker had
index 6c8905004ca56826fa6a921858e7deb176ecf4fb..751a368b74d61c1a83ae0bd95f9aed410e108088 100644 (file)
@@ -88,17 +88,17 @@ alias movetoteam_auto "sv_cmd movetoteam $1 auto"
 mod_q3bsp_lightmapmergepower 4
 
 // player defaults
-_cl_color 102
+_cl_color 112
 _cl_name Player
-_cl_playermodel models/player/umbra.iqm
+_cl_playermodel models/player/erebus.iqm
 _cl_playerskin 0
 seta crosshair 16
 seta crosshair_color "0.6 0.8 1"
-seta crosshair_alpha 0.3
-seta crosshair_size 0.5
+seta crosshair_alpha 0.300000
+seta crosshair_size 0.500000
 seta crosshair_dot 1
 seta crosshair_dot_alpha 1
-seta crosshair_dot_size 0.6
+seta crosshair_dot_size 0.600000
 seta crosshair_dot_color "1 0 0" "when != 0, use custom color for the crosshair dot"
 seta crosshair_pickup 0.25
 seta crosshair_pickup_speed 4
@@ -169,10 +169,10 @@ seta crosshair_seeker ""  "crosshair to display when wielding the TAG Seeker"
 seta crosshair_seeker_color "1 0.35 0.35"      "crosshair color to display when wielding the TAG seeker"
 seta crosshair_seeker_alpha 0.9        "crosshair alpha value to display when wielding the TAG seeker"
 seta crosshair_seeker_size 0.8 "crosshair size when wielding the TAG seeker"
-seta crosshair_campingrifle "" "crosshair to display when wielding the campingrifle"
-seta crosshair_campingrifle_color "0.85 0.5 0.25"      "crosshair color to display when wielding the campingrifle"
-seta crosshair_campingrifle_alpha 1    "crosshair alpha value to display when wielding the campingrifle"
-seta crosshair_campingrifle_size 0.65  "crosshair size when wielding the campingrifle"
+seta crosshair_sniperrifle ""  "crosshair to display when wielding the sniperrifle"
+seta crosshair_sniperrifle_color "0.85 0.5 0.25"       "crosshair color to display when wielding the sniperrifle"
+seta crosshair_sniperrifle_alpha 1     "crosshair alpha value to display when wielding the sniperrifle"
+seta crosshair_sniperrifle_size 0.65   "crosshair size when wielding the sniperrifle"
 seta crosshair_tuba "" "crosshair to display when wielding the tuba"
 seta crosshair_tuba_color "0.85 0.5 0.25"      "crosshair color to display when wielding the tuba"
 seta crosshair_tuba_alpha 1    "crosshair alpha value to display when wielding the tuba"
@@ -186,7 +186,7 @@ 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_ring_alpha 0.2  "ring alpha"
 
-seta crosshair_ring_campingrifle_alpha 0.15
+seta crosshair_ring_sniperrifle_alpha 0.15
 
 seta crosshair_ring_nex_outer_alpha 0.15
 seta crosshair_ring_nex_inner_alpha 0.15
@@ -386,6 +386,7 @@ sv_jumpstep 1 // step up stairs while jumping, makes it easier to reach ledges
 set ekg 0      "Throw huge amounts of gibs"
 
 cl_movement 1
+cl_movement_track_canjump 0
 cl_stairsmoothspeed 200
 
 seta cl_autoswitch 1 "automatically switch to newly picked up weapons if they are better than what you are carrying"
@@ -400,16 +401,16 @@ seta bot_suffix ""        "Suffix behind the bot names"
 seta skill_auto 0      "when 1, \"skill\" gets adjusted to match the best player on the map"
 // general bot AI cvars
 set bot_ai_thinkinterval 0.05
-set bot_ai_strategyinterval 3 "How often a new objective is chosen"
-set bot_ai_enemydetectioninterval 0.5 "How often bots pick a new target"
+set bot_ai_strategyinterval 5 "How often a new objective is chosen"
+set bot_ai_enemydetectioninterval 3 "How often bots pick a new target"
 set bot_ai_enemydetectionradius 10000 "How far bots can see enemies"
-set bot_ai_dodgeupdateinterval 0.1 "How often scan for items to dodge. Currently not in use."
-set bot_ai_chooseweaponinterval 0.3 "How often the best weapon according to the situation will be chosen"
-set bot_ai_dangerdetectioninterval 0.1 "How often scan for waypoints with dangers near"
+set bot_ai_dodgeupdateinterval 0.2 "How often scan for items to dodge. Currently not in use."
+set bot_ai_chooseweaponinterval 0.5 "How often the best weapon according to the situation will be chosen"
+set bot_ai_dangerdetectioninterval 0.25 "How often scan for waypoints with dangers near"
 set bot_ai_dangerdetectionupdates 64 "How many waypoints will be considered for danger detection"
 set bot_ai_aimskill_blendrate 2        "How much correction will be applied to the aiming angle"
 set bot_ai_aimskill_fixedrate 15
-set bot_ai_aimskill_firetolerance_distdegrees 180
+set bot_ai_aimskill_firetolerance_distdegrees 100
 set bot_ai_aimskill_firetolerance_mindegrees 2 "Minimum angle tolerance. Used on large distances"
 set bot_ai_aimskill_firetolerance_maxdegrees 60 "Maximum firing angle. Used on close range"
 set bot_ai_aimskill_mouse 1 "How much of the aiming filters are applied"
@@ -418,17 +419,17 @@ set bot_ai_keyboard_treshold 0.57
 set bot_ai_aimskill_offset 0.3 "Amount of error induced to the bots aim"
 set bot_ai_aimskill_think 1 "Aiming velocity. Use values below 1 for slower aiming"
 set bot_ai_custom_weapon_priority_distances "300 850"  "Define close and far distances in any order. Based on the distance to the enemy bots will choose different weapons"
-set bot_ai_custom_weapon_priority_far   "minstanex nex campingrifle electro rocketlauncher grenadelauncher hagar hlac crylink laser uzi fireball seeker shotgun tuba minelayer"        "Desired weapons for far distances ordered by priority"
-set bot_ai_custom_weapon_priority_mid   "minstanex rocketlauncher nex fireball seeker grenadelauncher electro uzi campingrifle crylink hlac hagar shotgun laser tuba minelayer"        "Desired weapons for middle distances ordered by priority"
-set bot_ai_custom_weapon_priority_close "minstanex shotgun nex uzi hlac tuba seeker hagar crylink grenadelauncher electro campingrifle rocketlauncher laser fireball minelayer"        "Desired weapons for close distances ordered by priority"
+set bot_ai_custom_weapon_priority_far   "minstanex nex sniperrifle electro rocketlauncher grenadelauncher hagar hlac crylink laser uzi fireball seeker shotgun tuba minelayer" "Desired weapons for far distances ordered by priority"
+set bot_ai_custom_weapon_priority_mid   "minstanex rocketlauncher nex fireball seeker grenadelauncher electro uzi sniperrifle crylink hlac hagar shotgun laser tuba minelayer" "Desired weapons for middle distances ordered by priority"
+set bot_ai_custom_weapon_priority_close "minstanex shotgun nex uzi hlac tuba seeker hagar crylink grenadelauncher electro sniperrifle rocketlauncher laser fireball minelayer" "Desired weapons for close distances ordered by priority"
 set bot_ai_weapon_combo 1      "Enable bots to do weapon combos"
-set bot_ai_weapon_combo_threshold 0.3  "Try to make a combo N seconds after the last attack"
+set bot_ai_weapon_combo_threshold 0.4  "Try to make a combo N seconds after the last attack"
 set bot_ai_friends_aware_pickup_radius "500"   "Bots will not pickup items if a team mate is this distance near the item"
 set bot_ai_ignoregoal_timeout 3        "Ignore goals making bots to get stuck in front of a wall for N seconds"
 set bot_ai_bunnyhop_skilloffset 7      "Bots with skill equal or greater than this value will perform the  \"bunnyhop\" technique"
-set bot_ai_bunnyhop_startdistance 250 "Run to goals located further than this distance"
-set bot_ai_bunnyhop_stopdistance 220 "Stop jumping after reaching this distance to the goal"
-set bot_ai_bunnyhop_firstjumpdelay 0.5 "Start running to the goal only if it was seen for more than N seconds"
+set bot_ai_bunnyhop_startdistance 100 "Run to goals located further than this distance"
+set bot_ai_bunnyhop_stopdistance 125 "Stop jumping after reaching this distance to the goal"
+set bot_ai_bunnyhop_firstjumpdelay 0.2 "Start running to the goal only if it was seen for more than N seconds"
 set bot_god 0 "god mode for bots"
 set bot_ai_navigation_jetpack 0 "Enable bots to navigat maps using the jetpack"
 set bot_ai_navigation_jetpack_mindistance 3500 "Bots will try fly to objects located farther than this distance"
@@ -458,7 +459,7 @@ alias g_waypointeditor_unreachable "impulse 107"
 
 locs_enable 0
 pausable 0
-seta g_spawnshieldtime 0.300000 "number of seconds you are invincible after you spawned, this shield is lost after you fire"
+seta g_spawnshieldtime 1.000000 "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)"
@@ -564,7 +565,8 @@ set g_freezetag 0 "Freeze Tag: Freeze the opposing team(s) to win, unfreeze team
 seta g_freezetag_warmup 5 "Time players get to run around before the round starts"
 seta g_freezetag_point_limit -1        "Freeze Tag point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 seta g_freezetag_point_leadlimit -1    "Freeze Tag point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_freezetag_revive_time 2.5 "Time it takes to revive a frozen teammate"
+seta g_freezetag_revive_speed 0.4 "Speed for reviving a frozen teammate"
+seta g_freezetag_revive_clearspeed 1.6 "Speed at which reviving progress gets lost when out of range"
 seta g_freezetag_revive_extra_size 100 "Distance in qu that you can stand from a frozen teammate to keep reviving him"
 seta g_freezetag_frozen_force 0.6 "How much to multiply the force on a frozen player with"
 
@@ -637,10 +639,12 @@ 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_mode 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.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"
+seta g_mirrordamage 0.700000   "for teamplay 4: mirror damage factor"
+seta g_mirrordamage_virtual 1  "for teamplay 4: do not actually apply mirror damage, just show graphics effect for it"
+seta g_friendlyfire 0.500000   "for teamplay 4: fiendly fire factor"
+seta g_friendlyfire_virtual 1  "for teamplay 4: do not actually apply friendly fire, just show graphics effect for it"
+seta g_teamdamage_threshold 40 "for teamplay 4: threshold over which to apply mirror damage"
+seta g_teamdamage_resetspeed 20        "for teamplay 4: how fast player's teamdamage count decreases"
 
 set deathmatch_force_teamplay 0        "Always play TDM instead of DM"
 seta g_balance_teams 0 "automatically balance out players entering instead of asking them for their preferred team"
@@ -867,7 +871,7 @@ r_picmipsprites 0 // Xonotic uses sprites that should never be picmipped (team m
 r_picmipworld 1
 gl_picmip_world 0
 gl_picmip_sprites 0
-gl_picmip_other 2 // so, picmip -2 is best possible quality
+gl_picmip_other 1 // so, picmip -1 is best possible quality
 r_mipsprites 1
 r_mipskins 1
 r_shadow_realtime_world_lightmaps 1
@@ -935,8 +939,6 @@ alias +fire2 +button3
 alias -fire2 -button3
 alias +attack2 +button3 // old alias from Nexuiz
 alias -attack2 -button3 // old alias name from Nexuiz
-alias +zoom +button4
-alias -zoom -button4
 alias +crouch +button5
 alias -crouch -button5
 alias weapnext "_weapnext_${cl_weaponpriority_useforcycling}"
@@ -950,6 +952,12 @@ alias _weapprev_1 "impulse 16"
 alias _weapprev_2 "impulse 12"
 alias weapbest "impulse 13"
 
+// experimental zoom toggle (can be in wrong state at start of a game, though)
+set _togglezoom +
+alias +zoom "set _togglezoom -; +button4"
+alias -zoom "set _togglezoom +; -button4"
+alias togglezoom "${_togglezoom}zoom"
+
 alias reload "impulse 20"
 
 // movement
@@ -1132,7 +1140,7 @@ set quit_and_redirect ""  "set to an IP to redirect all players at the end of the
 // singleplayer campaign
 set g_campaign 0
 set g_campaign_forceteam 0 "Forces the player to a given team in campaign mode, 1 = red, 2 = blue, 3 = yellow, 4 = pink"
-seta g_campaign_name "xonotic25"
+seta g_campaign_name "xonoticbeta"
 set g_campaign_skill 0
 set g_campaignxonotic20_index 0
 set g_campaignxonotic25_index 1
@@ -1353,6 +1361,7 @@ 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"
+set menu_picmip_bypass 0 "bypass texture quality enforcement based on system resources, not recommended and may cause crashes!"
 
 r_textbrightness 0.2
 r_textcontrast 0.8
@@ -1388,8 +1397,6 @@ seta hud_panel_weapons_ammo_full_nails 200 "show 100% of the status bar at this
 seta hud_panel_weapons_ammo_full_cells 80 "show 100% of the status bar at this ammo count"
 seta hud_panel_weapons_ammo_full_rockets 80 "show 100% of the status bar at this ammo count"
 seta hud_panel_weapons_ammo_full_fuel 100 "show 100% of the status bar at this ammo count"
-seta hud_panel_weapons_timeout "3" "panel disappears if you don't switch weapon for this amount of seconds"
-seta hud_panel_weapons_timeout_effect "1" "disappearance effect: 0) no effect; 1) panel moves out of screen; 2) panel fades out"
 
 seta hud_panel_ammo_maxammo "40" "when you have this much ammo, the ammo status bar is full"
 
@@ -1417,13 +1424,13 @@ seta hud_showbinds_limit 2      "maximum number of bound keys to show for a command.
 
 seta hud_colorflash_alpha 0.5 "starting alpha of the color flash"
 
-seta hud_damage 1 "an improved version of gl_polyblend, draw an image instead when hurt"
-seta hud_damage_gentle_alpha_multiplier 0.25 "how much to multiply alpha of flash when using the cl_gentle version, it's much more opaque than the non-gentle version"
+seta hud_damage 0.55 "an improved version of gl_polyblend, draw an image instead when hurt"
+seta hud_damage_gentle_alpha_multiplier 0.10 "how much to multiply alpha of flash when using the cl_gentle version, it's much more opaque than the non-gentle version"
 seta hud_damage_gentle_color "1 0.7 1" "color of flash for cl_gentle version"
 seta hud_damage_color "1 0 0" "color of flash"
 seta hud_damage_factor 0.025 "(damage * factor) = how much to add to the alpha value"
-seta hud_damage_fade_rate 1 "how much to subtract from the alpha value each second"
-seta hud_damage_maxalpha 2 "how much to limit the alpha value to"
+seta hud_damage_fade_rate 0.75 "how much to subtract from the alpha value each second"
+seta hud_damage_maxalpha 1.5 "how much to limit the alpha value to"
 seta hud_damage_pain_threshold 0.1 "how much alpha to ignore (must be bigger than the hud_damage_factor so that e.g. rot is ignored)"
 seta hud_damage_pain_threshold_lower 1.25 "how much we lower pain_threshold with when nearing 0 health (if pain_threshold gets negative then we always draw a flash at alpha = fabs(pain_threshold)"
 seta hud_damage_pain_threshold_lower_health 50 "at which health we start lowering pain_threshold"
@@ -1600,12 +1607,12 @@ set g_jump_grunt 0      "Do you make a grunting noise every time you jump? Is it the
 
 alias allready "sv_cmd allready"
 
-seta cl_weaponpriority "minstanex rocketlauncher nex minelayer grenadelauncher fireball hlac hagar seeker crylink campingrifle uzi electro tuba shotgun laser hook porto" "weapon priority list"
+seta cl_weaponpriority "minstanex rocketlauncher nex minelayer grenadelauncher fireball hlac hagar seeker crylink sniperrifle uzi electro tuba shotgun laser hook porto" "weapon priority list"
 seta cl_weaponpriority_useforcycling 0 "when set, weapon cycling by the mouse wheel makes use of the weapon priority list (the special value 2 uses the weapon ID list for cycling)"
 seta cl_weaponpriority0 "rocketlauncher grenadelauncher hagar seeker fireball" "use impulse 200 for prev gun from this list, 210 for best gun, 220 for next gun.  Default value: explosives"
 seta cl_weaponpriority1 "minstanex nex crylink hlac electro laser"             "use impulse 201 for prev gun from this list, 211 for best gun, 221 for next gun.  Default value: energy"
-seta cl_weaponpriority2 "minstanex nex campingrifle"                           "use impulse 202 for prev gun from this list, 212 for best gun, 222 for next gun.  Default value: hitscan exact"
-seta cl_weaponpriority3 "minstanex nex campingrifle uzi shotgun"               "use impulse 203 for prev gun from this list, 213 for best gun, 223 for next gun.  Default value: hitscan all"
+seta cl_weaponpriority2 "minstanex nex sniperrifle"                           "use impulse 202 for prev gun from this list, 212 for best gun, 222 for next gun.  Default value: hitscan exact"
+seta cl_weaponpriority3 "minstanex nex sniperrifle uzi shotgun"               "use impulse 203 for prev gun from this list, 213 for best gun, 223 for next gun.  Default value: hitscan all"
 seta cl_weaponpriority4 "minelayer grenadelauncher hlac hagar crylink seeker shotgun"    "use impulse 204 for prev gun from this list, 214 for best gun, 224 for next gun.  Default value: spam weapons"
 seta cl_weaponpriority5 "laser hook porto"                                     "use impulse 205 for prev gun from this list, 215 for best gun, 225 for next gun.  Default value: weapons for moving"
 seta cl_weaponpriority6 "" "use impulse 206 for prev gun from this list, 216 for best gun, 226 for next gun"
@@ -1812,6 +1819,7 @@ alias cl_hook_gamestart_rc
 alias cl_hook_gamestart_nexball
 alias cl_hook_gamestart_cts
 alias cl_hook_gamestart_ka
+alias cl_hook_gamestart_freezetag
 alias cl_hook_gameend
 alias cl_hook_activeweapon
 
@@ -1833,6 +1841,7 @@ alias sv_hook_gamestart_rc
 alias sv_hook_gamestart_nexball
 alias sv_hook_gamestart_cts
 alias sv_hook_gamestart_ka
+alias sv_hook_gamestart_freezetag
 alias sv_hook_gamerestart
 alias sv_hook_gameend
 
@@ -1955,7 +1964,7 @@ set g_weaponreplace_porto ""
 set g_weaponreplace_minstanex ""
 set g_weaponreplace_hook ""
 set g_weaponreplace_hlac ""
-set g_weaponreplace_campingrifle ""
+set g_weaponreplace_sniperrifle ""
 set g_weaponreplace_tuba ""
 set g_weaponreplace_fireball ""
 set g_weaponreplace_seeker ""
@@ -1982,9 +1991,11 @@ scr_loadingscreen_background 0
 scr_loadingscreen_barcolor "0 0.5 1"
 scr_loadingscreen_barheight 20
 scr_loadingscreen_count 1
+scr_conforcewhiledisconnected 0
 
 // DP cannot properly detect this, so rather turn off the detection
 r_texture_dds_load_dxt1_noalpha 1
+r_texture_dds_load_swdecode 1 // SW decode to quarter res if we want to load DDS but don't support the extension for it
 
 // particles optimization
 r_drawparticles_nearclip_min 8
@@ -2016,7 +2027,7 @@ utf8_enable 1
 // safe font defaults
 r_font_hinting 1
 r_font_disable_freetype 0
-r_font_size_snapping 2
+r_font_size_snapping 4
 
 // database management
 set sv_db_saveasdump 0 "write server.db in dump format (loads slower, easier to read/parse)"
index 3e69bd82671b6483593a81bcdb184500be56cc37..bb44e5b4dab208995bc03d9cf732b718cfb8d59b 100644 (file)
@@ -4694,8 +4694,6 @@ bounce 1.5
 liquidfriction 4
 velocityjitter 16 16 16
 
-
-
 // rocket guiding start
 // underwater bubbles
 effect rocket_guide
@@ -5125,3 +5123,74 @@ originjitter 1 1 1
 velocityjitter 300 300 300
 velocitymultiplier 0.5
 airfriction 3
+
+
+// weak rifle bullet trail (somewhat like a tracer)
+// 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_weak
+trailspacing 128
+type spark
+color 0x800000 0xFF8020
+alpha 256 256 2560
+size 1.5 1.5
+stretchfactor 1
+velocitymultiplier 0.7
+effect tr_rifle_weak
+notunderwater
+tex 0 8
+trailspacing 48
+type static
+color 0x202020 0x404040
+size 4 4
+sizeincrease 0.4
+alpha 256 256 256
+airfriction -4
+velocityjitter 4 4 4
+type smoke
+effect tr_rifle_weak
+underwater
+trailspacing 192
+type bubble
+tex 62 62
+color 0x404040 0x808080
+size 2 2
+alpha 256 256 128
+gravity -0.125
+bounce 1.5
+liquidfriction 4
+velocityjitter 16 16 16
+
+// red smoke emiter
+// used nowhere in code
+effect red_smoke
+count 2
+type smoke
+tex 0 8
+color 0xff8866 0x331100
+size 60 120
+sizeincrease 0
+alpha 32 64 32
+gravity -0.007
+originjitter 0 0 0
+velocityjitter 0 0 0
+velocitymultiplier 5
+airfriction -1
+rotate 0 360 -30 30
+
+// pipe smoke emiter
+// used nowhere in code
+effect pipe_smoke
+count 2
+type smoke
+tex 0 8
+color 0x999999 0x555555
+size 5 10
+sizeincrease 35
+alpha 32 64 48
+gravity -0.015
+originjitter 0 0 0
+velocityjitter 0 0 5
+velocitymultiplier 15
+airfriction -1
+rotate 0 360 -180 180
index f6e002ba6d1d69d19423656a818c4fcb0278ddb0..5a6deb9b9430f71a4bc3ce20a4ff8e180caee048 100644 (file)
@@ -2,7 +2,7 @@ cl_decals 1
 cl_decals_time 10
 cl_particles_quality 1
 gl_flashblend 0
-gl_picmip -2
+gl_picmip -1
 gl_texture_anisotropy 16
 mod_q3bsp_nolightmaps 0
 r_bloom 1
index e9f7b0cc76d33fe7cda7f4327dd308d20290622b..b6d7f04aa4b9f2d5121bce06e326877f22d72a99 100644 (file)
@@ -2,7 +2,7 @@ cl_decals 1
 cl_decals_time 10
 cl_particles_quality 1
 gl_flashblend 0
-gl_picmip -2
+gl_picmip -1
 gl_texture_anisotropy 16
 mod_q3bsp_nolightmaps 0
 r_bloom 1
diff --git a/fixbalance.sh b/fixbalance.sh
new file mode 100755 (executable)
index 0000000..cfc6cc0
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+main=balanceXonotic.cfg
+for X in balance*.cfg; do
+       case "$X" in
+               "$main")
+                       ;;
+               *)
+                       perl ../../misc/tools/cfgapply.pl "$main" "$X" > "$X.new" && mv "$X.new" "$X"
+                       ;;
+       esac
+done
+git diff
diff --git a/gfx/hud/default/weaponcampingrifle.tga b/gfx/hud/default/weaponcampingrifle.tga
deleted file mode 100644 (file)
index f5c2e55..0000000
Binary files a/gfx/hud/default/weaponcampingrifle.tga and /dev/null differ
diff --git a/gfx/hud/default/weaponsniperrifle.tga b/gfx/hud/default/weaponsniperrifle.tga
new file mode 100644 (file)
index 0000000..f5c2e55
Binary files /dev/null and b/gfx/hud/default/weaponsniperrifle.tga differ
diff --git a/gfx/hud/luminos/weaponcampingrifle.tga b/gfx/hud/luminos/weaponcampingrifle.tga
deleted file mode 100644 (file)
index f5c2e55..0000000
Binary files a/gfx/hud/luminos/weaponcampingrifle.tga and /dev/null differ
diff --git a/gfx/hud/luminos/weaponsniperrifle.tga b/gfx/hud/luminos/weaponsniperrifle.tga
new file mode 100644 (file)
index 0000000..f5c2e55
Binary files /dev/null and b/gfx/hud/luminos/weaponsniperrifle.tga differ
diff --git a/gfx/hud/old/weaponcampingrifle.tga b/gfx/hud/old/weaponcampingrifle.tga
deleted file mode 100644 (file)
index 09da559..0000000
Binary files a/gfx/hud/old/weaponcampingrifle.tga and /dev/null differ
diff --git a/gfx/hud/old/weaponsniperrifle.tga b/gfx/hud/old/weaponsniperrifle.tga
new file mode 100644 (file)
index 0000000..09da559
Binary files /dev/null and b/gfx/hud/old/weaponsniperrifle.tga differ
index 589a7fd2d7aeeda72dd74416a986adf2deb032d1..44ebb5294a7921b0f8e52f86753a6dcc7d0b0dbc 100644 (file)
Binary files a/gfx/loading.tga and b/gfx/loading.tga differ
index e556db70e974071a47a2c3916e6352a631ad5e7c..42d8379c5514dd9c7ee9fa579571936f3200267a 100644 (file)
@@ -13,7 +13,7 @@ seta cl_swapattacks_tuba 0
 seta cl_swapattacks_laser 0
 seta cl_swapattacks_shotgun 0
 seta cl_swapattacks_uzi 0
-seta cl_swapattacks_campingrifle 0
+seta cl_swapattacks_sniperrifle 0
 seta cl_swapattacks_grenadelauncher 0
 seta cl_swapattacks_electro 0
 seta cl_swapattacks_hlac 0
index 8a946578f79e0e17351556bdef69de5169c7e8c3..a3f3ed39e51f0dd8961f77f80094f1f600986fd6 100644 (file)
@@ -45,6 +45,8 @@ seta hud_panel_weapons_complainbubble_color_unavailable "0 0.3 0.8"
 seta hud_panel_weapons_ammo_color "0 1 0"
 seta hud_panel_weapons_ammo_alpha "1"
 seta hud_panel_weapons_aspect "2"
+seta hud_panel_weapons_timeout "3"
+seta hud_panel_weapons_timeout_effect "1"
 
 seta hud_panel_ammo 1
 seta hud_panel_ammo_pos "0.190000 0.920000"
@@ -191,7 +193,7 @@ seta hud_panel_chat_bg_alpha ""
 seta hud_panel_chat_bg_border ""
 seta hud_panel_chat_bg_padding ""
 
-seta hud_panel_engineinfo 1
+seta hud_panel_engineinfo 0
 seta hud_panel_engineinfo_pos "0.910000 0.970000"
 seta hud_panel_engineinfo_size "0.090000 0.030000"
 seta hud_panel_engineinfo_bg "0"
index 8ee4ea7780133da438d856aa9c205b4048a2e4e1..8e39416314bdf665e1ad59b1cfaf26119ee926a5 100644 (file)
@@ -45,6 +45,8 @@ seta hud_panel_weapons_complainbubble_color_unavailable "0 0.3 0.8"
 seta hud_panel_weapons_ammo_color "0 1 0"
 seta hud_panel_weapons_ammo_alpha "1"
 seta hud_panel_weapons_aspect "2"
+seta hud_panel_weapons_timeout "0"
+seta hud_panel_weapons_timeout_effect "0"
 
 seta hud_panel_ammo 1
 seta hud_panel_ammo_pos "0.650000 0.890000"
index 73b08adeb16ea344a2e8b01815b9b37cad8e01ae..10f7afd149822e08d9b99e94521e17373d04dbf3 100644 (file)
@@ -45,6 +45,8 @@ seta hud_panel_weapons_complainbubble_color_unavailable "0 0.3 0.8"
 seta hud_panel_weapons_ammo_color "0 1 0"
 seta hud_panel_weapons_ammo_alpha "1"
 seta hud_panel_weapons_aspect "2"
+seta hud_panel_weapons_timeout "0"
+seta hud_panel_weapons_timeout_effect "0"
 
 seta hud_panel_ammo 1
 seta hud_panel_ammo_pos "0.450000 0.630000"
index dfecf74009385704191e561a0f00e1c87407aa76..681b7378e01fa3ce213ba3b552b2cca169f6913c 100644 (file)
@@ -45,6 +45,8 @@ seta hud_panel_weapons_complainbubble_color_unavailable "0 0.3 0.8"
 seta hud_panel_weapons_ammo_color "0 1 0"
 seta hud_panel_weapons_ammo_alpha "1"
 seta hud_panel_weapons_aspect "2"
+seta hud_panel_weapons_timeout "0"
+seta hud_panel_weapons_timeout_effect "0"
 
 seta hud_panel_ammo 1
 seta hud_panel_ammo_pos "0.160000 0.910000"
@@ -191,7 +193,7 @@ seta hud_panel_chat_bg_alpha ""
 seta hud_panel_chat_bg_border ""
 seta hud_panel_chat_bg_padding ""
 
-seta hud_panel_engineinfo 1
+seta hud_panel_engineinfo 0
 seta hud_panel_engineinfo_pos "0.887500 0.870000"
 seta hud_panel_engineinfo_size "0.112500 0.030000"
 seta hud_panel_engineinfo_bg "0"
index 453e09165fe5fe7ea0914d71750bf1fc3b53f20a..da262082e983979a4fe1b0b5aef9e480299f2c0f 100644 (file)
@@ -29,7 +29,8 @@
 "impulse 14"                            "porto / hook"
 ""                                      ""
 ""                                      "View"
-"+zoom"                                 "zoom"
+"+zoom"                                 "hold zoom"
+"togglezoom"                            "toggle zoom"
 "+showscores"                           "show scores"
 "screenshot"                            "screen shot"
 ""                                      ""
index 8634feaeb06a6d08e4b1f41af6620b28b69b221c..b325c9c2be28a5cdbafcee989336d78cd0c35900 100644 (file)
Binary files a/models/weapons/g_crylink.md3 and b/models/weapons/g_crylink.md3 differ
index ae76ba7655f5a6181abd5501932a9ad9a2932204..6e76885b395c1a69414531164f21190d313ba9be 100644 (file)
Binary files a/models/weapons/g_hlac.md3 and b/models/weapons/g_hlac.md3 differ
index b31e260343dab616ed8e45f21aea02bb7cd98eee..d1f168a61cfca337a173aaf03d38414cc3d26ce3 100644 (file)
Binary files a/models/weapons/g_laser.md3 and b/models/weapons/g_laser.md3 differ
index 60caa4125a6f9a8336ba364059861f443dab7b13..898c13233fd918de39091f1c315542bbf647a6c9 100644 (file)
Binary files a/models/weapons/g_minelayer.md3 and b/models/weapons/g_minelayer.md3 differ
index 5594558b852a17822540fb2a5b9c658fa38008e2..6ecb0aaba2d3a9b03d560c4e6bba5b183210d7b0 100644 (file)
Binary files a/models/weapons/g_nex.md3 and b/models/weapons/g_nex.md3 differ
index f0dce9dc42bd18fce9ab34d41555c2695956884f..78163a90326baf5d397d493c09d9c7ec7ccf07ca 100644 (file)
Binary files a/models/weapons/g_porto.md3 and b/models/weapons/g_porto.md3 differ
index af34658d79ee109cc6a2faf3d657316f0265206f..c3b9f3ca833a84a8818bf32df9b6a914fc8a843e 100644 (file)
Binary files a/models/weapons/v_crylink.md3 and b/models/weapons/v_crylink.md3 differ
index 3bbc34d567d126fcf47fca6b40a6b4b02de58251..887c2a796479e1f16ff04ccf1d8d224cfd9387c8 100644 (file)
Binary files a/models/weapons/v_hlac.md3 and b/models/weapons/v_hlac.md3 differ
index 4ca6a130e8d74900063cf18210f3352a0b35167f..8b96df03820f5273bab809efdc257ec167bef932 100644 (file)
Binary files a/models/weapons/v_hookgun.md3 and b/models/weapons/v_hookgun.md3 differ
index 836ad36b39e4cfcd945d4117d406c1a3f8751d5b..dc5e2674505c1f02c3652980c5e130f6ecce69c0 100644 (file)
Binary files a/models/weapons/v_laser.md3 and b/models/weapons/v_laser.md3 differ
index 648b0f1a74249033bb352d9aabfdbb0e936c7328..529f02fcf9ba9f40003854b8ad1551f4416e7944 100644 (file)
Binary files a/models/weapons/v_minelayer.md3 and b/models/weapons/v_minelayer.md3 differ
index 1d45edb7938b320f402ea328a47a8ce1586859e1..4cafdd10ffe3bd9acb4e910b119ba4a17e7418f8 100644 (file)
Binary files a/models/weapons/v_nex.md3 and b/models/weapons/v_nex.md3 differ
index 5d06b3c0667e1fba9319313b19059f211d7e7b25..b72113aa55a516ae87cdf66a9b2428f2791609b0 100644 (file)
Binary files a/models/weapons/v_porto.md3 and b/models/weapons/v_porto.md3 differ
diff --git a/particles/nexbeam.tga b/particles/nexbeam.tga
deleted file mode 100644 (file)
index cb8bd34..0000000
Binary files a/particles/nexbeam.tga and /dev/null differ
index 2d780381eedced49f15c67549f6455c535ae3a67..3d15295942e21b6cefc40c52386f5f7ea3e8d6f0 100644 (file)
@@ -156,7 +156,7 @@ float               scoreboard_showaccuracy;
 // float               coop;
 // float               deathmatch;
 
-// float               dmg_take;
+float          dmg_take;
 // float               dmg_save;
 // vector              dmg_origin;
 
@@ -258,7 +258,7 @@ float w_deathtype, w_issilent, w_random;
 string w_deathtypestring;
 vector w_org, w_backoff;
 
-float campingrifle_scope;
+float sniperrifle_scope;
 float nex_scope;
 
 float cr_maxbullets;
index 435dedabc770dbed309f663ad5945d99322b9b5e..048773a01f49bddfcf08a3901780ca3158ce046c 100644 (file)
@@ -65,14 +65,13 @@ void CSQC_Init(void)
 #endif
 
        float i;
-       CSQC_CheckEngine();
 
        binddb = db_create();
        tempdb = db_create();
        ClientProgsDB = db_load("client.db");
        compressShortVector_init();
 
-       drawfont = 0;
+       drawfont = FONT_USER+1;
        menu_visible = FALSE;
        menu_show = menu_show_error;
        menu_action = menu_sub_null;
@@ -1094,10 +1093,12 @@ void Ent_Init()
        g_balance_electro_secondary_bouncestop = ReadCoord();
 
        nex_scope = !ReadByte();
-       campingrifle_scope = !ReadByte();
+       sniperrifle_scope = !ReadByte();
 
        serverflags = ReadByte();
 
+       cr_maxbullets = ReadByte();
+
        if(!postinit)
                PostInit();
 }
@@ -1396,10 +1397,6 @@ float CSQC_Parse_TempEntity()
                        Net_WeaponComplain();
                        bHandled = true;
                        break;
-               case TE_CSQC_CR_MAXBULLETS:
-                       cr_maxbullets = ReadByte();
-                       bHandled = true;
-                       break;
                default:
                        // No special logic for this temporary entity; return 0 so the engine can handle it
                        bHandled = false;
index 908e6dbf17fbc63b9cff14daa7e4d7f49d0866da..704e58107f597a67ec33e3b201a816da196b09fc 100644 (file)
@@ -137,7 +137,7 @@ vector GetCurrentFov(float fov)
                        zoomspeed = 3.5;
 
        zoomdir = button_zoom;
-       if((getstati(STAT_ACTIVEWEAPON) == WEP_NEX && nex_scope) || (getstati(STAT_ACTIVEWEAPON) == WEP_CAMPINGRIFLE && campingrifle_scope)) // do NOT use switchweapon here
+       if((getstati(STAT_ACTIVEWEAPON) == WEP_NEX && nex_scope) || (getstati(STAT_ACTIVEWEAPON) == WEP_SNIPERRIFLE && sniperrifle_scope)) // do NOT use switchweapon here
                zoomdir += button_attack2;
        if(spectatee_status > 0 || isdemo())
        {
@@ -274,7 +274,7 @@ float TrueAimCheck()
                case WEP_MINSTANEX:
                        mv = MOVE_NORMAL;
                        break;
-               case WEP_CAMPINGRIFLE:
+               case WEP_SNIPERRIFLE:
                        ta = trueaim_rifle;
                        mv = MOVE_NORMAL;
                        if(zoomscript_caught)
@@ -572,7 +572,7 @@ void CSQC_UpdateView(float w, float h)
        // next R_RenderScene call
        drawstring('0 0 0', "", '1 1 0', '1 1 1', 0, 0);
 
-       if(autocvar_r_fakelight >= 2 || autocvar_r_fullbright >= 1)
+       if(autocvar_r_fakelight >= 2 || autocvar_r_fullbright)
        if not(serverflags & SERVERFLAG_ALLOW_FULLBRIGHT)
        {
                // apply night vision effect
@@ -628,11 +628,11 @@ void CSQC_UpdateView(float w, float h)
        // the view to go back to normal, so reticle_type would become 0 as we fade out)
        if(spectatee_status || getstati(STAT_HEALTH) <= 0)
                reticle_type = 0; // prevent reticle from showing during the respawn zoom effect or for spectators
-       else if(activeweapon == WEP_NEX && (button_zoom || zoomscript_caught) || activeweapon == WEP_CAMPINGRIFLE && (button_zoom || zoomscript_caught) || activeweapon == WEP_MINSTANEX && (button_zoom || zoomscript_caught))
+       else if(activeweapon == WEP_NEX && (button_zoom || zoomscript_caught) || activeweapon == WEP_SNIPERRIFLE && (button_zoom || zoomscript_caught) || activeweapon == WEP_MINSTANEX && (button_zoom || zoomscript_caught))
                reticle_type = 2; // nex zoom
        else if(button_zoom || zoomscript_caught)
                reticle_type = 1; // normal zoom
-       else if(activeweapon == WEP_NEX && button_attack2 || activeweapon == WEP_CAMPINGRIFLE && button_attack2)
+       else if(activeweapon == WEP_NEX && button_attack2 || activeweapon == WEP_SNIPERRIFLE && button_attack2)
                reticle_type = 2; // nex zoom
 
        if(autocvar_cl_reticle_stretch)
@@ -676,7 +676,7 @@ void CSQC_UpdateView(float w, float h)
                // fade out
                myhealth_flash = max(0, myhealth_flash - autocvar_hud_damage_fade_rate * frametime);
                // add new damage
-               myhealth_flash = bound(0, myhealth_flash + max(0, myhealth_prev - myhealth) * autocvar_hud_damage_factor, autocvar_hud_damage_maxalpha);
+               myhealth_flash = bound(0, myhealth_flash + dmg_take * autocvar_hud_damage_factor, autocvar_hud_damage_maxalpha);
 
                float pain_threshold, pain_threshold_lower, pain_threshold_lower_health;
                pain_threshold = autocvar_hud_damage_pain_threshold;
@@ -941,12 +941,12 @@ void CSQC_UpdateView(float w, float h)
                                nex_charge_movingavg = nex_charge;
 
                        // ring around crosshair representing bullets left in camping rifle clip
-                       if (activeweapon == WEP_CAMPINGRIFLE && cr_maxbullets)
+                       if (activeweapon == WEP_SNIPERRIFLE && cr_maxbullets)
                        {
                                bullets = getstati(STAT_BULLETS_LOADED);
                                f = bound(0, bullets / cr_maxbullets, 1);
 
-                               a = autocvar_crosshair_ring_campingrifle_alpha;
+                               a = autocvar_crosshair_ring_sniperrifle_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
index f3d18aa9ffc41df7e5d7a2c873c0b9b5b937ca7c..08ad7b9022d33fd90ce7b987254b1d5d7c01ad74 100644 (file)
@@ -105,7 +105,7 @@ float autocvar_crosshair_hittest_showimpact;
 float autocvar_crosshair_per_weapon;
 float autocvar_crosshair_pickup;
 float autocvar_crosshair_pickup_speed;
-float autocvar_crosshair_ring_campingrifle_alpha;
+float autocvar_crosshair_ring_sniperrifle_alpha;
 float autocvar_crosshair_ring_nex_currentcharge_movingavg_rate;
 float autocvar_crosshair_ring_nex_currentcharge_scale;
 float autocvar_crosshair_ring_nex_inner_alpha;
index 476eb607e48b6be0b28f05bba4a7aeef19d6e532..9592fe4b67b9c44882b1b7d306f15ec12926a3ef 100644 (file)
@@ -297,7 +297,6 @@ void HUD_DrawCenterPrint (void)
        {
                ts = centerprint_messages[i];
                drawfontscale = sz * '1 1 0';
-               drawfont = hud_bigfont;
                pos_x = (vid_conwidth - stringwidth(ts, TRUE, centerprint_fontsize)) * 0.5;
                if (ts != "")
                {
@@ -308,7 +307,6 @@ void HUD_DrawCenterPrint (void)
                        // half height for empty lines looks better
                        pos_y = pos_y + sz * centerprint_fontsize_y * 0.5;
                drawfontscale = '1 1 0';
-               drawfont = hud_font;
        }
 }
 
@@ -492,6 +490,8 @@ void HUD_Panel_ExportCfg(string cfgname)
                                        HUD_Write_PanelCvar_q("_ammo_color");
                                        HUD_Write_PanelCvar_q("_ammo_alpha");
                                        HUD_Write_PanelCvar_q("_aspect");
+                                       HUD_Write_PanelCvar_q("_timeout");
+                                       HUD_Write_PanelCvar_q("_timeout_effect");
                                        break;
                                case HUD_PANEL_AMMO:
                                        HUD_Write_PanelCvar_q("_onlycurrent");
@@ -1506,7 +1506,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_SNIPERRIFLE: return 1;
                case WEP_HAGAR: return 2;
                case WEP_ROCKET_LAUNCHER: return 2;
                case WEP_SEEKER: return 2;
@@ -1768,10 +1768,10 @@ void HUD_Weapons(void)
                                drawstring(wpnpos, getcommandkey(ftos(weapid), strcat("impulse ", ftos(weapid))), '1 1 0' * 0.5 * wpnsize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 
                        // draw ammo status bar
-                       if(show_ammo && weapid != WEP_TUBA && weapid != WEP_LASER && weapid != WEP_PORTO)
+                       if(show_ammo && self.weapon != WEP_TUBA && self.weapon != WEP_LASER && self.weapon != WEP_PORTO)
                        {
                                a = 0;
-                               type = GetAmmoTypeForWep(weapid);
+                               type = GetAmmoTypeForWep(self.weapon);
                                if(type != -1)
                                        a = getstati(GetAmmoStat(type)); // how much ammo do we have?
 
@@ -1982,7 +1982,6 @@ void HUD_Ammo(void)
                ammo_size_y = newSize;
        }
 
-       drawfont = hud_bigfont;
        float i, stat_items, currently_selected;
        if (autocvar_hud_panel_ammo_onlycurrent)
        {
@@ -2014,7 +2013,6 @@ void HUD_Ammo(void)
                        column = column + 1;
                }
        }
-       drawfont = hud_font;
 }
 
 void DrawNumIcon(float iconalign, vector myPos, vector mySize, float x, string icon, float left, vector color, float alpha)
@@ -2066,9 +2064,7 @@ void DrawNumIcon(float iconalign, vector myPos, vector mySize, float x, string i
                }
        }
 
-       drawfont = hud_bigfont;
        drawstring_aspect(numpos, ftos(x), eX * (2/3) * newSize_x + eY * newSize_y, color, panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
-       drawfont = hud_font;
        drawpic_aspect_skin(picpos, icon, '1 1 0' * newSize_y, '1 1 1', panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
 }
 
@@ -2151,7 +2147,6 @@ void HUD_Powerups(void) {
                rightexact = strength_time;
        }
 
-       drawfont = hud_bigfont;
        float baralign = autocvar_hud_panel_powerups_baralign;
     float barflip;
        float iconalign = autocvar_hud_panel_powerups_iconalign;
@@ -2323,7 +2318,6 @@ void HUD_Powerups(void) {
             }
                }
        }
-       drawfont = hud_font;
 }
 
 // Health/armor (#3)
@@ -2365,7 +2359,6 @@ void HUD_HealthArmor(void)
        vector picpos;
        vector numpos;
 
-       drawfont = hud_bigfont;
        float baralign = autocvar_hud_panel_healtharmor_baralign;
        float iconalign = autocvar_hud_panel_healtharmor_iconalign;
        float progressbar = autocvar_hud_panel_healtharmor_progressbar;
@@ -2628,7 +2621,6 @@ void HUD_HealthArmor(void)
                        }
                }
        }
-       drawfont = hud_font;
 }
 
 // Notification area (#4)
@@ -2726,7 +2718,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s
        } else if(msg == MSG_KILL) {
                w = DEATH_WEAPONOF(type);
                if(WEP_VALID(w)) {
-                       if((w == WEP_CAMPINGRIFLE || w == WEP_MINSTANEX) && type & HITTYPE_HEADSHOT) // all headshot weapons go here
+                       if((w == WEP_SNIPERRIFLE || w == WEP_MINSTANEX) && type & HITTYPE_HEADSHOT) // all headshot weapons go here
                                HUD_KillNotify_Push(s1, s2, 1, DEATH_HEADSHOT);
                        else
                                HUD_KillNotify_Push(s1, s2, 1, type);
@@ -3488,9 +3480,7 @@ void HUD_Timer(void)
                timer = seconds_tostring(timeleft);
        }
 
-       drawfont = hud_bigfont;
        drawstring_aspect(pos, timer, mySize, timer_color, panel_fg_alpha, DRAWFLAG_NORMAL);
-       drawfont = hud_font;
 }
 
 // Radar (#6)
@@ -3679,9 +3669,7 @@ void HUD_Score(void)
                // race record display
                if (distribution <= 0)
                        HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawfont = hud_bigfont;
                drawstring_aspect(pos, timer, eX * 0.75 * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawfont = hud_font;
        } else if (!teamplay) { // non-teamgames
                // me vector := [team/connected frags id]
                pl = players.sort_next;
@@ -3713,9 +3701,7 @@ void HUD_Score(void)
                drawstring_aspect(pos + eX * 0.75 * mySize_x, ftos(distribution), eX * 0.25 * mySize_x + eY * (1/3) * mySize_y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL);
                if (leader)
                        HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawfont = hud_bigfont;
                drawstring_aspect(pos, ftos(score), eX * 0.75 * mySize_x + eY * mySize_y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawfont = hud_font;
        } else { // teamgames
                float max_fragcount;
                max_fragcount = -99;
@@ -3737,9 +3723,7 @@ void HUD_Score(void)
                                        leader = 1;
                                if (leader)
                                        HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-                               drawfont = hud_bigfont;
                                drawstring_aspect(pos, ftos(score), eX * 0.75 * mySize_x + eY * mySize_y, GetTeamRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
-                               drawfont = hud_font;
                        } else {
                                if (max_fragcount == score)
                                        leader = 1;
@@ -3789,7 +3773,6 @@ void HUD_RaceTimer (void) {
        }
        mySize = newSize;
 
-       drawfont = hud_bigfont;
        float a, t;
        string s, forcetime;
 
@@ -3889,8 +3872,6 @@ void HUD_RaceTimer (void) {
                        }
                }
        }
-
-       drawfont = hud_font;
 }
 
 // Vote window (#9)
@@ -4054,7 +4035,6 @@ void HUD_Mod_CA(vector pos, vector mySize)
        redalive = getstati(STAT_REDALIVE);
        bluealive = getstati(STAT_BLUEALIVE);
 
-       drawfont = hud_bigfont;
        vector redpos, bluepos;
        if(mySize_x > mySize_y)
        {
@@ -4074,7 +4054,6 @@ void HUD_Mod_CA(vector pos, vector mySize)
                drawpic_aspect_skin(bluepos, "player_blue.tga", eX * mySize_x + eY * 0.3 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                drawstring_aspect(bluepos + eY * 0.3 * mySize_y, ftos(bluealive), eX * mySize_x + eY * 0.2 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
        }
-       drawfont = hud_font;
 }
 
 // CTF HUD modicon section
@@ -4472,8 +4451,6 @@ void HUD_Mod_Race(vector pos, vector mySize)
        if not((scores_flags[ps_primary] & SFL_TIME) && !teamplay) // race/cts record display on HUD
                return; // no records in the actual race
 
-       drawfont = hud_bigfont;
-
        // clientside personal record
        string rr;
        if(gametype == GAME_CTS)
@@ -4596,7 +4573,6 @@ void HUD_Mod_Race(vector pos, vector mySize)
                        strunzone(race_status_name_prev);
                race_status_name_prev = string_null;
        }
-       drawfont = hud_font;
 }
 
 float mod_prev; // previous state of mod_active to check for a change
@@ -4833,9 +4809,7 @@ void HUD_EngineInfo(void)
 
        vector color;
        color = HUD_Get_Num_Color (prevfps, 100);
-       drawfont = hud_bigfont;
        drawstring_aspect(pos, strcat("FPS: ", ftos_decimals(prevfps, autocvar_hud_panel_engineinfo_framecounter_decimals)), mySize, color, panel_fg_alpha, DRAWFLAG_NORMAL);
-       drawfont = hud_font;
 }
 
 // Info messages panel (#14)
@@ -5070,15 +5044,12 @@ void HUD_ShowSpeed(void)
        numsize_x = numsize_y = autocvar_cl_showspeed_size;
        pos = (vid_conheight - numsize_y) * autocvar_cl_showspeed_position;
 
-       drawfont = hud_bigfont;
        drawstringcenter(eX + pos * eY, speed, numsize, '1 1 1', autocvar_hud_panel_fg_alpha * hud_fade_alpha, DRAWFLAG_NORMAL);
 
        if (autocvar_cl_showspeed_z == 1) {
                zspeed = strcat(ftos(fabs(floor( pmove_vel_z * conversion_factor + 0.5 ))), unit);
                drawstringcenter(eX + pos * eY + numsize_y * eY, zspeed, numsize * 0.5, '1 1 1', autocvar_hud_panel_fg_alpha * hud_fade_alpha, DRAWFLAG_NORMAL);
        }
-
-       drawfont = hud_font;
 }
 
 vector acc_prevspeed;
@@ -5214,6 +5185,8 @@ void HUD_Main (void)
                }
        }
 
+    current_player = (spectatee_status > 0) ? spectatee_status : player_localentnum;
+
        // draw the dock
        if(autocvar_hud_dock != "" && autocvar_hud_dock != "0")
        {
@@ -5221,7 +5194,7 @@ void HUD_Main (void)
                vector color;
                float hud_dock_color_team = autocvar_hud_dock_color_team;
                if((teamplay) && hud_dock_color_team) {
-                       f = stof(getplayerkey(player_localentnum - 1, "colors"));
+                       f = stof(getplayerkey(current_player - 1, "colors"));
                        color = colormapPaletteColor(mod(f, 16), 1) * hud_dock_color_team;
                }
                else if(autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && hud_dock_color_team) {
@@ -5231,11 +5204,11 @@ void HUD_Main (void)
                {
                        string hud_dock_color = autocvar_hud_dock_color;
                        if(hud_dock_color == "shirt") {
-                               f = stof(getplayerkey(player_localentnum - 1, "colors"));
+                               f = stof(getplayerkey(current_player - 1, "colors"));
                                color = colormapPaletteColor(floor(f / 16), 0);
                        }
                        else if(hud_dock_color == "pants") {
-                               f = stof(getplayerkey(player_localentnum - 1, "colors"));
+                               f = stof(getplayerkey(current_player - 1, "colors"));
                                color = colormapPaletteColor(mod(f, 16), 1);
                        }
                        else
index bbb57d91ff01686dbe7aabcbeb448f0a745d9111..21e3746b560811ee3d89c7b422b8c28f5f55a1bc 100644 (file)
@@ -80,6 +80,8 @@ var string panel_bg_border_str;
 var float panel_bg_padding;
 var string panel_bg_padding_str;
 
+float current_player;
+
 // Because calling lots of functions in QC apparently cuts fps in half on many machines:
 // ----------------------
 // MACRO HELL STARTS HERE
@@ -125,7 +127,7 @@ if(!autocvar__hud_configure && panel_bg_str == "0") {\
 // Get value for panel_bg_color: if "" fetch default, else use panel_bg_color. Convert pants, shirt or teamcolor into a vector.
 #define HUD_Panel_GetColor()\
 if((teamplay) && panel_bg_color_team) {\
-       panel_bg_color = colormapPaletteColor(mod(stof(getplayerkey(player_localentnum - 1, "colors")), 16), 1) * panel_bg_color_team;\
+       panel_bg_color = colormapPaletteColor(mod(stof(getplayerkey(current_player - 1, "colors")), 16), 1) * panel_bg_color_team;\
 } else if (autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && panel_bg_color_team) {\
        panel_bg_color = '1 0 0' * panel_bg_color_team;\
 } else {\
@@ -133,9 +135,9 @@ if((teamplay) && panel_bg_color_team) {\
                panel_bg_color = autocvar_hud_panel_bg_color;\
        } else {\
                if(panel_bg_color_str == "shirt") {\
-                       panel_bg_color = colormapPaletteColor(floor(stof(getplayerkey(player_localentnum - 1, "colors")) / 16), 0);\
+                       panel_bg_color = colormapPaletteColor(floor(stof(getplayerkey(current_player - 1, "colors")) / 16), 0);\
                } else if(panel_bg_color_str == "pants") {\
-                       panel_bg_color = colormapPaletteColor(mod(stof(getplayerkey(player_localentnum - 1, "colors")), 16), 1);\
+                       panel_bg_color = colormapPaletteColor(mod(stof(getplayerkey(current_player - 1, "colors")), 16), 1);\
                } else {\
                        panel_bg_color = stov(panel_bg_color_str);\
                }\
index 625a4ba7be05f5be814f088858d5a64f2233d163..3219d338f9035f560daa1555d84ff2b946284f8f 100644 (file)
@@ -80,9 +80,6 @@ float hud_size[MAX_HUD_FIELDS + 1];
 string hud_title[MAX_HUD_FIELDS + 1];
 float hud_num_fields;
 
-float hud_font;
-float hud_bigfont;
-
 string scores_label[MAX_SCORE];
 float scores_flags[MAX_SCORE];
 string teamscores_label[MAX_SCORE];
index 8ff4817b0ff113c49b05d36262c4ea273742313c..4d96d5821ca3e6796aa244bad0a5d39697674701 100644 (file)
@@ -58,7 +58,6 @@ void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, strin
        img_size_y = isize;
        img_size_x = isize / 0.75; // 4:3 x can be stretched easily, height is defined in isize
 
-       drawfont = hud_font;
        pos_y = pos_y + img_size_y;
        
        label = MapVote_FormatMapItem(id, map, count, tsize, hud_fontsize);
@@ -99,7 +98,6 @@ void MapVote_DrawAbstain(vector pos, float isize, float tsize, float count, floa
        
        rgb = MapVote_RGB(id);
 
-       drawfont = hud_font;
        pos_y = pos_y + hud_fontsize_y;
        
        label = MapVote_FormatMapItem(id, "Don't care", count, tsize, hud_fontsize);
@@ -178,7 +176,6 @@ void MapVote_Draw()
        if(i >= 0 || ymax < (vid_conheight*0.5))
                ymax = vid_conheight - ymin;
 
-       drawfont = hud_bigfont;
        hud_fontsize = HUD_GetFontsize("hud_fontsize");
 
        pos_y = ymin;
@@ -196,8 +193,6 @@ void MapVote_Draw()
        pos_y += 22;
        pos_x = xmin;
 
-       drawfont = hud_font;
-       
        // base for multi-column stuff...
        ymin = pos_y;
        if(mv_abstain)
index 57e25810f7664de12d5e8ccf62d4e4f66494a1b8..90098a79a372d0bbdf9ca9472fec624e3fc6bf1a 100644 (file)
@@ -306,12 +306,6 @@ entity GetTeam(float Team, float add)
        return tm;
 }
 
-void CSQC_CheckEngine()
-{
-       hud_font = FONT_USER+1;
-       hud_bigfont = FONT_USER+2;
-}
-
 vector HUD_GetFontsize(string cvarname)
 {
        vector v;
index a2cef76454919d6afdc77dd7620de3bde273c7bd..cede03c5a082c3e756cb9378b09885212d843781 100644 (file)
@@ -274,7 +274,7 @@ void Ent_Projectile()
                        case PROJECTILE_ELECTRO: setmodel(self, "models/ebomb.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
                        case PROJECTILE_ROCKET: setmodel(self, "models/rocket.md3");self.traileffect = particleeffectnum("TR_ROCKET"); self.scale = 2; break;
                        case PROJECTILE_BULLET: setmodel(self, "models/tracer.mdl");self.traileffect = particleeffectnum("tr_bullet"); break;
-                       case PROJECTILE_BULLET_GLOWING: setmodel(self, "models/tracer.mdl");self.traileffect = particleeffectnum("tr_bullet"); break;
+                       case PROJECTILE_BULLET_GLOWING: setmodel(self, "models/tracer.mdl");self.traileffect = particleeffectnum("tr_rifle_weak"); break;
                        case PROJECTILE_BULLET_GLOWING_TRACER: setmodel(self, "models/tracer.mdl");self.traileffect = particleeffectnum("tr_rifle"); break;
                        case PROJECTILE_CRYLINK: setmodel(self, "models/plasmatrail.mdl");self.traileffect = particleeffectnum("TR_CRYLINKPLASMA"); break;
                        case PROJECTILE_CRYLINK_BOUNCING: setmodel(self, "models/plasmatrail.mdl");self.traileffect = particleeffectnum("TR_CRYLINKPLASMA"); break;
index 31cdc45bfa04b4bcffe5697e0bbf47d4fcc4ccec..ebdd92361f6a90a33ef8732a69558bba7df82198 100644 (file)
@@ -248,12 +248,12 @@ string HUD_DefaultColumnLayout()
 {
        return strcat( // fteqcc sucks
                "ping pl name | ",
-               "-teams,race,lms/kills -teams,lms/deaths -teams,lms,race,ka/suicides -race,dm,tdm,ka/frags ", // tdm already has this in "score"
+               "-teams,race,lms/kills +freezetag/kills -teams,lms/deaths +freezetag/deaths -teams,lms,race,ka/suicides +freezetag/suicides -race,dm,tdm,ka,freezetag/frags ", // tdm already has this in "score"
                "+ctf/caps +ctf/pickups +ctf/fckills +ctf/returns ",
                "+lms/lives +lms/rank ",
                "+kh/caps +kh/pushes +kh/destroyed ",
                "?+race/laps ?+race/time ?+race/fastest ",
-               "+as/objectives +nexball/faults +nexball/goals +ka/drops +ka/pickups +ka/bckills ",
+               "+as/objectives +nexball/faults +nexball/goals +ka/drops +ka/pickups +ka/bckills +freezetag/revivals ",
                "-lms,race,nexball/score");
 }
 
@@ -296,7 +296,6 @@ void Cmd_HUD_SetFields(float argc)
 
        hud_num_fields = 0;
 
-       drawfont = hud_font;
        hud_fontsize = HUD_GetFontsize("hud_fontsize"); 
 
        for(i = 0; i < argc - 1; ++i)
@@ -933,7 +932,6 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
                drawfill(pos + '0 1 0' * weapon_height + '0 1 0' * height * i, '1 0 0' * sbwidth + '0 1 0' * fontsize, '1 1 1', scoreboard_highlight_alpha, DRAWFLAG_NORMAL);
        }
 
-       drawfont = hud_bigfont;
        average_accuracy = 0;
        float weapons_with_stats;
        weapons_with_stats = 0;
@@ -1002,7 +1000,6 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
                        pos_y += height;
                }
        }
-       drawfont = hud_font;
 
        if(weapons_with_stats)
                average_accuracy = floor(average_accuracy / weapons_with_stats);
@@ -1126,7 +1123,6 @@ void HUD_DrawScoreboard()
        pos_z = 0;
 
        // Heading
-       drawfont = hud_bigfont;
        drawstring(pos, "Scoreboard", '24 24 0', '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
        
        centerprint_start_x = vid_conwidth - 0.5 * (pos_x + stringwidth("Scoreboard", FALSE, '24 24 0'));
@@ -1134,8 +1130,6 @@ void HUD_DrawScoreboard()
 
        pos_y += 24;
 
-       drawfont = hud_font;
-
        // Draw the scoreboard
        vector bg_size = drawgetimagesize("gfx/scoreboard/scoreboard_bg") * autocvar_scoreboard_bg_scale;
 
index 2cd50789f14157b307380372329a1157a5e29c4d..1a35579839537d024d714813abd2e0b70cb1ac2d 100644 (file)
@@ -425,7 +425,7 @@ void WaypointSprite_Load()
        waypointsprite_distancefadealpha = autocvar_g_waypointsprite_distancefadealpha;
        waypointsprite_distancefadescale = autocvar_g_waypointsprite_distancefadescale;
        waypointsprite_distancefadedistance = waypointsprite_fadedistance * autocvar_g_waypointsprite_distancefadedistancemultiplier;
-       waypointsprite_alpha = autocvar_g_waypointsprite_alpha;
+       waypointsprite_alpha = autocvar_g_waypointsprite_alpha * (1 - autocvar__menu_alpha);
 
        if(!waypointsprite_initialized)
        {
index 50abe9875e0899dae8da1a549b0639511ee6aa83..90376b5b96bf9691c69ed98057e403282e7cec3c 100644 (file)
@@ -61,7 +61,6 @@ const float TE_CSQC_ANNOUNCE = 110;
 const float TE_CSQC_TARGET_MUSIC = 111;
 const float TE_CSQC_NOTIFY = 112;
 const float TE_CSQC_WEAPONCOMPLAIN = 113;
-const float TE_CSQC_CAMPINGRIFLE_SCOPE = 115;
 const float TE_CSQC_NEX_SCOPE = 116;
 const float TE_CSQC_CR_MAXBULLETS = 117;
 
index 83ea8e3e5827fedbc29f9f7534aec14f8865ca80..1bfbca6ae107cf27eab18fe437035669cc140e02 100644 (file)
@@ -1837,7 +1837,13 @@ float get_model_parameters(string m, float sk)
        fn = get_model_datafilename(m, sk, "txt");
        fh = fopen(fn, FILE_READ);
        if(fh < 0)
-               return 0;
+       {
+               sk = 0;
+               fn = get_model_datafilename(m, sk, "txt");
+               fh = fopen(fn, FILE_READ);
+               if(fh < 0)
+                       return 0;
+       }
 
        get_model_parameters_modelname = m;
        get_model_parameters_modelskin = sk;
index 104c8840e58cda121daecb6afd36c6b68f2083cf..439a1b5c96b4428ac82623384dc208d73ea9bf54 100644 (file)
@@ -75,6 +75,7 @@ void GameCommand(string theCommand)
        if(argv(0) == "sync")
        {
                loadAllCvars(main);
+               updateCompression();
                return;
        }
 
index 3eeaff284db99458439ea17e9cc052016e835919..b0752664f2023258a2951bb0bf96b1399b79e755 100644 (file)
@@ -18,7 +18,7 @@ void XonoticHUDNotificationDialog_fill(entity me)
        float i;
 
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_healtharmor", "Enable panel"));
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_notify", "Enable panel"));
        me.TR(me);
                me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
                        me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
index a49e3529c0cbcc099a78094f1e68e690fc01ce86..87f82a43d16bc5d392148a4ec8688c3cd128dd4e 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, 13)
+       ATTRIB(XonoticAdvancedDialog, rows, float, 14)
        ATTRIB(XonoticAdvancedDialog, columns, float, 3)
        ATTRIB(XonoticAdvancedDialog, refilterEntity, entity, NULL)
 ENDCLASS(XonoticAdvancedDialog)
@@ -22,37 +22,40 @@ void XonoticAdvancedDialog_fill(entity me)
 {
        entity e;
        me.TR(me);
-               me.TD(me, 1, 1.2, makeXonoticTextLabel(0, "Game settings:"));
+               me.TD(me, 1, 3, makeXonoticTextLabel(0, "Game settings:"));
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.2, e = makeXonoticCheckBox(0, "sv_spectate", "Allow spectating"));
+               me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "sv_spectate", "Allow spectating"));
        me.TR(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.TD(me, 1, 1.6, e = makeXonoticSlider(0, 15, 0.5, "g_spawnshieldtime"));
        me.TR(me);
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Game speed:"));
-               me.TD(me, 1, 1.7, e = makeXonoticSlider(0.5, 2.0, 0.1, "slowmo"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.2, e = makeXonoticCheckBoxEx(2, 0, "g_antilag", "AntiLag"));
+               me.TD(me, 1, 1.6, e = makeXonoticSlider(0.5, 2.0, 0.1, "slowmo"));
        me.TR(me);
        me.TR(me);
-               me.TD(me, 1, 1.2, makeXonoticTextLabel(0, "Teamplay settings:"));
+               me.TD(me, 1, 3, makeXonoticTextLabel(0, "Teamplay settings:"));
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Friendly fire scale:"));
-               me.TD(me, 1, 1.7, e = makeXonoticSlider(0, 1.0, 0.05, "g_friendlyfire"));
+               me.TD(me, 1, 1.6, e = makeXonoticSlider(0, 1.0, 0.05, "g_friendlyfire"));
+       me.TR(me);
+               me.TDempty(me, 0.4);
+               me.TD(me, 1, 2.6, e = makeXonoticCheckBox(0, "g_friendlyfire_virtual", "Virtual friendly fire (effect only)"));
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Friendly fire penalty:"));
-               me.TD(me, 1, 1.7, e = makeXonoticSlider(0, 1.0, 0.05, "g_mirrordamage"));
+               me.TD(me, 1, 1.6, e = makeXonoticSlider(0, 1.0, 0.05, "g_mirrordamage"));
+       me.TR(me);
+               me.TDempty(me, 0.4);
+               me.TD(me, 1, 2.6, e = makeXonoticCheckBox(0, "g_mirrordamage_virtual", "Virtual penalty (effect only)"));
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Teams:"));
-               me.TD(me, 1, 1.7, e = makeXonoticTextSlider("g_tdm_teams_override g_domination_teams_override g_keyhunt_teams_override"));
+               me.TD(me, 1, 1.6, e = makeXonoticTextSlider("g_tdm_teams_override g_domination_teams_override g_keyhunt_teams_override"));
                        e.addValue(e, "Default", "0");
                        e.addValue(e, "2 teams", "2");
                        e.addValue(e, "3 teams", "3");
index 984ae9b2655538c6f3be917f3560dec175143047..4390fb910e70bf582f987145fc5cb57bd0c38a67 100644 (file)
@@ -263,7 +263,7 @@ void XonoticMutatorsDialog_fill(entity me)
                me.TDempty(me, 0.2);
                me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_start_weapon_laser", "0", "No start weapons"));
                        e.cvarOffValue = "-1";
-                       makeMulti(e, "g_start_weapon_shotgun g_start_weapon_uzi g_start_weapon_grenadelauncher g_start_weapon_minelayer g_start_weapon_electro g_start_weapon_crylink g_start_weapon_nex g_start_weapon_hagar g_start_weapon_rocketlauncher g_start_weapon_campingrifle g_start_weapon_hlac g_start_weapon_seeker g_start_weapon_minstanex g_start_weapon_hook g_start_weapon_porto g_start_weapon_tuba");
+                       makeMulti(e, "g_start_weapon_shotgun g_start_weapon_uzi g_start_weapon_grenadelauncher g_start_weapon_minelayer g_start_weapon_electro g_start_weapon_crylink g_start_weapon_nex g_start_weapon_hagar g_start_weapon_rocketlauncher g_start_weapon_sniperrifle g_start_weapon_hlac g_start_weapon_seeker g_start_weapon_minstanex g_start_weapon_hook g_start_weapon_porto g_start_weapon_tuba g_start_weapon_minelayer");
 
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
index 586896171e76df85676739208b209b6a113524b3..9365544e9694bc4fe6c0c5730b27f6289f36dad6 100644 (file)
@@ -46,7 +46,7 @@ void XonoticPlayerSettingsTab_fill(entity me)
        me.TR(me);
                me.TD(me, 1, 3.0, box = makeXonoticInputBox(1, "_cl_name"));
                        box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved
-                       box.maxLength = -63; // negativ means encoded length in bytes
+                       box.maxLength = -127; // negative means encoded length in bytes
                        label.textEntity = box;
        me.TR(me);
                me.TD(me, 5, 1, e = makeXonoticColorpicker(box));
@@ -141,7 +141,7 @@ void XonoticPlayerSettingsTab_fill(entity me)
                me.TDempty(me, 0.3);
                me.TD(me, 1, 0.7, e = makeXonoticCheckBox(0, "crosshair_color_per_weapon", "Per weapon"));
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_dot", "Enable centered dot"));
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_dot", "Enable center dot"));
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, "Size:"));
index 19b232f8ca504f2abffc9e454be90f6b72292e0f..cd108f0be99679bac91121dcb170f5f430f127fd 100644 (file)
@@ -30,34 +30,6 @@ float someShadowCvarIsEnabled(entity box)
        return FALSE;
 }
 
-float updateCompression()
-{
-       float fh;
-       float have_dds, have_jpg, have_tga;
-       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)))
-               fclose(fh);
-       if((have_tga = ((fh = fopen("particles/particlefont.tga", FILE_READ)) >= 0)))
-               fclose(fh);
-       if(have_dds && (have_jpg || have_tga))
-       {
-               cvar_set("gl_texturecompression", "0");
-               return 1;
-       }
-       else if(have_dds)
-       {
-               cvar_set("gl_texturecompression", "0");
-               cvar_set("r_texture_dds_load", "1");
-               return 0;
-       }
-       else
-       {
-               cvar_set("gl_texturecompression", cvar_string("r_texture_dds_load"));
-               return 2;
-       }
-}
-
 void XonoticEffectsSettingsTab_fill(entity me)
 {
        entity e, s;
index 3117c65e4800af30675dc597c3a97863d73b1d4e..87273b24c653eb5c7c89e2635bce336341f544d9 100644 (file)
@@ -137,6 +137,7 @@ void XonoticKeyBinder_keyGrabbed(entity me, float key, float ascii)
                }
        }
        localcmd("\nbind \"", keynumtostring(key), "\" \"", func, "\"\n");
+       localcmd("-zoom\n"); // to make sure we aren't in togglezoom'd state
 }
 void XonoticKeyBinder_editUserbind(entity me, string theName, string theCommandPress, string theCommandRelease)
 {
@@ -197,7 +198,7 @@ void KeyBinder_Bind_Clear(entity btn, entity me)
                        //localcmd("\nunbind \"", keynumtostring(k), "\"\n");
                        localcmd("\nbind \"", keynumtostring(k), "\" \"", KEY_NOT_BOUND_CMD, "\"\n");
        }
-
+       localcmd("-zoom\n"); // to make sure we aren't in togglezoom'd state
 }
 void XonoticKeyBinder_clickListBoxItem(entity me, float i, vector where)
 {
index e906242fe44fc90c3cdcc80bad6afa213e8c9317..ddedc4bab2901e2cd077a60c475aef525f223e80 100644 (file)
@@ -3,6 +3,7 @@ CLASS(XonoticPicmipSlider) EXTENDS(XonoticTextSlider)
        METHOD(XonoticPicmipSlider, configureXonoticPicmipSlider, void(entity))
        METHOD(XonoticPicmipSlider, draw, void(entity))
        METHOD(XonoticPicmipSlider, autofix, void(entity))
+       ATTRIB(XonoticPicmipSlider, have_s3tc, float, 0)
 ENDCLASS(XonoticPicmipSlider)
 entity makeXonoticPicmipSlider(); // note: you still need to call addValue and configureXonoticTextSliderValues!
 #endif
@@ -19,23 +20,26 @@ void XonoticPicmipSlider_configureXonoticPicmipSlider(entity me)
 {
        me.configureXonoticTextSlider(me, "gl_picmip");
        me.autofix(me);
+       me.have_s3tc = GL_Have_TextureCompression();
 }
-float texmemsize()
+float texmemsize(float s3tc)
 {
        return
        (
-                 2500 * pow(0.5, max(0, cvar("gl_picmip") + cvar("gl_picmip_other")))
-               + 1500 * pow(0.5, max(0, cvar("gl_picmip") + cvar("gl_picmip_world")))
-       ) * ((cvar("r_texture_dds_load") || cvar("gl_texturecompression")) ? 0.4 : 1.0); // TC: normalmaps 50%, other 25%, few incompressible, guessing 40% as conservative average
+                 2500 * pow(0.25, max(0, cvar("gl_picmip") + cvar("gl_picmip_other")))
+               + 1500 * pow(0.25, max(0, cvar("gl_picmip") + cvar("gl_picmip_world")))
+       ) * ((s3tc && (cvar("r_texture_dds_load") || cvar("gl_texturecompression"))) ? 0.2 : 1.0); // TC: normalmaps 50%, other 25%, few incompressible, guessing 40% as conservative average
 }
 void XonoticPicmipSlider_autofix(entity me)
 {
        float max_hard, max_soft;
+       if(cvar("menu_picmip_bypass"))
+               return;
        max_hard = cvar("sys_memsize_virtual");
        max_soft = cvar("sys_memsize_physical");
        if(max_hard > 0)
        {
-               while(me.value > 0 && texmemsize() > max_hard)
+               while(me.value > 0 && texmemsize(me.have_s3tc) > max_hard)
                        me.setValue(me, me.value - 1);
        }
        // TODO also check the soft limit!
index 1cb4cf50db979f0d7db77ef9c203a348f97bfa46..f6ffa387c996624bb06acef3ea585a580423b803 100644 (file)
@@ -1,3 +1,13 @@
+float GL_CheckExtension(string ext)
+{
+       return (strstrofs(strcat(" ", cvar_string("gl_info_extensions"), " "), strcat(" ", ext, " "), 0) >= 0);
+}
+
+float GL_Have_TextureCompression()
+{
+       return (GL_CheckExtension("GL_EXT_texture_compression_s3tc") && GL_CheckExtension("GL_ARB_texture_compression"));
+}
+
 float tooltipdb;
 void loadTooltips()
 {
@@ -454,3 +464,57 @@ string HUD_Panel_GetSettingName(float theSetting)
                default: return "";
        }
 }
+
+float updateCompression()
+{
+       float fh;
+       float have_dds, have_jpg, have_tga;
+       float can_dds;
+       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)))
+               fclose(fh);
+       if((have_tga = ((fh = fopen("particles/particlefont.tga", FILE_READ)) >= 0)))
+               fclose(fh);
+       can_dds = GL_Have_TextureCompression();
+       if(have_dds && (have_jpg || have_tga))
+       {
+               // both? Let's only use good quality precompressed files
+               // but ONLY if we actually support it!
+               if(can_dds)
+               {
+                       cvar_set("gl_texturecompression", "0");
+                       return 1;
+               }
+               else
+               {
+                       cvar_set("gl_texturecompression", "0");
+                       cvar_set("r_texture_dds_load", "0");
+                       return 0;
+               }
+       }
+       else if(have_dds)
+       {
+               // DDS only? We probably always want texture compression
+               cvar_set("gl_texturecompression", "1");
+               cvar_set("r_texture_dds_load", "1");
+               if(!can_dds)
+                       print("^1ERROR: Texture compression is required but not supported.\n^1Expect visual problems.\n");
+               return 0;
+       }
+       else
+       {
+               // TGA only? Allow runtime compression
+               if(can_dds)
+               {
+                       cvar_set("gl_texturecompression", cvar_string("r_texture_dds_load"));
+                       return 2;
+               }
+               else
+               {
+                       cvar_set("gl_texturecompression", "0");
+                       cvar_set("r_texture_dds_load", "0");
+                       return 0;
+               }
+       }
+}
index ace912dc21394bbcde6a5a6e9398eb443eecbd7a..053c5073095f6c64a65f08166dbafd8ad2df46eb 100644 (file)
@@ -1,3 +1,6 @@
+float GL_CheckExtension(string ext);
+float GL_Have_TextureCompression();
+
 void forAllDescendants(entity root, void(entity, entity) funcPre, void(entity, entity) funcPost, entity pass);
 void saveAllCvars(entity root);
 void loadAllCvars(entity root);
index 1da6ad3ec6732043e3ad6abcd755b5d2993990e5..284e72be94602cbb1f5ea85585f015d24b6e6040 100644 (file)
@@ -1,3 +1,5 @@
+.float anticheat_jointime;
+
 void mean_accumulate(entity e, .float a, .float c, float mean, float value, float weight)
 {
        if(weight == 0)
@@ -67,14 +69,14 @@ void anticheat_physics()
        {
                if(time < self.anticheat_div0_evade_offset)
                        self.anticheat_div0_evade_v_angle = self.v_angle;
-               MEAN_ACCUMULATE(anticheat_div0_evade, 1 - (self.anticheat_div0_evade_forward_initial * v_forward), 1);
+               MEAN_ACCUMULATE(anticheat_div0_evade, 0.5 - 0.5 * (self.anticheat_div0_evade_forward_initial * v_forward), 1);
        }
 
-       MEAN_ACCUMULATE(anticheat_div0_strafebot_old, movement_oddity(self.movement, self.anticheat_div0_strafebot_movement_prev), max(0, sys_frametime - frametime));
+       MEAN_ACCUMULATE(anticheat_div0_strafebot_old, movement_oddity(self.movement, self.anticheat_div0_strafebot_movement_prev), 1);
        self.anticheat_div0_strafebot_movement_prev = self.movement;
 
        if(vlen(self.anticheat_div0_strafebot_forward_prev))
-               MEAN_ACCUMULATE(anticheat_div0_strafebot_new, 1 - (self.anticheat_div0_strafebot_forward_prev * v_forward), max(0, sys_frametime - frametime));
+               MEAN_ACCUMULATE(anticheat_div0_strafebot_new, 0.5 - 0.5 * (self.anticheat_div0_strafebot_forward_prev * v_forward), 1);
        self.anticheat_div0_strafebot_forward_prev = v_forward;
 
        // generic speedhack detection: correlate anticheat_speedhack_movetime (UPDATED BEFORE THIS) and server time
@@ -88,7 +90,7 @@ void anticheat_physics()
                self.anticheat_speedhack_offset = f;
        else
        {
-               MEAN_ACCUMULATE(anticheat_speedhack, fabs(f - self.anticheat_speedhack_offset), 1);
+               MEAN_ACCUMULATE(anticheat_speedhack, max(0, f - self.anticheat_speedhack_offset), 1);
                self.anticheat_speedhack_offset += (f - self.anticheat_speedhack_offset) * frametime * 0.1;
        }
 
@@ -151,14 +153,26 @@ void anticheat_prethink()
        self.anticheat_div0_evade_offset = 0;
 }
 
+string anticheat_display(float f, float mi, float ma)
+{
+       string s;
+       s = ftos(f);
+       if(f <= mi)
+               return strcat(s, ":N");
+       if(f >= ma)
+               return strcat(s, ":Y");
+       return strcat(s, ":-");
+}
+
 void anticheat_report()
 {
        if(!autocvar_sv_eventlog)
                return;
+       GameLogEcho(strcat(":anticheat:_time:", ftos(self.playerid), ":", ftos(servertime - self.anticheat_jointime)));
        GameLogEcho(strcat(":anticheat:speedhack:", ftos(self.playerid), ":", ftos(MEAN_EVALUATE(anticheat_speedhack))));
        GameLogEcho(strcat(":anticheat:div0_strafebot_old:", ftos(self.playerid), ":", ftos(MEAN_EVALUATE(anticheat_div0_strafebot_old))));
        GameLogEcho(strcat(":anticheat:div0_strafebot_new:", ftos(self.playerid), ":", ftos(MEAN_EVALUATE(anticheat_div0_strafebot_new))));
-       GameLogEcho(strcat(":anticheat:div0_evade:", ftos(self.playerid), ":", ftos(MEAN_EVALUATE(anticheat_div0_evade))));
+       GameLogEcho(strcat(":anticheat:div0_evade:", ftos(self.playerid), ":", anticheat_display(MEAN_EVALUATE(anticheat_div0_evade), 0.15, 0.3)));
 }
 
 void anticheat_serverframe()
@@ -169,6 +183,7 @@ void anticheat_serverframe()
 void anticheat_init()
 {
        self.anticheat_speedhack_offset = 0;
+       self.anticheat_jointime = servertime;
 }
 
 void anticheat_shutdown()
index 0d7da73572a3083af09aff6a296b55afbe4fabf2..05b2cc750232e5fbc65a5136decf6d524c864fee 100644 (file)
@@ -71,7 +71,11 @@ void assault_objective_decrease_use() {
        }
 
        if(other.assault_sprite)
+       {
                WaypointSprite_Disown(other.assault_sprite, waypointsprite_deadlifetime);
+               if(other.classname == "func_assault_destructible")
+                       other.sprite = world;
+       }
        else
                return; // already activated! cannot activate again!
 
@@ -148,7 +152,11 @@ void target_objective_decrease_activate()
        for(ent = world; (ent = find(ent, target, self.targetname)); )
        {
                if(ent.assault_sprite != world)
+               {
                        WaypointSprite_Disown(ent.assault_sprite, waypointsprite_deadlifetime);
+                       if(ent.classname == "func_assault_destructible")
+                               ent.sprite = world;
+               }
 
                spr = WaypointSprite_SpawnFixed("<placeholder>", 0.5 * (ent.absmin + ent.absmax), ent, assault_sprite);
                spr.assault_decreaser = self;
@@ -156,7 +164,12 @@ void target_objective_decrease_activate()
                spr.classname = "sprite_waypoint";
                WaypointSprite_UpdateRule(spr, assault_attacker_team, SPRITERULE_TEAMPLAY);
                if(ent.classname == "func_assault_destructible")
+               {
                        WaypointSprite_UpdateSprites(spr, "as-defend", "as-destroy", "as-destroy");
+                       WaypointSprite_UpdateMaxHealth(spr, ent.max_health);
+                       WaypointSprite_UpdateHealth(spr, ent.health);
+                       ent.sprite = spr;
+               }
                else
                        WaypointSprite_UpdateSprites(spr, "as-defend", "as-push", "as-push");
                WaypointSprite_UpdateTeamRadar(spr, RADARICON_OBJECTIVE, '1 0.5 0');
index c5beab269911b3a761d0bd7fa9785b870a12bc32..b00c1acc4c58c2e6fe53244048cc5d1468c27988 100644 (file)
@@ -82,37 +82,37 @@ float autocvar_g_balance_armor_rot;
 float autocvar_g_balance_armor_rotlinear;
 float autocvar_g_balance_armor_rotstable;
 float autocvar_g_balance_armor_start;
-float autocvar_g_balance_campingrifle_auto_reload_on_switch;
-float autocvar_g_balance_campingrifle_bursttime;
-float autocvar_g_balance_campingrifle_magazinecapacity;
-float autocvar_g_balance_campingrifle_primary_ammo;
-float autocvar_g_balance_campingrifle_primary_animtime;
-float autocvar_g_balance_campingrifle_primary_bulletconstant;
-float autocvar_g_balance_campingrifle_primary_bullethail;
-float autocvar_g_balance_campingrifle_primary_burstcost;
-float autocvar_g_balance_campingrifle_primary_damage;
-float autocvar_g_balance_campingrifle_primary_force;
-float autocvar_g_balance_campingrifle_primary_headshotaddeddamage;
-float autocvar_g_balance_campingrifle_primary_lifetime;
-float autocvar_g_balance_campingrifle_primary_refire;
-float autocvar_g_balance_campingrifle_primary_speed;
-float autocvar_g_balance_campingrifle_primary_spread;
-float autocvar_g_balance_campingrifle_primary_tracer;
-float autocvar_g_balance_campingrifle_reloadtime;
-float autocvar_g_balance_campingrifle_secondary;
-float autocvar_g_balance_campingrifle_secondary_ammo;
-float autocvar_g_balance_campingrifle_secondary_animtime;
-float autocvar_g_balance_campingrifle_secondary_bulletconstant;
-float autocvar_g_balance_campingrifle_secondary_bullethail;
-float autocvar_g_balance_campingrifle_secondary_burstcost;
-float autocvar_g_balance_campingrifle_secondary_damage;
-float autocvar_g_balance_campingrifle_secondary_force;
-float autocvar_g_balance_campingrifle_secondary_headshotaddeddamage;
-float autocvar_g_balance_campingrifle_secondary_lifetime;
-float autocvar_g_balance_campingrifle_secondary_refire;
-float autocvar_g_balance_campingrifle_secondary_speed;
-float autocvar_g_balance_campingrifle_secondary_spread;
-float autocvar_g_balance_campingrifle_secondary_tracer;
+float autocvar_g_balance_sniperrifle_auto_reload_on_switch;
+float autocvar_g_balance_sniperrifle_bursttime;
+float autocvar_g_balance_sniperrifle_magazinecapacity;
+float autocvar_g_balance_sniperrifle_primary_ammo;
+float autocvar_g_balance_sniperrifle_primary_animtime;
+float autocvar_g_balance_sniperrifle_primary_bulletconstant;
+float autocvar_g_balance_sniperrifle_primary_bullethail;
+float autocvar_g_balance_sniperrifle_primary_burstcost;
+float autocvar_g_balance_sniperrifle_primary_damage;
+float autocvar_g_balance_sniperrifle_primary_force;
+float autocvar_g_balance_sniperrifle_primary_headshotaddeddamage;
+float autocvar_g_balance_sniperrifle_primary_lifetime;
+float autocvar_g_balance_sniperrifle_primary_refire;
+float autocvar_g_balance_sniperrifle_primary_speed;
+float autocvar_g_balance_sniperrifle_primary_spread;
+float autocvar_g_balance_sniperrifle_primary_tracer;
+float autocvar_g_balance_sniperrifle_reloadtime;
+float autocvar_g_balance_sniperrifle_secondary;
+float autocvar_g_balance_sniperrifle_secondary_ammo;
+float autocvar_g_balance_sniperrifle_secondary_animtime;
+float autocvar_g_balance_sniperrifle_secondary_bulletconstant;
+float autocvar_g_balance_sniperrifle_secondary_bullethail;
+float autocvar_g_balance_sniperrifle_secondary_burstcost;
+float autocvar_g_balance_sniperrifle_secondary_damage;
+float autocvar_g_balance_sniperrifle_secondary_force;
+float autocvar_g_balance_sniperrifle_secondary_headshotaddeddamage;
+float autocvar_g_balance_sniperrifle_secondary_lifetime;
+float autocvar_g_balance_sniperrifle_secondary_refire;
+float autocvar_g_balance_sniperrifle_secondary_speed;
+float autocvar_g_balance_sniperrifle_secondary_spread;
+float autocvar_g_balance_sniperrifle_secondary_tracer;
 float autocvar_g_balance_cloaked_alpha;
 float autocvar_g_balance_crylink_primary_ammo;
 float autocvar_g_balance_crylink_primary_animtime;
@@ -121,6 +121,7 @@ float autocvar_g_balance_crylink_primary_bounces;
 float autocvar_g_balance_crylink_primary_damage;
 float autocvar_g_balance_crylink_primary_edgedamage;
 float autocvar_g_balance_crylink_primary_force;
+float autocvar_g_balance_crylink_primary_joindelay;
 float autocvar_g_balance_crylink_primary_joinexplode;
 float autocvar_g_balance_crylink_primary_joinexplode_damage;
 float autocvar_g_balance_crylink_primary_joinexplode_edgedamage;
@@ -146,6 +147,7 @@ float autocvar_g_balance_crylink_secondary_bounces;
 float autocvar_g_balance_crylink_secondary_damage;
 float autocvar_g_balance_crylink_secondary_edgedamage;
 float autocvar_g_balance_crylink_secondary_force;
+float autocvar_g_balance_crylink_secondary_joindelay;
 float autocvar_g_balance_crylink_secondary_joinexplode;
 float autocvar_g_balance_crylink_secondary_joinexplode_damage;
 float autocvar_g_balance_crylink_secondary_joinexplode_edgedamage;
@@ -719,9 +721,11 @@ float autocvar_g_freezetag_frozen_force;
 float autocvar_g_freezetag_point_leadlimit;
 float autocvar_g_freezetag_point_limit;
 float autocvar_g_freezetag_revive_extra_size;
-float autocvar_g_freezetag_revive_time;
+float autocvar_g_freezetag_revive_speed;
+float autocvar_g_freezetag_revive_clearspeed;
 float autocvar_g_freezetag_warmup;
 #define autocvar_g_friendlyfire cvar("g_friendlyfire")
+#define autocvar_g_friendlyfire_virtual cvar("g_friendlyfire_virtual")
 float autocvar_g_full_getstatus_responses;
 float autocvar_g_fullbrightitems;
 float autocvar_g_fullbrightplayers;
@@ -789,7 +793,9 @@ float autocvar_g_midair_shieldtime;
 float autocvar_g_minstagib_ammo_drop;
 float autocvar_g_minstagib_extralives;
 float autocvar_g_minstagib_speed_highspeed;
+float autocvar_g_mirrordamage;
 #define autocvar_g_mirrordamage cvar("g_mirrordamage")
+#define autocvar_g_mirrordamage_virtual cvar("g_mirrordamage_virtual")
 float autocvar_g_monster_zombie_attack_run_damage;
 float autocvar_g_monster_zombie_attack_run_delay;
 float autocvar_g_monster_zombie_attack_run_force;
@@ -1177,3 +1183,4 @@ float autocvar_timelimit_suddendeath;
 #define autocvar_utf8_enable cvar("utf8_enable")
 float autocvar_waypoint_benchmark;
 float autocvar_welcome_message_time;
+float autocvar_sv_gameplayfix_gravityunaffectedbyticrate;
index 1911daf9e6a3ad2f5504995fac11f68b3256f5f1..9ef109e2b585e3c76053c7b183fbc49da22543ff 100644 (file)
@@ -353,18 +353,19 @@ float bot_aim(float shotspeed, float shotspeedupward, float maxshottime, float a
        {
                f = bot_aimdir(v - shotorg, r);
                //dprint("AIM: ");dprint(vtos(self.bot_aimtargorigin));dprint(" + ");dprint(vtos(self.bot_aimtargvelocity));dprint(" * ");dprint(ftos(self.bot_aimlatency + vlen(self.bot_aimtargorigin - shotorg) / shotspeed));dprint(" = ");dprint(vtos(v));dprint(" : aimdir = ");dprint(vtos(normalize(v - shotorg)));dprint(" : ");dprint(vtos(shotdir));dprint("\n");
-               traceline(shotorg, shotorg + shotdir * 10000, FALSE, self);
-               if (trace_ent.takedamage)
-               if (trace_fraction < 1)
-               if (!bot_shouldattack(trace_ent))
-                       return FALSE;
+               //traceline(shotorg, shotorg + shotdir * 10000, FALSE, self);
+               //if (trace_ent.takedamage)
+               //if (trace_fraction < 1)
+               //if (!bot_shouldattack(trace_ent))
+               //      return FALSE;
                traceline(shotorg, self.bot_aimtargorigin, FALSE, self);
                if (trace_fraction < 1)
                if (trace_ent != self.enemy)
                if (!bot_shouldattack(trace_ent))
                        return FALSE;
        }
-       if (r > maxshottime * shotspeed)
-               return FALSE;
-       return f;
+
+       //if (r > maxshottime * shotspeed)
+       //      return FALSE;
+       return TRUE;
 };
index c1785a8d2754fc25c57fd527d38db2ecb79867ed..b7ee13b3721414edadc473d23dd3090b943ad7a3 100644 (file)
@@ -21,7 +21,8 @@ void havocbot_ai()
                }
                else
                {
-                       self.havocbot_role();
+                       if not(self.jumppadcount)
+                               self.havocbot_role();
                }
 
                // TODO: tracewalk() should take care of this job (better path finding under water)
@@ -231,12 +232,14 @@ void havocbot_bunnyhop(vector dir)
                return;
 
        // Don't jump when using some weapons
+       /*
        if(self.aistatus & AI_STATUS_ATTACKING)
-       if(self.weapon & WEP_CAMPINGRIFLE)
+       if(self.weapon == WEP_SNIPERRIFLE)
                return;
 
        if(self.goalcurrent.classname == "player")
                return;
+       */
 
        maxspeed = autocvar_sv_maxspeed;
 
@@ -337,6 +340,7 @@ void havocbot_bunnyhop(vector dir)
        }
 
        // Release jump button
+       if(!cvar("sv_pogostick"))
        if(self.flags & FL_ONGROUND == 0)
        {
                if(self.velocity_z < 0 || vlen(self.velocity)<maxspeed)
@@ -452,14 +456,7 @@ void havocbot_movetogoal()
        // Handling of jump pads
        if(self.jumppadcount)
        {
-               if(self.flags & FL_ONGROUND)
-               {
-                       self.jumppadcount = FALSE;
-                       if(self.aistatus & AI_STATUS_OUT_JUMPPAD)
-                               self.aistatus &~= AI_STATUS_OUT_JUMPPAD;
-               }
-
-               // If got stuck on the jump pad try to reach the farther visible item
+               // If got stuck on the jump pad try to reach the farthest visible item
                if(self.aistatus & AI_STATUS_OUT_JUMPPAD)
                {
                        if(fabs(self.velocity_z)<50)
@@ -507,11 +504,20 @@ void havocbot_movetogoal()
                                local float threshold;
                                threshold = maxspeed * 0.2;
                                if(fabs(self.velocity_x) < threshold  &&  fabs(self.velocity_y) < threshold)
+                               {
+                                       dprint("Warning: ", self.netname, " got stuck on a jumppad, trying to get out of it now\n");
                                        self.aistatus |= AI_STATUS_OUT_JUMPPAD;
+                               }
                                return;
                        }
+
+                       // Don't chase players while using a jump pad
+                       if(self.goalcurrent.classname=="player" || self.goalstack01.classname=="player")
+                               return;
                }
        }
+       else if(self.aistatus & AI_STATUS_OUT_JUMPPAD)
+               self.aistatus &~= AI_STATUS_OUT_JUMPPAD;
 
        // If there is a trigger_hurt right below try to use the jetpack or make a rocketjump
        if(skill>6)
@@ -726,7 +732,7 @@ void havocbot_movetogoal()
                        // (only when the bot is on the ground or jumping intentionally)
                        self.aistatus &~= AI_STATUS_DANGER_AHEAD;
 
-                       if(trace_fraction == 1)
+                       if(trace_fraction == 1 && self.jumppadcount == 0)
                        if(self.flags & FL_ONGROUND || self.aistatus & AI_STATUS_RUNNING || self.BUTTON_JUMP == TRUE)
                        {
                                // Look downwards
@@ -887,7 +893,7 @@ void havocbot_chooseenemy()
 
                // I want to do a second scan if no enemy was found or I don't have weapons
                // TODO: Perform the scan when using the rifle (requires changes on the rifle code)
-               if(best || self.weapons) // || self.weapon == WEP_CAMPINGRIFLE
+               if(best || self.weapons) // || self.weapon == WEP_SNIPERRIFLE
                        break;
                if(i)
                        break;
@@ -941,28 +947,12 @@ void havocbot_chooseweapon()
                return;
 
        // Workaround for rifle reloading (..)
-       if(self.weapon == WEP_CAMPINGRIFLE)
-       if(i < autocvar_g_balance_campingrifle_reloadtime + 1)
+       if(self.weapon == WEP_SNIPERRIFLE)
+       if(i < autocvar_g_balance_sniperrifle_reloadtime + 1)
                return;
 
        local float w;
-       local float rocket  ; rocket   =-1000;
-       local float nex     ; nex      =-1000;
-       local float hagar   ; hagar    =-1000;
-       local float grenade ; grenade  =-1000;
-       local float mine    ; mine     =-1000;
-       local float electro ; electro  =-1000;
-       local float crylink ; crylink  =-1000;
-       local float uzi     ; uzi      =-1000;
-       local float shotgun ; shotgun  =-1000;
-       local float campingrifle ; campingrifle  =-1000;
-       local float laser   ; laser    =-1000;
-       local float minstanex ; minstanex =-1000;
-       local float bestscore; bestscore = 0;
-       local float bestweapon; bestweapon=self.switchweapon;
        local float distance; distance=bound(10,vlen(self.origin-self.enemy.origin)-200,10000);
-       local float maxdelaytime=0.5;
-       local float spreadpenalty=10;
 
        // Should it do a weapon combo?
        local float af, ct, combo_time, combo;
@@ -1197,7 +1187,7 @@ vector havocbot_dodge()
 {
        // LordHavoc: disabled because this is too expensive
        return '0 0 0';
-       /*
+#if 0
        local entity head;
        local vector dodge, v, n;
        local float danger, bestdanger, vl, d;
@@ -1242,5 +1232,5 @@ vector havocbot_dodge()
                head = head.chain;
        }
        return dodge;
-       */
+#endif
 };
index cfd0503985f5d2a39d25ea3dc606f49c9932da42..514c364ac723963e1617e17ee3bc5ac28287bbf6 100644 (file)
@@ -315,7 +315,6 @@ void havocbot_chooserole_ka()
 void havocbot_chooserole()
 {
        dprint("choosing a role...\n");
-       navigation_clearroute();
        self.bot_strategytime = 0;
        if (g_ctf)
                havocbot_chooserole_ctf();
index f3e5c26a8faf412d40aca941a619dddeb0f51e51..9e1a92a22249465776fba51660cd37bc25d96191 100644 (file)
@@ -897,6 +897,7 @@ void navigation_goalrating_start()
        self.navigation_jetpack_goal = world;
        navigation_bestrating = -1;
        self.navigation_hasgoals = FALSE;
+       navigation_clearroute();
        navigation_bestgoal = world;
        navigation_markroutes(world);
 };
index 475771fd3a23e86c174b5a2592a0122b0babe8f8..cb2d2ed3dea2cecefbf54d40905f90ad30954dca 100644 (file)
@@ -2,15 +2,8 @@ void race_send_recordtime(float msg);
 void race_SendRankings(float pos, float prevpos, float del, float msg);
 
 void send_CSQC_teamnagger() {
-       WriteByte(0, SVC_TEMPENTITY);
-       WriteByte(0, TE_CSQC_TEAMNAGGER);
-}
-
-void send_CSQC_cr_maxbullets(entity e) {
-       msg_entity = e;
-       WriteByte(MSG_ONE, SVC_TEMPENTITY);
-       WriteByte(MSG_ONE, TE_CSQC_CR_MAXBULLETS);
-       WriteByte(MSG_ONE, autocvar_g_balance_campingrifle_magazinecapacity);
+       WriteByte(MSG_BROADCAST, SVC_TEMPENTITY);
+       WriteByte(MSG_BROADCAST, TE_CSQC_TEAMNAGGER);
 }
 
 void Announce(string snd) {
@@ -724,15 +717,6 @@ void PutObserverInServer (void)
                self.frags = FRAGS_SPECTATOR;
 }
 
-float RestrictSkin(float s)
-{
-       if(!teams_matter)
-               return s;
-       if(s == 6)
-               return 6;
-       return mod(s, 3);
-}
-
 void FixPlayermodel()
 {
        local string defaultmodel;
@@ -794,7 +778,7 @@ void FixPlayermodel()
                }
 
                oldskin = self.skinindex;
-               self.skinindex = RestrictSkin(stof(self.playerskin));
+               self.skinindex = stof(self.playerskin);
        }
 
        if(chmdl || oldskin != self.skinindex)
@@ -1121,8 +1105,9 @@ float ClientInit_SendEntity(entity to, float sf)
        WriteCoord(MSG_ENTITY, self.ebouncefactor); // g_balance_grenadelauncher_bouncefactor
        WriteCoord(MSG_ENTITY, self.ebouncestop); // g_balance_grenadelauncher_bouncestop
        WriteByte(MSG_ENTITY, autocvar_g_balance_nex_secondary); // client has to know if it should zoom or not
-       WriteByte(MSG_ENTITY, autocvar_g_balance_campingrifle_secondary); // client has to know if it should zoom or not
+       WriteByte(MSG_ENTITY, autocvar_g_balance_sniperrifle_secondary); // client has to know if it should zoom or not
        WriteByte(MSG_ENTITY, serverflags); // client has to know if it should zoom or not
+       WriteByte(MSG_ENTITY, autocvar_g_balance_sniperrifle_magazinecapacity); // rifle max bullets
        return TRUE;
 }
 
@@ -1343,7 +1328,7 @@ void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto, -2
                        self.killindicator.nextthink = time + (self.lip) * 0.05;
                        self.killindicator.cnt = ceil(killtime);
                        self.killindicator.count = bound(0, ceil(killtime), 10);
-                       sprint(self, strcat("^1You'll be dead in ", ftos(self.killindicator.cnt), " seconds\n"));
+                       //sprint(self, strcat("^1You'll be dead in ", ftos(self.killindicator.cnt), " seconds\n"));
 
                        for(e = world; (e = find(e, classname, "body")) != world; )
                        {
@@ -1750,8 +1735,6 @@ void ClientConnect (void)
        else if(autocvar_sv_teamnagger && !(autocvar_bot_vs_human && (c3==-1 && c4==-1)) && !g_ca) // teamnagger is currently bad for ca
                send_CSQC_teamnagger();
 
-       send_CSQC_cr_maxbullets(self);
-
        CheatInitClient();
 
        PlayerStats_AddPlayer(self);
@@ -2910,7 +2893,7 @@ void PlayerPreThink (void)
        }
 
        if(!zoomstate_set)
-               SetZoomState(self.BUTTON_ZOOM || (self.BUTTON_ATCK2 && self.weapon == WEP_NEX) || (self.BUTTON_ATCK2 && self.weapon == WEP_CAMPINGRIFLE && autocvar_g_balance_campingrifle_secondary == 0));
+               SetZoomState(self.BUTTON_ZOOM || (self.BUTTON_ATCK2 && self.weapon == WEP_NEX) || (self.BUTTON_ATCK2 && self.weapon == WEP_SNIPERRIFLE && autocvar_g_balance_sniperrifle_secondary == 0));
 
        float oldspectatee_status;
        oldspectatee_status = self.spectatee_status;
index e2feca927b94472af9ff963e1c01d141be5d2d01..7a93468d92632c517b4e2a8886e2c0fa48c5f779 100644 (file)
@@ -796,8 +796,6 @@ void SV_PlayerPhysics()
                bot_think();
        }
        
-       MUTATOR_CALLHOOK(PlayerPhysics);
-
        self.items &~= IT_USING_JETPACK;
 
        if(self.classname == "player")
@@ -830,6 +828,13 @@ void SV_PlayerPhysics()
        if (self.movetype == MOVETYPE_NONE)
                return;
 
+       // when we get here, disableclientprediction cannot be 2
+       self.disableclientprediction = 0;
+       if(time < self.ladder_time)
+               self.disableclientprediction = 1;
+
+       MUTATOR_CALLHOOK(PlayerPhysics);
+
        maxspd_mod = 1;
 
        swampspd_mod = 1;
@@ -989,14 +994,21 @@ void SV_PlayerPhysics()
                // on a spawnfunc_func_ladder or swimming in spawnfunc_func_water
                self.flags &~= FL_ONGROUND;
 
+               float g;
+               g = autocvar_sv_gravity * frametime;
+               if(self.gravity)
+                       g *= self.gravity;
+               if(autocvar_sv_gameplayfix_gravityunaffectedbyticrate)
+               {
+                       g *= 0.5;
+                       self.velocity_z += g;
+               }
+
                self.velocity = self.velocity * (1 - frametime * autocvar_sv_friction);
                makevectors(self.v_angle);
                //wishvel = v_forward * self.movement_x + v_right * self.movement_y + v_up * self.movement_z;
                wishvel = v_forward * self.movement_x + v_right * self.movement_y + '0 0 1' * self.movement_z;
-               if (self.gravity)
-                       self.velocity_z = self.velocity_z + self.gravity * autocvar_sv_gravity * frametime;
-               else
-                       self.velocity_z = self.velocity_z + autocvar_sv_gravity * frametime;
+               self.velocity_z += g;
                if (self.ladder_entity.classname == "func_water")
                {
                        f = vlen(wishvel);
index 9fa4784faca6cd6022dfcf24628dd32a8ce14f86..bac718356b2ad1b580db3de71bc772ebbdc58067 100644 (file)
@@ -168,7 +168,7 @@ void CopyBody(float keepvelocity)
 float player_getspecies()
 {
        float s;
-       get_model_parameters(self.playermodel, self.skinindex);
+       get_model_parameters(self.model, self.skinindex);
        s = get_model_parameters_species;
        get_model_parameters(string_null, 0);
        if(s < 0)
@@ -387,7 +387,6 @@ void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float
 
 void ClientKill_Now_TeamChange();
 void freezetag_CheckWinner();
-void freezetag_Unfreeze();
 
 void PlayerDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
 {
@@ -631,9 +630,6 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                frag_target = self;
                MUTATOR_CALLHOOK(PlayerDies);
 
-               if(g_freezetag)
-            return;
-
                if(self.flagcarried)
                {
                        if(attacker.classname != "player" && attacker.classname != "gib")
@@ -646,8 +642,31 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                if(self.ballcarried && g_nexball)
                        DropBall(self.ballcarried, self.origin, self.velocity);
                Portal_ClearAllLater(self);
-               // clear waypoints
+
+               if(clienttype(self) == CLIENTTYPE_REAL)
+               {
+                       stuffcmd(self, "-zoom\n");
+                       self.fixangle = TRUE;
+                       //msg_entity = self;
+                       //WriteByte (MSG_ONE, SVC_SETANGLE);
+                       //WriteAngle (MSG_ONE, self.v_angle_x);
+                       //WriteAngle (MSG_ONE, self.v_angle_y);
+                       //WriteAngle (MSG_ONE, 80);
+               }
+
+               if(defer_ClientKill_Now_TeamChange) // TODO does this work with FreezeTag?
+                       ClientKill_Now_TeamChange();
+
+               if(g_arena)
+                       Spawnqueue_Unmark(self);
+
+               if(g_freezetag)
+                       return;
+
+               // when we get here, player actually dies
+               // clear waypoints (do this AFTER FreezeTag)
                WaypointSprite_PlayerDead();
+
                // make the corpse upright (not tilted)
                self.angles_x = 0;
                self.angles_z = 0;
@@ -669,12 +688,12 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                waves = 0;
                sdelay = cvar(strcat("g_", GetGametype(), "_respawn_delay"));
                if(!sdelay)
-        {
-            if(g_cts)
-                sdelay = 0; // no respawn delay in CTS
-            else
-                sdelay = autocvar_g_respawn_delay;
-        }
+               {
+                       if(g_cts)
+                               sdelay = 0; // no respawn delay in CTS
+                       else
+                               sdelay = autocvar_g_respawn_delay;
+               }
                waves = cvar(strcat("g_", GetGametype(), "_respawn_waves"));
                if(!waves)
                        waves = autocvar_g_respawn_waves;
@@ -703,31 +722,15 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                // set up to fade out later
                SUB_SetFade (self, time + 6 + random (), 1);
 
-               if(clienttype(self) == CLIENTTYPE_REAL)
-               {
-                       self.fixangle = TRUE;
-                       //msg_entity = self;
-                       //WriteByte (MSG_ONE, SVC_SETANGLE);
-                       //WriteAngle (MSG_ONE, self.v_angle_x);
-                       //WriteAngle (MSG_ONE, self.v_angle_y);
-                       //WriteAngle (MSG_ONE, 80);
-               }
-
-               if(g_arena)
-                       Spawnqueue_Unmark(self);
-
-               if(defer_ClientKill_Now_TeamChange)
-                       ClientKill_Now_TeamChange();
-
                if(sv_gentle > 0 || autocvar_ekg) {
                        // remove corpse
                        PlayerCorpseDamage (inflictor, attacker, 100.0, deathtype, hitloc, force);
                }
 
                // reset fields the weapons may use just in case
-        for (j = WEP_FIRST; j <= WEP_LAST; ++j)
+               for (j = WEP_FIRST; j <= WEP_LAST; ++j)
                {
-            weapon_action(j, WR_RESETPLAYER);
+                       weapon_action(j, WR_RESETPLAYER);
                        ATTACK_FINISHED_FOR(self, j) = 0;
                }
        }
@@ -1229,7 +1232,7 @@ void ClearPlayerSounds()
 #undef _VOICEMSG
 }
 
-void LoadPlayerSounds(string f, float first)
+float LoadPlayerSounds(string f, float first)
 {
        float fh;
        string s;
@@ -1238,7 +1241,7 @@ void LoadPlayerSounds(string f, float first)
        if(fh < 0)
        {
                dprint("Player sound file not found: ", f, "\n");
-               return;
+               return 0;
        }
        while((s = fgets(fh)))
        {
@@ -1254,6 +1257,7 @@ void LoadPlayerSounds(string f, float first)
                self.field = strzone(strcat(argv(1), " ", argv(2)));
        }
        fclose(fh);
+       return 1;
 }
 
 .float modelindex_for_playersound;
@@ -1267,7 +1271,8 @@ void UpdatePlayerSounds()
        self.skinindex_for_playersound = self.skinindex;
        ClearPlayerSounds();
        LoadPlayerSounds("sound/player/default.sounds", 1);
-       LoadPlayerSounds(get_model_datafilename(self.playermodel, self.skinindex, "sounds"), 0);
+       if(!LoadPlayerSounds(get_model_datafilename(self.model, self.skinindex, "sounds"), 0))
+               LoadPlayerSounds(get_model_datafilename(self.model, 0, "sounds"), 0);
 }
 
 void FakeGlobalSound(string sample, float chan, float voicetype)
index 4f5e7604448fc0e7458a91be39f81fc4808f9f20..a1d6fed14c1ec80ace60b9b167f6921031f5ef0d 100644 (file)
@@ -138,7 +138,7 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector m
        local float oldsolid;
        vector vecs, dv;
        oldsolid = ent.dphitcontentsmask;
-       if(ent.weapon == WEP_CAMPINGRIFLE)
+       if(ent.weapon == WEP_SNIPERRIFLE)
                ent.dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_CORPSE;
        else
                ent.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
index adaf36f16415dc860c2b746dfc5d42074e98a856..9203d87a1ae760f97561fff1dbd9a1fe5b19d60f 100644 (file)
@@ -261,7 +261,7 @@ void SV_ParseClientCommand(string s) {
                if not(self.flags & FL_CLIENT)
                        return;
 
-               if((inWarmupStage && 0 >= g_warmup_limit) // with unlimited warmup players have to be able to restart
+               if((inWarmupStage)
                   || autocvar_sv_ready_restart || g_race_qualifying == 2)
                {
                        if(!readyrestart_happened || autocvar_sv_ready_restart_repeatable)
index 86a57d460b42a5d952bc09785dad450ec23b2648..8db4849e7816e1a161b9e27375924e22b0d93e12 100644 (file)
@@ -612,7 +612,7 @@ float client_cefc_accumulator;
 float client_cefc_accumulatortime;
 #endif
 
-.float campingrifle_bulletcounter;
+.float sniperrifle_bulletcounter;
 
 #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_CORPSE; (e).dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE
 // when doing this, hagar can go through clones
@@ -658,5 +658,7 @@ float serverflags;
 .float team_forced; // can be a team number to force a team, or 0 for default action, or -1 for forced spectator
 
 .float freezetag_frozen;
-.float freezetag_beginrevive_time;
 .float freezetag_revive_progress;
+
+.entity muzzle_flash;
+.float misc_bulletcounter;     // replaces uzi & hlac bullet counter.
index 44605ddeee793899a83ad425d6ed0182a4a856e2..3af433aceb075b966993512f0f42f330906bc487 100644 (file)
@@ -122,6 +122,11 @@ void func_breakable_behave_destroyed()
 void func_breakable_behave_restore()
 {
        self.health = self.max_health;
+       if(self.sprite)
+       {
+               WaypointSprite_UpdateMaxHealth(self.sprite, self.max_health);
+               WaypointSprite_UpdateHealth(self.sprite, self.health);
+       }
        self.takedamage = DAMAGE_AIM;
        self.event_damage = func_breakable_damage;
        self.state = 0;
@@ -180,9 +185,12 @@ void func_breakable_damage(entity inflictor, entity attacker, float damage, floa
        if(self.team)
                if(attacker.team == self.team)
                        return;
+       self.health = self.health - damage;
        if(self.sprite)
+       {
                WaypointSprite_Ping(self.sprite);
-       self.health = self.health - damage;
+               WaypointSprite_UpdateHealth(self.sprite, self.health);
+       }
        func_breakable_colormod();
 
        if(self.health <= 0)
index 6ab29006d2226bc8fa897b446aa05a4f8de6c262..3530fcaccd038c739f553862acd750a1c536f2ac 100644 (file)
@@ -102,7 +102,7 @@ void UpdateFrags(entity player, float f)
 
 // NOTE: f=0 means still count as a (positive) kill, but count no frags for it
 void W_SwitchWeapon_Force(entity e, float w);
-void GiveFrags (entity attacker, entity targ, float f)
+void GiveFrags (entity attacker, entity targ, float f, float deathtype)
 {
        float w;
 
@@ -139,19 +139,36 @@ void GiveFrags (entity attacker, entity targ, float f)
        if(targ != attacker) // not for suicides
        if(g_weaponarena_random)
        {
-               // after a frag, choose another random weapon set
-               if(inWarmupStage)
-                       w = warmup_start_weapons;
-               else
-                       w = start_weapons;
+               // after a frag, exchange the current weapon (or the culprit, if detectable) by a new random weapon
+               float culprit;
+               culprit = DEATH_WEAPONOF(deathtype);
+               if(!culprit || !(attacker.weapons & W_WeaponBit(culprit)))
+                       culprit = attacker.weapon;
 
-               attacker.weapons = randombits(w - (w & W_WeaponBit(attacker.weapon)), g_weaponarena_random, TRUE);
-               if(attacker.weapons < 0)
+               if(g_weaponarena_random_with_laser && culprit == WEPBIT_LASER)
                {
-                       // error from randombits: no weapon available
-                       // this means we can just give ALL weapons
-                       attacker.weapons = w;
+                       // no exchange
                }
+               else
+               {
+                       if(inWarmupStage)
+                               w = warmup_start_weapons;
+                       else
+                               w = start_weapons;
+
+                       // all others (including the culprit): remove
+                       w &~= attacker.weapons;
+
+                       // among the remaining ones, choose one by random
+                       w = randombits(w, 1, FALSE);
+                       if(w)
+                       {
+                               attacker.weapons |= w;
+                               attacker.weapons &~= W_WeaponBit(culprit);
+                       }
+               }
+
+               // after a frag, choose another random weapon set
                if not(attacker.weapons & W_WeaponBit(attacker.weapon))
                        W_SwitchWeapon_Force(attacker, w_getbestweapon(attacker));
        }
@@ -301,7 +318,7 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                        if(deathtype != DEATH_TEAMCHANGE && deathtype != DEATH_QUIET)
                        {
                                LogDeath("suicide", deathtype, targ, targ);
-                               GiveFrags(attacker, targ, -1);
+                               GiveFrags(attacker, targ, -1, deathtype);
                        }
 
                        if (targ.killcount > 2)
@@ -325,7 +342,7 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                else
                                        type = KILL_TEAM_BLUE;
 
-                               GiveFrags(attacker, targ, -1);
+                               GiveFrags(attacker, targ, -1, deathtype);
 
                                Send_CSQC_Centerprint(attacker, s, "", type, MSG_KILL);
 
@@ -379,10 +396,10 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                {
                                        UpdateFrags(attacker, ctf_score_value("score_kill"));
                                        PlayerScore_Add(attacker, SP_CTF_FCKILLS, 1);
-                                       GiveFrags(attacker, targ, 0); // for logging
+                                       GiveFrags(attacker, targ, 0, deathtype); // for logging
                                }
                                else
-                                       GiveFrags(attacker, targ, 1);
+                                       GiveFrags(attacker, targ, 1, deathtype);
 
                                if (targ.killcount > 2) {
                                        Send_KillNotification(s, ftos(targ.killcount), a, KILL_END_SPREE, MSG_SPREE);
@@ -441,7 +458,7 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                        if(strstrofs(msg, "%", 0) < 0)
                                msg = strcat("%s ", msg);
 
-                       GiveFrags(targ, targ, -1);
+                       GiveFrags(targ, targ, -1, deathtype);
                        if(PlayerScore_Add(targ, SP_SCORE, 0) == -5) {
                                AnnounceTo(targ, "botlike");
                        }
@@ -565,6 +582,28 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                                                        else
                                                                damage = autocvar_g_friendlyfire * damage;
                                                        // mirrordamage will be used LATER
+
+                                                       if(autocvar_g_mirrordamage_virtual)
+                                                       {
+                                                               vector v;
+                                                               v = healtharmor_applydamage(attacker.armorvalue, autocvar_g_balance_armor_blockpercent, mirrordamage);
+                                                               attacker.dmg_take += v_x;
+                                                               attacker.dmg_save += v_y;
+                                                               attacker.dmg_inflictor = inflictor;
+                                                               mirrordamage = 0;
+                                                               mirrorforce = 0;
+                                                       }
+
+                                                       if(autocvar_g_friendlyfire_virtual)
+                                                       {
+                                                               vector v;
+                                                               v = healtharmor_applydamage(targ.armorvalue, autocvar_g_balance_armor_blockpercent, damage);
+                                                               targ.dmg_take += v_x;
+                                                               targ.dmg_save += v_y;
+                                                               targ.dmg_inflictor = inflictor;
+                                                               damage = 0;
+                                                               force = '0 0 0';
+                                                       }
                                                }
                                                else
                                                        damage = 0;
@@ -606,12 +645,11 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                        if (DEATH_ISWEAPON(deathtype, WEP_LASER))
                        {
                                damage = 0;
+                               mirrordamage = 0;
                                if (targ != attacker)
                                {
                                        if ((targ.health >= 1) && (targ.classname == "player"))
                                                centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, "Secondary fire inflicts no damage!"));
-                                       damage = 0;
-                                       mirrordamage = 0;
                                        force = '0 0 0';
                                        // keep mirrorforce
                                        attacker = targ;
@@ -740,7 +778,9 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                                {
                                        if(damage > 0)
                                        {
-                                               if(attacker.weapon != WEP_ELECTRO && attacker.weapon != WEP_LASER || ((attacker.weapon == WEP_ELECTRO && autocvar_g_balance_electro_lightning || attacker.weapon == WEP_LASER) && attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time))
+                                               if(attacker.weapon != WEP_LASER
+                                               && (attacker.weapon != WEP_ELECTRO || !autocvar_g_balance_electro_lightning)
+                                               && attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
                                                {
                                                        if(targ.BUTTON_CHAT)
                                                                attacker.typehitsound += 1;
@@ -771,8 +811,12 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                                }
                                else
                                {
-                                       if(deathtype != DEATH_FIRE)
+                                       if(deathtype != DEATH_FIRE
+                                       && attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
+                                       {
                                                attacker.typehitsound += 1;
+                                               attacker.prevhitsound = time;
+                                       }
                                        if(mirrordamage > 0)
                                                if(time > attacker.teamkill_complain)
                                                {
@@ -841,17 +885,18 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
        {
                attacker = attacker_save;
                if(g_minstagib)
-                       if(mirrordamage > 0)
+               if(mirrordamage > 0)
+               {
+                       // just lose extra LIVES, don't kill the player for mirror damage
+                       if(attacker.armorvalue > 0)
                        {
-                               // just lose extra LIVES, don't kill the player for mirror damage
-                               if(attacker.armorvalue > 0)
-                               {
-                                       attacker.armorvalue = attacker.armorvalue - 1;
-                                       centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, "^3Remaining extra lives: ",ftos(attacker.armorvalue)));
-                                       attacker.hitsound += 1;
-                               }
-                               mirrordamage = 0;
+                               attacker.armorvalue = attacker.armorvalue - 1;
+                               centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, "^3Remaining extra lives: ",ftos(attacker.armorvalue)));
+                               attacker.hitsound += 1;
                        }
+                       mirrordamage = 0;
+               }
+
                force = normalize(attacker.origin + attacker.view_ofs - hitloc) * mirrorforce;
                Damage(attacker, inflictor, attacker, mirrordamage, DEATH_MIRRORDAMAGE, attacker.origin, force);
        }
index ef379b9bc53bc0048d76bd335c4307c28f1b9735..bb3a8546480b0001934674521349e5541fd35a56 100644 (file)
@@ -332,6 +332,9 @@ void FireGrapplingHook (void)
        if((arena_roundbased && time < warmup) || (time < game_starttime))
                return;
 
+    if(g_freezetag && self.freezetag_frozen)
+        return;
+
        makevectors(self.v_angle);
 
        s = self.cvar_cl_gunalign;
@@ -370,7 +373,7 @@ void FireGrapplingHook (void)
        //missile.glow_size = 120;
        missile.touch = GrapplingHookTouch;
        missile.think = GrapplingHookThink;
-       missile.nextthink = time + 0.1;
+       missile.nextthink = time;
 
        missile.effects = /*EF_FULLBRIGHT | EF_ADDITIVE |*/ EF_LOWPRECISION;
 
index 47f3a5a699b8daa78b7d9a896304a5ae681a6a0c..8ba71e4655822bc988c645cf0e354dd51a3d06ff 100644 (file)
@@ -698,6 +698,33 @@ void LODmodel_attach()
                        SetCustomizer(self, LOD_customize, LOD_uncustomize);
 }
 
+void ApplyMinMaxScaleAngles(entity e)
+{
+       if(e.angles_x != 0 || e.angles_z != 0 || self.avelocity_x != 0 || self.avelocity_z != 0) // "weird" rotation
+       {
+               e.maxs = '1 1 1' * vlen(
+                       '1 0 0' * max(-e.mins_x, e.maxs_x) +
+                       '0 1 0' * max(-e.mins_y, e.maxs_y) +
+                       '0 0 1' * max(-e.mins_z, e.maxs_z)
+               );
+               e.mins = -e.maxs;
+       }
+       else if(e.angles_y != 0 || self.avelocity_y != 0) // yaw only is a bit better
+       {
+               e.maxs_x = vlen(
+                       '1 0 0' * max(-e.mins_x, e.maxs_x) +
+                       '0 1 0' * max(-e.mins_y, e.maxs_y)
+               );
+               e.maxs_y = e.maxs_x;
+               e.mins_x = -e.maxs_x;
+               e.mins_y = -e.maxs_x;
+       }
+       if(e.scale)
+               setsize(e, e.mins * e.scale, e.maxs * e.scale);
+       else
+               setsize(e, e.mins, e.maxs);
+}
+
 void SetBrushEntityModel()
 {
        if(self.model != "")
@@ -707,10 +734,7 @@ void SetBrushEntityModel()
                InitializeEntity(self, LODmodel_attach, INITPRIO_FINDTARGET);
        }
        setorigin(self, self.origin);
-       if(self.scale)
-               setsize(self, self.mins * self.scale, self.maxs * self.scale);
-       else
-               setsize(self, self.mins, self.maxs);
+       ApplyMinMaxScaleAngles(self);
 }
 
 void SetBrushEntityModelNoLOD()
@@ -721,10 +745,7 @@ void SetBrushEntityModelNoLOD()
                setmodel(self, self.model); // no precision needed
        }
        setorigin(self, self.origin);
-       if(self.scale)
-               setsize(self, self.mins * self.scale, self.maxs * self.scale);
-       else
-               setsize(self, self.mins, self.maxs);
+       ApplyMinMaxScaleAngles(self);
 }
 
 /*
index 30a63ba7d44b027fb2e58c160142d900ba000820..f39ed7c2ce00bc8f21657277ba90d8b4666cda15 100644 (file)
@@ -255,12 +255,15 @@ void cvar_changes_init()
                BADPREFIX("gl_");
                BADPREFIX("joy");
                BADPREFIX("hud_");
+               BADPREFIX("m_");
                BADPREFIX("menu_");
                BADPREFIX("net_slist_");
                BADPREFIX("r_");
                BADPREFIX("sbar_");
                BADPREFIX("scr_");
                BADPREFIX("snd_");
+               BADPREFIX("show");
+               BADPREFIX("sensitivity");
                BADPREFIX("userbind");
                BADPREFIX("v_");
                BADPREFIX("vid_");
@@ -322,6 +325,7 @@ void cvar_changes_init()
                BADCVAR("g_ctf");
                BADCVAR("g_dm");
                BADCVAR("g_domination");
+               BADCVAR("g_freezetag");
                BADCVAR("g_keyhunt");
                BADCVAR("g_keyhunt_teams");
                BADCVAR("g_onslaught");
@@ -359,20 +363,33 @@ void cvar_changes_init()
                // does nothing visible
                BADCVAR("captureleadlimit_override");
                BADCVAR("g_arena_point_leadlimit");
+               BADCVAR("g_balance_kill_delay");
                BADCVAR("g_ca_point_leadlimit");
+               BADCVAR("g_ctf_captimerecord_always");
                BADCVAR("g_ctf_capture_leadlimit");
+               BADCVAR("g_ctf_flag_capture_effects");
+               BADCVAR("g_ctf_flag_glowtrails");
+               BADCVAR("g_ctf_flag_pickup_effects");
                BADCVAR("g_domination_point_leadlimit");
+               BADCVAR("g_forced_respawn");
                BADCVAR("g_keyhunt_point_leadlimit");
                BADCVAR("g_nexball_goalleadlimit");
                BADCVAR("g_runematch_point_leadlimit");
                BADCVAR("leadlimit_and_fraglimit");
                BADCVAR("leadlimit_override");
+               BADCVAR("pausable");
                BADCVAR("sv_checkforpacketsduringsleep");
+               BADCVAR("sv_timeout");
+               BADCVAR("welcome_message_time");
                BADPREFIX("crypto_");
                BADPREFIX("g_chat_");
+               BADPREFIX("g_ctf_captimerecord_");
+               BADPREFIX("g_maplist_votable_");
                BADPREFIX("net_");
                BADPREFIX("prvm_");
+               BADPREFIX("skill_");
                BADPREFIX("sv_fragmessage_");
+               BADPREFIX("sv_maxidle_");
                BADPREFIX("sv_vote_");
                BADPREFIX("timelimit_");
 
@@ -447,6 +464,9 @@ void cvar_changes_init()
                BADCVAR("sv_vote_master_password");
                BADCVAR("sv_vote_simple_majority_factor");
                BADCVAR("timelimit_override");
+               BADCVAR("g_warmup");
+               BADPREFIX("g_warmup_");
+               BADCVAR("teamplay_mode");
 
                if(autocvar_g_minstagib)
                {
@@ -797,7 +817,7 @@ void spawnfunc_worldspawn (void)
        addstat(STAT_FUEL, AS_INT, ammo_fuel);
        addstat(STAT_SHOTORG, AS_INT, stat_shotorg);
        addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit);
-       addstat(STAT_BULLETS_LOADED, AS_INT, campingrifle_bulletcounter);
+       addstat(STAT_BULLETS_LOADED, AS_INT, sniperrifle_bulletcounter);
        addstat(STAT_LAST_PICKUP, AS_FLOAT, last_pickup);
 
        addstat(STAT_NEX_CHARGE, AS_FLOAT, nex_charge);
index 113e9f427df5b8105d918b7483e482142b3d4deb..849dcdab45197e62877c96d5bf124b1bd4443589 100644 (file)
@@ -915,8 +915,15 @@ void readplayerstartcvars()
 
        g_weaponarena = 0;
        s = cvar_string("g_weaponarena");
-       if (s == "0")
+       if (s == "0" || s == "")
        {
+               if(g_lms || g_ca)
+                       s = "most";
+       }
+
+       if (s == "off")
+       {
+               // forcibly turn off weaponarena
        }
        else if (s == "all")
        {
@@ -981,6 +988,40 @@ void readplayerstartcvars()
        if (g_weaponarena)
        {
                start_weapons = g_weaponarena;
+               if(!(g_lms || g_ca))
+                       start_items |= IT_UNLIMITED_AMMO;
+       }
+       else if (g_minstagib)
+       {
+               start_health = 100;
+               start_armorvalue = 0;
+               start_weapons = WEPBIT_MINSTANEX;
+               weapon_action(WEP_MINSTANEX, WR_PRECACHE);
+               g_minstagib_invis_alpha = cvar("g_minstagib_invis_alpha");
+
+               if (g_minstagib_invis_alpha <= 0)
+                       g_minstagib_invis_alpha = -1;
+       }
+       else
+       {
+               for (i = WEP_FIRST; i <= WEP_LAST; ++i)
+               {
+                       e = get_weaponinfo(i);
+                       if(want_weapon("g_start_weapon_", e, FALSE))
+                               start_weapons |= e.weapons;
+               }
+       }
+
+       if(!cvar("g_use_ammunition"))
+               start_items |= IT_UNLIMITED_AMMO;
+
+       if(g_minstagib)
+       {
+               start_ammo_cells = cvar("g_minstagib_ammo_start");
+               start_ammo_fuel = cvar("g_start_ammo_fuel");
+       }
+       else if(start_items & IT_UNLIMITED_WEAPON_AMMO)
+       {
                for (j = WEP_FIRST; j <= WEP_LAST; ++j)
                {
                        e = get_weaponinfo(j);
@@ -998,32 +1039,16 @@ void readplayerstartcvars()
                                        start_ammo_fuel = 999;
                        }
                }
-               start_items |= IT_UNLIMITED_AMMO;
-       }
-       else if (g_minstagib)
-       {
-               start_health = 100;
-               start_armorvalue = 0;
-               start_weapons = WEPBIT_MINSTANEX;
-               weapon_action(WEP_MINSTANEX, WR_PRECACHE);
-               start_ammo_cells = cvar("g_minstagib_ammo_start");
-               g_minstagib_invis_alpha = cvar("g_minstagib_invis_alpha");
-               start_ammo_fuel = cvar("g_start_ammo_fuel");
-
-               if (g_minstagib_invis_alpha <= 0)
-                       g_minstagib_invis_alpha = -1;
        }
        else
        {
-               if (g_lms || g_ca)
+               if(g_lms || g_ca)
                {
                        start_ammo_shells = cvar("g_lms_start_ammo_shells");
                        start_ammo_nails = cvar("g_lms_start_ammo_nails");
                        start_ammo_rockets = cvar("g_lms_start_ammo_rockets");
                        start_ammo_cells = cvar("g_lms_start_ammo_cells");
                        start_ammo_fuel = cvar("g_lms_start_ammo_fuel");
-                       start_health = cvar("g_lms_start_health");
-                       start_armorvalue = cvar("g_lms_start_armor");
                }
                else
                {
@@ -1033,13 +1058,12 @@ void readplayerstartcvars()
                        start_ammo_cells = cvar("g_start_ammo_cells");
                        start_ammo_fuel = cvar("g_start_ammo_fuel");
                }
+       }
 
-               for (i = WEP_FIRST; i <= WEP_LAST; ++i)
-               {
-                       e = get_weaponinfo(i);
-                       if(want_weapon("g_start_weapon_", e, FALSE))
-                               start_weapons |= e.weapons;
-               }
+       if (g_lms || g_ca)
+       {
+               start_health = cvar("g_lms_start_health");
+               start_armorvalue = cvar("g_lms_start_armor");
        }
 
        if (inWarmupStage)
@@ -1080,22 +1104,6 @@ void readplayerstartcvars()
                warmup_start_ammo_fuel = max(warmup_start_ammo_fuel, cvar("g_balance_fuel_rotstable"));
        }
 
-       if(!cvar("g_use_ammunition"))
-       {
-               start_ammo_shells = cvar("g_pickup_shells_max");
-               start_ammo_nails = cvar("g_pickup_nails_max");
-               start_ammo_rockets = cvar("g_pickup_rockets_max");
-               start_ammo_cells = cvar("g_pickup_cells_max");
-               start_ammo_fuel = cvar("g_pickup_fuel_max");
-               start_items |= IT_UNLIMITED_AMMO;
-               warmup_start_ammo_shells = cvar("g_pickup_shells_max");
-               warmup_start_ammo_nails = cvar("g_pickup_nails_max");
-               warmup_start_ammo_rockets = cvar("g_pickup_rockets_max");
-               warmup_start_ammo_cells = cvar("g_pickup_cells_max");
-               warmup_start_ammo_fuel = cvar("g_pickup_fuel_max");
-               //warmup_start_items |= IT_UNLIMITED_AMMO;
-       }
-
        if (g_jetpack)
                start_items |= IT_JETPACK;
 
@@ -2545,10 +2553,7 @@ float MoveToRandomMapLocation(entity e, float goodcontents, float badcontents, f
 
         // rule 6: we must not end up in trigger_hurt
         if (tracebox_hits_trigger_hurt(start, e.mins, e.maxs, enddown))
-        {
-            dprint("trigger_hurt! ouch! and nothing else could find it!\n");
             continue;
-        }
 
         break;
     }
index b7c523dcbbfd0853c80bab058559b380fb104f0d..aa581228bd474fc32a12bc885291d0ae9a0c9775 100644 (file)
@@ -94,6 +94,10 @@ MUTATOR_HOOKABLE(FilterItem);
        // checks if the current item may be spawned (self.items and self.weapons may be read and written to, as well as the ammo_ fields)
        // return error to request removal
 
+MUTATOR_HOOKABLE(TurretSpawn);
+       // return error to request removal
+       // INPUT: self - turret
+       
 MUTATOR_HOOKABLE(OnEntityPreSpawn);
        // return error to prevent entity spawn, or modify the entity
 
index a1cc9deb6c6b0ed39e1f4707b56912797f8e9de5..d09bbeecf6bfbb4f91ccf34c1c01821c001120fc 100644 (file)
@@ -2,6 +2,7 @@ void freezetag_Initialize()
 {
        precache_model("models/ice/ice.md3");
        warmup = time + autocvar_g_start_delay + autocvar_g_freezetag_warmup;
+       ScoreRules_freezetag();
 }
 
 void freezetag_CheckWinner()
@@ -22,6 +23,7 @@ void freezetag_CheckWinner()
 
        entity e, winner;
        string teamname;
+       winner = world;
 
        FOR_EACH_PLAYER(e)
        {
@@ -34,7 +36,6 @@ void freezetag_CheckWinner()
 
        if(winner != world) // just in case a winner wasn't found
        {
-               TeamScore_AddToTeam(winner.team, ST_SCORE, +1);
                if(winner.team == COLOR_TEAM1)
                        teamname = "^1Red Team";
                else if(winner.team == COLOR_TEAM2)
@@ -47,20 +48,27 @@ void freezetag_CheckWinner()
                        centerprint(e, strcat(teamname, "^5 wins the round, all other teams were frozen.\n"));
                }
                bprint(teamname, "^5 wins the round since all the other teams were frozen.\n");
+               TeamScore_AddToTeam(winner.team, ST_SCORE, +1);
        }
 
        next_round = time + 5;
 }
 
+// this is needed to allow the player to turn his view around (fixangle can't
+// be used to freeze his view, as that also changes the angles), while not
+// turning that ice object with the player
 void freezetag_Ice_Think()
 {
        setorigin(self, self.owner.origin - '0 0 16');
        self.nextthink = time;
 }
 
-void freezetag_Freeze()
+void freezetag_Freeze(entity attacker)
 {
+       if(self.freezetag_frozen)
+               return;
        self.freezetag_frozen = 1;
+       self.freezetag_revive_progress = 0;
 
        entity ice;
        ice = spawn();
@@ -71,7 +79,11 @@ void freezetag_Freeze()
        ice.frame = floor(random() * 21); // ice model has 20 different looking frames
        setmodel(ice, "models/ice/ice.md3");
 
-       self.movement = '0 0 0';
+       entity oldself;
+       oldself = self;
+       self = ice;
+       freezetag_Ice_Think();
+       self = oldself;
 
        // add waypoint
        WaypointSprite_Spawn("freezetag_frozen", 0, 0, self, '0 0 64', world, self.team, self, waypointsprite_attached, TRUE);
@@ -79,11 +91,30 @@ void freezetag_Freeze()
        {
                WaypointSprite_UpdateTeamRadar(self.waypointsprite_attached, RADARICON_WAYPOINT, '0.25 0.90 1');
        }
+
+       if(attacker == self)
+       {
+               // you froze your own dumb self
+               // counted as "suicide" already
+               PlayerScore_Add(self, SP_SCORE, -1);
+       }
+       else if(attacker.classname == "player")
+       {
+               // got frozen by an enemy
+               // counted as "kill" and "death" already
+               PlayerScore_Add(self, SP_SCORE, -1);
+               PlayerScore_Add(attacker, SP_SCORE, +1);
+       }
+       else
+       {
+               // nothing - got frozen by the game type rules themselves
+       }
 }
 
-void freezetag_Unfreeze()
+void freezetag_Unfreeze(entity attacker)
 {
        self.freezetag_frozen = 0;
+       self.freezetag_revive_progress = 0;
 
        // remove the ice block
        entity ice;
@@ -116,7 +147,7 @@ MUTATOR_HOOKFUNCTION(freezetag_RemovePlayer)
        if(totalspawned > 2) // only check for winners if we had more than two players (one of them left, don't let the other player win just because of that)
                freezetag_CheckWinner();
 
-       freezetag_Unfreeze();
+       freezetag_Unfreeze(world);
 
        return 1;
 }
@@ -135,7 +166,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerDies)
                        --pinkalive;
                --totalalive;
 
-        freezetag_Freeze();
+        freezetag_Freeze(frag_attacker);
        }
 
     if(frag_attacker.classname == STR_PLAYER)
@@ -163,7 +194,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerDies)
 
 MUTATOR_HOOKFUNCTION(freezetag_PlayerSpawn)
 {
-    freezetag_Unfreeze(); // start by making sure that all ice blocks are removed
+    freezetag_Unfreeze(world); // start by making sure that all ice blocks are removed
 
        if(totalspawned == 1 && time > game_starttime) // only one player active on server, start a new match immediately
        if(!next_round && warmup && (time < warmup - autocvar_g_freezetag_warmup || time > warmup)) // not awaiting next round
@@ -174,7 +205,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerSpawn)
        if(warmup && time > warmup) // spawn too late, freeze player
        {
                centerprint(self, "^1You spawned after the round started, you'll spawn as frozen.\n");
-               freezetag_Freeze();
+               freezetag_Freeze(world);
        }
 
        return 1;
@@ -188,64 +219,86 @@ MUTATOR_HOOKFUNCTION(freezetag_GiveFragsForKill)
 
 MUTATOR_HOOKFUNCTION(freezetag_PlayerPreThink)
 {
-    vector revive_extra_size;
-    revive_extra_size = '1 1 1' * autocvar_g_freezetag_revive_extra_size;
+       float n;
+       vector revive_extra_size;
 
-    float teammate_nearby;
-    FOR_EACH_PLAYER(other) if(self != other)
-    {
-        if(other.freezetag_frozen == 0)
-        {
-            if(other.team == self.team)
-            {
-                teammate_nearby = boxesoverlap(self.absmin - revive_extra_size, self.absmax + revive_extra_size, other.absmin, other.absmax);
-                if(teammate_nearby)
-                    break;
-            }
-        }
-    }
+       revive_extra_size = '1 1 1' * autocvar_g_freezetag_revive_extra_size;
 
-    if(teammate_nearby && self.freezetag_frozen == 1) // OK, there is at least one teammate reviving us
-    {
-        if(self.freezetag_beginrevive_time == -9999) // initialize values if this is the first frame of revival
-        {
-            self.freezetag_beginrevive_time = time;
-            self.freezetag_revive_progress = 0;
-        }
-        else
-        {
-            self.freezetag_revive_progress = (time - self.freezetag_beginrevive_time) / autocvar_g_freezetag_revive_time;
-            if(time - self.freezetag_beginrevive_time >= autocvar_g_freezetag_revive_time)
-            {
-                freezetag_Unfreeze();
-
-                centerprint(self, strcat("^5You were revived by ^7", other.netname, ".\n"));
-                centerprint(other, strcat("^5You revived ^7", self.netname, ".\n"));
-                bprint("^7", other.netname, "^5 revived ^7", self.netname, ".\n");
-
-                self.freezetag_beginrevive_time = -9999;
-                self.freezetag_revive_progress = 0;
-            }
-        }
-        // now find EVERY teammate within reviving radius, set their revive_progress values correct
-        FOR_EACH_PLAYER(other) if(self != other)
-        {
-            if(other.freezetag_frozen == 0)
-            {
-                if(other.team == self.team)
-                {
-                    teammate_nearby = boxesoverlap(self.absmin - revive_extra_size, self.absmax + revive_extra_size, other.absmin, other.absmax);
-                    if(teammate_nearby)
-                        other.freezetag_revive_progress = self.freezetag_revive_progress;
-                }
-            }
-        }
-    }
-    else if(!teammate_nearby) // only if no teammate is nearby will we reset
-    {
-        self.freezetag_beginrevive_time = -9999;
-        self.freezetag_revive_progress = 0;
-    }
+       entity o;
+       o = world;
+       n = 0;
+       FOR_EACH_PLAYER(other) if(self != other)
+       {
+               if(other.freezetag_frozen == 0)
+               {
+                       if(other.team == self.team)
+                       {
+                               if(boxesoverlap(self.absmin - revive_extra_size, self.absmax + revive_extra_size, other.absmin, other.absmax))
+                               {
+                                       if(!o)
+                                               o = other;
+                                       ++n;
+                               }
+                       }
+               }
+       }
+
+       if(n && self.freezetag_frozen) // OK, there is at least one teammate reviving us
+       {
+               self.freezetag_revive_progress = bound(0, self.freezetag_revive_progress + frametime * autocvar_g_freezetag_revive_speed, 1);
+
+               if(self.freezetag_revive_progress >= 1)
+               {
+                       freezetag_Unfreeze(self);
+
+                       // EVERY team mate nearby gets a point (even if multiple!)
+                       FOR_EACH_PLAYER(other) if(self != other)
+                       {
+                               if(other.freezetag_frozen == 0)
+                               {
+                                       if(other.team == self.team)
+                                       {
+                                               if(boxesoverlap(self.absmin - revive_extra_size, self.absmax + revive_extra_size, other.absmin, other.absmax))
+                                               {
+                                                       PlayerScore_Add(other, SP_FREEZETAG_REVIVALS, +1);
+                                                       PlayerScore_Add(other, SP_SCORE, +1);
+                                               }
+                                       }
+                               }
+                       }
+
+                       if(n > 1)
+                               centerprint(self, strcat("^5You were revived by ^7", o.netname, "^5 et al.\n"));
+                       else
+                               centerprint(self, strcat("^5You were revived by ^7", o.netname, "^5.\n"));
+                       centerprint(o, strcat("^5You revived ^7", self.netname, "^5.\n"));
+                       if(n > 1)
+                               bprint("^7", o.netname, "^5 et al revived ^7", self.netname, "^5.\n");
+                       else
+                               bprint("^7", o.netname, "^5 revived ^7", self.netname, "^5.\n");
+               }
+
+               // now find EVERY teammate within reviving radius, set their revive_progress values correct
+               FOR_EACH_PLAYER(other) if(self != other)
+               {
+                       if(other.freezetag_frozen == 0)
+                       {
+                               if(other.team == self.team)
+                               {
+                                       if(boxesoverlap(self.absmin - revive_extra_size, self.absmax + revive_extra_size, other.absmin, other.absmax))
+                                               other.freezetag_revive_progress = self.freezetag_revive_progress;
+                               }
+                       }
+               }
+       }
+       else if(!n && self.freezetag_frozen) // only if no teammate is nearby will we reset
+       {
+               self.freezetag_revive_progress = bound(0, self.freezetag_revive_progress - frametime * autocvar_g_freezetag_revive_clearspeed, 1);
+       }
+       else if(!n)
+       {
+               self.freezetag_revive_progress = 0; // thawing nobody
+       }
 
        return 1;
 }
@@ -253,7 +306,10 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerPreThink)
 MUTATOR_HOOKFUNCTION(freezetag_PlayerPhysics)
 {
        if(self.freezetag_frozen)
+       {
                self.movement = '0 0 0';
+               self.disableclientprediction = 1;
+       }
        return 1;
 }
 
index 47e1a7ecd44b11fe7f7a46ae6cbdc8b7d5302040..7904e30ef1efab3ce7ed4dba8214781522401020 100644 (file)
@@ -85,6 +85,7 @@ void PlayerStats_Sent_URI_Get_Callback(float id, float status, string data)
                playerstats_waitforme = TRUE;
 }
 
+//#NO AUTOCVARS START
 void PlayerStats_Shutdown()
 {
        string p, pn;
@@ -109,6 +110,8 @@ void PlayerStats_Shutdown()
                bufstr_set(b, i++, sprintf("T %s.%06d", strftime(FALSE, "%s"), floor(random() * 1000000)));
                bufstr_set(b, i++, sprintf("G %s", GetGametype()));
                bufstr_set(b, i++, sprintf("M %s", GetMapname()));
+               bufstr_set(b, i++, sprintf("S %s", cvar_string("hostname")));
+               bufstr_set(b, i++, sprintf("C %d", cvar_purechanges_count));
                for(p = playerstats_last; (pn = db_get(playerstats_db, sprintf("%s:*", p))) != ""; p = pn)
                {
                        bufstr_set(b, i++, sprintf("P %s", p));
@@ -137,6 +140,7 @@ void PlayerStats_Shutdown()
        db_close(playerstats_db);
        playerstats_db = -1;
 }
+//#NO AUTOCVARS END
 
 void PlayerStats_AddGlobalInfo(entity p)
 {
index a4c993d83f1cd1fc4117f2517aa29b388205fa88..61fc9f4c9e5e5521778427724f033bc756ff1338 100644 (file)
@@ -34,7 +34,6 @@ void ScoreRules_basics_end()
 }
 void ScoreRules_generic()
 {
-       CheckAllowedTeams(world);
        if(teams_matter)
        {
                CheckAllowedTeams(world);
@@ -202,3 +201,13 @@ void ScoreRules_keepaway()
        ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_DROPS,               "drops",                SFL_LOWER_IS_BETTER);
        ScoreRules_basics_end();
 }
+
+// FreezeTag stuff
+#define SP_FREEZETAG_REVIVALS 4
+void ScoreRules_freezetag()
+{
+       CheckAllowedTeams(world);
+       ScoreRules_basics(((c4>=0) ? 4 : (c3>=0) ? 3 : 2), SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, TRUE); // SFL_SORT_PRIO_PRIMARY
+       ScoreInfo_SetLabel_PlayerScore(SP_FREEZETAG_REVIVALS,           "revivals",             0);
+       ScoreRules_basics_end();
+}
index 36048e860129a1d79030939b3d8c2238828a8062..1e72b765a0a0b548de052f9d31accdfc8e906b0c 100644 (file)
@@ -127,9 +127,9 @@ vector trigger_push_calculatevelocity(vector org, entity tgt, float ht)
 
 void trigger_push_touch()
 {
-       if (self.active == ACTIVE_NOT) 
-               return;         
-               
+       if (self.active == ACTIVE_NOT)
+               return;
+
        // FIXME: add a .float for whether an entity should be tossed by jumppads
        if (!other.iscreature)
        if (other.classname != "corpse")
@@ -171,7 +171,7 @@ void trigger_push_touch()
                }
                local float ct;
                ct = clienttype(other);
-               if( ct == CLIENTTYPE_REAL)
+               if( ct == CLIENTTYPE_REAL || ct == CLIENTTYPE_BOT)
                {
                        local float i;
                        local float found;
@@ -185,11 +185,14 @@ void trigger_push_touch()
                                other.jumppadcount = other.jumppadcount + 1;
                        }
 
-                       if(self.message)
-                               centerprint(other, self.message);
+                       if(ct == CLIENTTYPE_REAL)
+                       {
+                               if(self.message)
+                                       centerprint(other, self.message);
+                       }
+                       else
+                               other.lastteleporttime = time;
                }
-               else if(ct == CLIENTTYPE_BOT)
-                       other.lastteleporttime = time;
                else
                        other.jumppadcount = TRUE;
 
@@ -289,8 +292,8 @@ void spawnfunc_trigger_push()
        SetMovedir ();
 
        EXACTTRIGGER_INIT;
-       
-       self.active = ACTIVE_ACTIVE;    
+
+       self.active = ACTIVE_ACTIVE;
        self.use = trigger_push_use;
        self.touch = trigger_push_touch;
 
index 3089ab650a83b33f449bdea80375ae6cfc63692b..f3afdf580c26b0ff2890ff28107c6c77ab1db964 100644 (file)
@@ -536,6 +536,7 @@ void spawnfunc_func_pendulum()
 
        self.blocked = generic_plat_blocked;
 
+       self.avelocity_z = 0.0000001;
        if not(InitMovingBrushTrigger())
                return;
 
@@ -1433,8 +1434,10 @@ void spawnfunc_func_door_rotating()
        self.angles = '0 0 0';
 
        self.max_health = self.health;
+       self.avelocity = self.movedir;
        if not(InitMovingBrushTrigger())
                return;
+       self.velocity = '0 0 0';
        //self.effects |= EF_LOWPRECISION;
        self.classname = "door_rotating";
 
index 44036ade494e9b437934f93438fdd5ead1dab8ab..11bf880e60bf102b1d992c25698e8ff471973fbd 100644 (file)
@@ -23,7 +23,7 @@ void spawnfunc_weapon_plasmagun()    { spawnfunc_weapon_hagar();        }
 void spawnfunc_ammo_cells()          { spawnfunc_item_rockets();        }
 
 // Rail -> Rifle
-void spawnfunc_weapon_railgun()      { spawnfunc_weapon_campingrifle(); }
+void spawnfunc_weapon_railgun()      { spawnfunc_weapon_sniperrifle();  }
 void spawnfunc_ammo_slugs()          { spawnfunc_item_bullets();        }
 
 // BFG -> Crylink
index 80344a9e1f211bd2501911c7dc6272f39659264b..843af3d5ad64fad215932d91c7c25a7300febf92 100644 (file)
@@ -19,15 +19,15 @@ TFL_AIM_GROUND
 vector turret_stdproc_aim_generic()
 {
 
-    vector pre_pos,prep;
-    float distance,impact_time,i,mintime;
+    vector pre_pos, prep;
+    float distance, impact_time, i, mintime;
 
     turret_tag_fire_update();
 
     if(self.aim_flags & TFL_AIM_SIMPLE)
         return real_origin(self.enemy);
 
-       mintime = max(self.attack_finished_single - time,0) + sys_frametime ;
+       mintime = max(self.attack_finished_single - time,0) + sys_frametime;
 
     // Baseline
     pre_pos = real_origin(self.enemy);
index b7af33af82e506cc657ceee10e3cd6573fbb42d5..c7f25a4467825f6b9c6eefbd7ba9f4fc96b73289 100644 (file)
@@ -287,8 +287,6 @@ void turret_stdproc_damage (entity inflictor, entity attacker, float damage, flo
     // thorw head slightly off aim when hit?
     if (self.damage_flags & TFL_DMG_HEADSHAKE)
     {
-        //baseent.tur_aimoff_x += (random() * damage);
-        //baseent.tur_aimoff_y += ((random()*0.75) * damage);
         self.tur_head.angles_x = self.tur_head.angles_x + (-0.5 + random()) * damage;
         self.tur_head.angles_y = self.tur_head.angles_y + (-0.5 + random()) * damage;
     }
@@ -296,11 +294,8 @@ void turret_stdproc_damage (entity inflictor, entity attacker, float damage, flo
     if (self.turrcaps_flags & TFL_TURRCAPS_MOVE)
         self.velocity = self.velocity + vforce;
 
-    // FIXME: Better damage feedback
-    // Start burning when we have 10% or less health left
-    //if (self.health < (self.tur_health * 0.1))
-    //    self.effects = EF_FLAME;
-
+    // FIXME: Better damage feedback?
+    
     if (self.health <= 0)
     {
         self.event_damage           = SUB_Null;
index 4a2e886af863bdca739e41c43786dc5f684bc5ab..7d023e99ef199d9049f3954a9779e4847fa61881 100644 (file)
@@ -637,6 +637,10 @@ void turret_think()
     if (self.ammo < self.ammo_max)
         self.ammo = min(self.ammo + self.ammo_recharge, self.ammo_max);
 
+    if (self.health < (self.tur_health * 0.5))
+               if(random() < 0.25)
+                       te_spark(self.origin + '0 0 40', randomvec() * 256 + '0 0 256', 16);
+                       
     // Inactive turrets needs to run the think loop,
     // So they can handle animation and wake up if need be.
     if not (self.tur_active)
@@ -873,6 +877,7 @@ float turret_stdproc_init (string cvar_base_name, float csqc_shared, string base
     {
         e = spawn();
 
+        /*
         setorigin(e,'0 0 0');
         setmodel(e,"models/turrets/plasma.md3");
         vector v;
@@ -883,6 +888,7 @@ float turret_stdproc_init (string cvar_base_name, float csqc_shared, string base
             //crash();
         }
         setmodel(e,"");
+        */
 
         e.classname = "turret_manager";
         e.think = turrets_manager_think;
@@ -1129,6 +1135,10 @@ float turret_stdproc_init (string cvar_base_name, float csqc_shared, string base
 // Offsets & origins
     if (!self.tur_shotorg)   self.tur_shotorg = '50 0 50';
 
+// Gane hooks
+       if(MUTATOR_CALLHOOK(TurretSpawn))
+               return 0;
+
 // End of default & sanety checks, start building the turret.
 
 // Spawn extra bits
@@ -1234,7 +1244,7 @@ float turret_stdproc_init (string cvar_base_name, float csqc_shared, string base
         activator = ee;
         self.use();
     }
-
+       
        turret_stdproc_respawn();
     return 1;
 }
index 601a934c5b206eaecc2833aedc5af1048a3e7ec1..03b0c40ad91cc49b873ee48344a18c250d6eeb0a 100644 (file)
@@ -2,19 +2,6 @@ void spawnfunc_turret_fusionreactor();
 void turret_fusionreactor_dinit();
 void turret_fusionreactor_fire();
 
-float turret_fusionreactor_firecheck()
-{
-    if (self.enemy == world) return 0;
-    if not (self.enemy.ammo_flags & TFL_AMMO_RECIVE) return 0;
-    if not (self.enemy.ammo_flags & TFL_AMMO_ENERGY) return 0;
-    if (self.ammo < self.shot_dmg) return 0;
-    if (self.enemy.ammo >= self.enemy.ammo_max) return 0;
-    if (self.tur_dist_aimpos > self.target_range) return 0;
-    if (self.tur_dist_aimpos < self.target_range_min) return 0;
-
-    return 1;
-}
-
 void turret_fusionreactor_fire()
 {
     vector fl_org;
@@ -22,20 +9,51 @@ void turret_fusionreactor_fire()
     self.enemy.ammo = min(self.enemy.ammo + self.shot_dmg,self.enemy.ammo_max);
     fl_org = 0.5 * (self.enemy.absmin + self.enemy.absmax);
     te_smallflash(fl_org);
-    //te_lightning1(world,self.origin,self.enemy.origin);
 }
 
 void turret_fusionreactor_postthink()
 {
-    float f;
-    f = self.ammo / self.ammo_max;
-    self.tur_head.avelocity = '0 250 0' * f;
+    self.tur_head.avelocity = '0 250 0' * (self.ammo / self.ammo_max);
 }
 
+/*
 void turret_fusionreactor_respawnhook()
 {
     self.tur_head.avelocity = '0 50 0';
 }
+*/
+
+/**
+** Preforms pre-fire checks for fusionreactor
+**/
+float turret_fusionreactor_firecheck()
+{
+       if (self.attack_finished_single > time) 
+               return 0;
+
+       if (self.enemy.deadflag != DEAD_NO)
+               return 0;
+
+       if (self.enemy == world)
+               return 0;
+
+       if (self.ammo < self.shot_dmg)
+               return 0;
+
+       if (self.enemy.ammo >= self.enemy.ammo_max)
+               return 0;
+       
+       if (vlen(self.enemy.origin - self.origin) > self.target_range)
+               return 0;                               
+       
+       if(self.team != self.enemy.team)
+               return 0;
+       
+       if not (self.enemy.ammo_flags & TFL_AMMO_ENERGY)
+               return 0;    
+       
+       return 1;
+}
 
 void turret_fusionreactor_dinit()
 {
@@ -48,7 +66,7 @@ void turret_fusionreactor_dinit()
     self.shoot_flags         = TFL_SHOOT_HITALLVALID;
     self.aim_flags           = TFL_AIM_NO;
     self.track_flags         = TFL_TRACK_NO;
-    self.turret_respawnhook  = turret_fusionreactor_respawnhook;
+    // self.turret_respawnhook  = turret_fusionreactor_respawnhook;
 
     if (turret_stdproc_init("fusreac_std",0,"models/turrets/base.md3","models/turrets/reactor.md3") == 0)
     {
index 5d37db4929d115b40b30d0b634162066e0d005b4..d1d48c46cdb82b4f5d90746ea7ab8c5d42afe041 100644 (file)
@@ -618,16 +618,16 @@ void walker_attack()
     sound (self, CHAN_WEAPON, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
     fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated,self.shot_spread, self.shot_speed, 5, self.shot_dmg, 0, self.shot_force, DEATH_TURRET, 0, 1, autocvar_g_balance_uzi_bulletconstant);
     endFireBallisticBullet();
-    if (self.uzi_bulletcounter == 2)
+    if (self.misc_bulletcounter == 2)
     {
 
                UziFlash();
                setattachment(self.muzzle_flash, self.tur_head, "tag_fire");
 
-        self.uzi_bulletcounter = 0;
+        self.misc_bulletcounter = 0;
     }
 
-    self.uzi_bulletcounter = self.uzi_bulletcounter + 1;
+    self.misc_bulletcounter = self.misc_bulletcounter + 1;
     self.tur_head.frame    = self.tur_head.frame + 1;
 }
 
index fa0781fa786519e736ef39d86fa7a9da1d7d7730..6743f73d2305aeffc3ae4b66c623945bcd5c06e6 100644 (file)
@@ -255,17 +255,17 @@ void spiderbot_miniguns_do()
         {
             // Fire bullets, alternating trails left<->right
             self = self.owner;
-            if(self.uzi_bulletcounter == 1)
+            if(self.misc_bulletcounter == 1)
             {
                 spiderbot_minigun_fire(self.vehicle.gun1, 0);
                 spiderbot_minigun_fire(self.vehicle.gun2, 1);
-                self.uzi_bulletcounter = 0;
+                self.misc_bulletcounter = 0;
             }
             else
             {
                 spiderbot_minigun_fire(self.vehicle.gun1, 1);
                 spiderbot_minigun_fire(self.vehicle.gun2, 0);
-                self.uzi_bulletcounter += 1;
+                self.misc_bulletcounter += 1;
             }
 
             self = self.vehicle;
index 5730744037ea4908168572f68da0afb4bc9fded6..930a413d58c487dbd4be050e2994c0ccd662f4dc 100644 (file)
@@ -16,6 +16,6 @@
 #include "w_hook.qc"
 #include "w_hlac.qc"
 #include "w_tuba.qc"
-#include "w_campingrifle.qc"
+#include "w_sniperrifle.qc"
 #include "w_fireball.qc"
 #include "w_seeker.qc"
diff --git a/qcsrc/server/w_campingrifle.qc b/qcsrc/server/w_campingrifle.qc
deleted file mode 100644 (file)
index 777f0d1..0000000
+++ /dev/null
@@ -1,333 +0,0 @@
-#ifdef REGISTER_WEAPON
-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**
-//* Manually operating the bolt means that all the power of the gas is used to propell the bullet. In this mode the bolt is prevented from moving backwards in response to the firing of the bullet.
-//** In fully automatic mode some of the gas is used to extract and reload the next cartrige, thus there is less power and range.
-
-.float campingrifle_accumulator;
-
-float W_CampingRifle_CheckMaxBullets(float checkammo)
-{
-       float maxbulls;
-       maxbulls = autocvar_g_balance_campingrifle_magazinecapacity;
-       if(!maxbulls)
-               maxbulls = 8; // match HUD
-       if(checkammo)
-               if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
-                       maxbulls = min(maxbulls, floor(self.ammo_nails / min(autocvar_g_balance_campingrifle_primary_ammo, autocvar_g_balance_campingrifle_secondary_ammo)));
-       if(self.campingrifle_bulletcounter > maxbulls || !autocvar_g_balance_campingrifle_magazinecapacity)
-               self.campingrifle_bulletcounter = maxbulls;
-       return (self.campingrifle_bulletcounter == maxbulls);
-}
-
-void W_CampingRifle_ReloadedAndReady()
-{
-       float t;
-       self.campingrifle_bulletcounter = autocvar_g_balance_campingrifle_magazinecapacity;
-       W_CampingRifle_CheckMaxBullets(TRUE);
-       t = ATTACK_FINISHED(self) - autocvar_g_balance_campingrifle_reloadtime - 1;
-       ATTACK_FINISHED(self) = t;
-       w_ready();
-}
-
-float W_CampingRifle_Reload()
-{
-       float t;
-
-       W_CampingRifle_CheckMaxBullets(TRUE);
-
-       if(self.ammo_nails < min(autocvar_g_balance_campingrifle_primary_ammo, autocvar_g_balance_campingrifle_secondary_ammo)) // when we get here, bulletcounter must be 0 or -1
-       {
-               print("cannot reload... not enough bullets\n");
-               self.campingrifle_bulletcounter = -1; // reload later
-               W_SwitchToOtherWeapon(self);
-               return 0;
-       }
-       
-       if (self.campingrifle_bulletcounter >= autocvar_g_balance_campingrifle_magazinecapacity)
-               return 0;
-
-       if (self.weaponentity)
-       {
-               if (self.weaponentity.wframe == WFRAME_RELOAD)
-                       return 0;
-
-               // allow to switch away while reloading, but this will cause a new reload!
-               self.weaponentity.state = WS_READY;
-       }
-
-       sound (self, CHAN_WEAPON2, "weapons/campingrifle_reload.wav", VOL_BASE, ATTN_NORM);
-
-       t = max(time, ATTACK_FINISHED(self)) + autocvar_g_balance_campingrifle_reloadtime + 1;
-       ATTACK_FINISHED(self) = t;
-
-       weapon_thinkf(WFRAME_RELOAD, autocvar_g_balance_campingrifle_reloadtime, W_CampingRifle_ReloadedAndReady);
-
-       self.campingrifle_bulletcounter = -1;
-
-       return 1;
-}
-
-void W_CampingRifle_CheckReloadAndReady()
-{
-       w_ready();
-       if(self.campingrifle_bulletcounter <= 0)
-               if(W_CampingRifle_Reload())
-                       return;
-}
-
-void W_CampingRifle_FireBullet(float pSpread, float pDamage, float pHeadshotAddedDamage, float pForce, float pSpeed, float pLifetime, float pAmmo, float deathtype, float pBulletConstant)
-{
-       if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
-               self.ammo_nails -= pAmmo;
-
-       if(deathtype & HITTYPE_SECONDARY)
-               W_SetupShot (self, autocvar_g_antilag_bullets && pSpeed >= autocvar_g_antilag_bullets, 2, "weapons/campingrifle_fire2.wav", CHAN_WEAPON, autocvar_g_balance_campingrifle_secondary_damage + autocvar_g_balance_campingrifle_secondary_headshotaddeddamage);
-       else
-               W_SetupShot (self, autocvar_g_antilag_bullets && pSpeed >= autocvar_g_antilag_bullets, 2, "weapons/campingrifle_fire.wav", CHAN_WEAPON, autocvar_g_balance_campingrifle_primary_damage + autocvar_g_balance_campingrifle_primary_headshotaddeddamage);
-
-       pointparticles(particleeffectnum("shotgun_muzzleflash"), w_shotorg, w_shotdir * 2000, 1);
-
-       if(self.BUTTON_ZOOM) // if zoomed, shoot from the eye
-       {
-               w_shotdir = v_forward;
-               w_shotorg = self.origin + self.view_ofs + ((w_shotorg - self.origin - self.view_ofs) * v_forward) * v_forward;
-       }
-
-       if(deathtype & HITTYPE_SECONDARY)
-               fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, (autocvar_g_balance_campingrifle_secondary_tracer ? EF_RED : EF_BLUE), 1, pBulletConstant);
-       else
-               fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, (autocvar_g_balance_campingrifle_primary_tracer ? EF_RED : EF_BLUE), 1, pBulletConstant);
-       endFireBallisticBullet();
-
-       if (autocvar_g_casings >= 2)
-               SpawnCasing (((random () * 50 + 50) * v_right) - (v_forward * (random () * 25 + 25)) - ((random () * 5 - 70) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 3, self);
-       
-       self.campingrifle_bulletcounter = self.campingrifle_bulletcounter - 1;
-       W_CampingRifle_CheckMaxBullets(TRUE);
-}
-
-void W_CampingRifle_Attack()
-{
-       W_CampingRifle_FireBullet(autocvar_g_balance_campingrifle_primary_spread, autocvar_g_balance_campingrifle_primary_damage, autocvar_g_balance_campingrifle_primary_headshotaddeddamage, autocvar_g_balance_campingrifle_primary_force, autocvar_g_balance_campingrifle_primary_speed, autocvar_g_balance_campingrifle_primary_lifetime, autocvar_g_balance_campingrifle_primary_ammo, WEP_CAMPINGRIFLE, autocvar_g_balance_campingrifle_primary_bulletconstant);
-}
-
-void W_CampingRifle_Attack2()
-{
-       W_CampingRifle_FireBullet(autocvar_g_balance_campingrifle_secondary_spread, autocvar_g_balance_campingrifle_secondary_damage, autocvar_g_balance_campingrifle_secondary_headshotaddeddamage, autocvar_g_balance_campingrifle_secondary_force, autocvar_g_balance_campingrifle_secondary_speed, autocvar_g_balance_campingrifle_secondary_lifetime, autocvar_g_balance_campingrifle_secondary_ammo, WEP_CAMPINGRIFLE | HITTYPE_SECONDARY, autocvar_g_balance_campingrifle_secondary_bulletconstant);
-}
-
-void spawnfunc_weapon_campingrifle (void)
-{
-       weapon_defaultspawnfunc(WEP_CAMPINGRIFLE);
-}
-
-.void(void) campingrifle_bullethail_attackfunc;
-.float campingrifle_bullethail_frame;
-.float campingrifle_bullethail_animtime;
-.float campingrifle_bullethail_refire;
-void W_CampingRifle_BulletHail_Continue()
-{
-       float r, sw, af;
-       W_CampingRifle_CheckReloadAndReady();
-       if(self.campingrifle_bulletcounter < 0)
-               return; // reloading, so we are done
-       sw = self.switchweapon; // make it not detect weapon changes as reason to abort firing
-       af = ATTACK_FINISHED(self);
-       self.switchweapon = self.weapon;
-       ATTACK_FINISHED(self) = time;
-       print(ftos(self.ammo_nails), "\n");
-       r = weapon_prepareattack(self.campingrifle_bullethail_frame == WFRAME_FIRE2, self.campingrifle_bullethail_refire);
-       if(self.switchweapon == self.weapon)
-               self.switchweapon = sw;
-       if(r)
-       {
-               self.campingrifle_bullethail_attackfunc();
-               weapon_thinkf(self.campingrifle_bullethail_frame, self.campingrifle_bullethail_animtime, W_CampingRifle_BulletHail_Continue);
-               print("thinkf set\n");
-       }
-       else
-       {
-               ATTACK_FINISHED(self) = af; // reset attack_finished if we didn't fire, so the last shot enforces the refire time
-               print("out of ammo... ", ftos(self.weaponentity.state), "\n");
-       }
-}
-
-void W_CampingRifle_BulletHail(float mode, void(void) AttackFunc, float fr, float animtime, float refire)
-{
-       // if we get here, we have at least one bullet to fire
-       AttackFunc();
-       if(mode)
-       {
-               // continue hail
-               self.campingrifle_bullethail_attackfunc = AttackFunc;
-               self.campingrifle_bullethail_frame = fr;
-               self.campingrifle_bullethail_animtime = animtime;
-               self.campingrifle_bullethail_refire = refire;
-               weapon_thinkf(fr, animtime, W_CampingRifle_BulletHail_Continue);
-       }
-       else
-       {
-               // just one shot
-               weapon_thinkf(fr, animtime, W_CampingRifle_CheckReloadAndReady);
-       }
-}
-
-.float bot_secondary_campingriflemooth;
-float w_campingrifle(float req)
-{
-       float full;
-       if (req == WR_AIM)
-       {
-               self.BUTTON_ATCK=FALSE;
-               self.BUTTON_ATCK2=FALSE;
-               if(vlen(self.origin-self.enemy.origin) > 1000)
-                       self.bot_secondary_campingriflemooth = 0;
-               if(self.bot_secondary_campingriflemooth == 0)
-               {
-                       if(bot_aim(autocvar_g_balance_campingrifle_primary_speed, 0, autocvar_g_balance_campingrifle_primary_lifetime, TRUE))
-                       {
-                               self.BUTTON_ATCK = TRUE;
-                               if(random() < 0.01) self.bot_secondary_campingriflemooth = 1;
-                       }
-               }
-               else
-               {
-                       if(bot_aim(autocvar_g_balance_campingrifle_secondary_speed, 0, autocvar_g_balance_campingrifle_secondary_lifetime, TRUE))
-                       {
-                               self.BUTTON_ATCK2 = TRUE;
-                               if(random() < 0.03) self.bot_secondary_campingriflemooth = 0;
-                       }
-               }
-       }
-       else if (req == WR_THINK)
-       {
-               if(self.campingrifle_bulletcounter < 0) // forced reload (e.g. because interrupted)
-               {
-                       if(self.switchweapon == self.weapon)
-                       if(self.weaponentity.state == WS_READY)
-                               W_CampingRifle_Reload();
-               }
-               else
-               {
-                       self.campingrifle_accumulator = bound(time - autocvar_g_balance_campingrifle_bursttime, self.campingrifle_accumulator, time);
-                       if (self.BUTTON_ATCK)
-                       if (weapon_prepareattack_check(0, autocvar_g_balance_campingrifle_primary_refire))
-                       if (time >= self.campingrifle_accumulator + autocvar_g_balance_campingrifle_primary_burstcost)
-                       {
-                               weapon_prepareattack_do(0, autocvar_g_balance_campingrifle_primary_refire);
-                               W_CampingRifle_BulletHail(autocvar_g_balance_campingrifle_primary_bullethail, W_CampingRifle_Attack, WFRAME_FIRE1, autocvar_g_balance_campingrifle_primary_animtime, autocvar_g_balance_campingrifle_primary_refire);
-                               self.campingrifle_accumulator += autocvar_g_balance_campingrifle_primary_burstcost;
-                       }
-                       if (self.BUTTON_ATCK2)
-                       {       
-                               if (autocvar_g_balance_campingrifle_secondary)
-                               {
-                                       if (weapon_prepareattack_check(1, autocvar_g_balance_campingrifle_secondary_refire))
-                                       if (time >= self.campingrifle_accumulator + autocvar_g_balance_campingrifle_secondary_burstcost)
-                                       {
-                                               weapon_prepareattack_do(1, autocvar_g_balance_campingrifle_secondary_refire);
-                                               W_CampingRifle_BulletHail(autocvar_g_balance_campingrifle_secondary_bullethail, W_CampingRifle_Attack2, WFRAME_FIRE2, autocvar_g_balance_campingrifle_secondary_animtime, autocvar_g_balance_campingrifle_primary_refire);
-                                               self.campingrifle_accumulator += autocvar_g_balance_campingrifle_secondary_burstcost;
-                                       }
-                               }
-                       }
-               }
-       }
-       else if (req == WR_PRECACHE)
-       {
-               precache_model ("models/weapons/g_campingrifle.md3");
-               precache_model ("models/weapons/v_campingrifle.md3");
-               precache_model ("models/weapons/h_campingrifle.iqm");
-               precache_sound ("weapons/campingrifle_reload.wav");
-               precache_sound ("weapons/campingrifle_fire.wav");
-               precache_sound ("weapons/campingrifle_fire2.wav");
-       }
-       else if (req == WR_SETUP)
-       {
-               weapon_setup(WEP_CAMPINGRIFLE);
-
-               full = W_CampingRifle_CheckMaxBullets(TRUE);
-               if(autocvar_g_balance_campingrifle_auto_reload_on_switch)
-                       if(!full)
-                               self.campingrifle_bulletcounter = -1;
-       }
-       else if (req == WR_CHECKAMMO1)
-               return self.ammo_nails >= autocvar_g_balance_campingrifle_primary_ammo;
-       else if (req == WR_CHECKAMMO2)
-               return self.ammo_nails >= autocvar_g_balance_campingrifle_secondary_ammo;
-       else if (req == WR_RELOAD)
-       {
-               W_CampingRifle_Reload();
-       }
-       else if (req == WR_RESETPLAYER)
-       {
-               self.campingrifle_accumulator = time - autocvar_g_balance_campingrifle_bursttime;
-               self.campingrifle_bulletcounter = autocvar_g_balance_campingrifle_magazinecapacity;
-               W_CampingRifle_CheckMaxBullets(FALSE);
-       }
-       return TRUE;
-};
-#endif
-#ifdef CSQC
-float w_campingrifle(float req)
-{
-       if(req == WR_IMPACTEFFECT)
-       {
-               vector org2;
-               org2 = w_org + w_backoff * 2;
-               pointparticles(particleeffectnum("machinegun_impact"), org2, w_backoff * 1000, 1);
-               if(!w_issilent)
-               {
-                       if(w_random < 0.2)
-                               sound(self, CHAN_PROJECTILE, "weapons/ric1.wav", VOL_BASE, ATTN_NORM);
-                       else if(w_random < 0.4)
-                               sound(self, CHAN_PROJECTILE, "weapons/ric2.wav", VOL_BASE, ATTN_NORM);
-                       else if(w_random < 0.5)
-                               sound(self, CHAN_PROJECTILE, "weapons/ric3.wav", VOL_BASE, ATTN_NORM);
-               }
-       }
-       else if(req == WR_PRECACHE)
-       {
-               precache_sound("weapons/ric1.wav");
-               precache_sound("weapons/ric2.wav");
-               precache_sound("weapons/ric3.wav");
-       }
-       else if (req == WR_SUICIDEMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = "%s shot themself automatically";
-               else
-                       w_deathtypestring = "%s sniped themself somehow";
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-               {
-                       if(w_deathtype & HITTYPE_BOUNCE)
-                               w_deathtypestring = "%s failed to hide from %s's bullet hail";
-                       else
-                               w_deathtypestring = "%s died in %s's bullet hail";
-               }
-               else
-               {
-                       if(w_deathtype & HITTYPE_BOUNCE)
-                       {
-                               // TODO special headshot message here too?
-                               w_deathtypestring = "%s failed to hide from %s's rifle";
-                       }
-                       else
-                       {
-                               if(w_deathtype & HITTYPE_HEADSHOT)
-                                       w_deathtypestring = "%s got hit in the head by %s";
-                               else
-                                       w_deathtypestring = "%s was sniped by %s";
-                       }
-               }
-       }
-       return TRUE;
-}
-#endif
-#endif
index 49e2773836c8cb8397ed883c3670d0affd19db9f..2d9ecfd8b31085d0fb0ea2eb2d4294d56d3826a0 100644 (file)
@@ -23,6 +23,7 @@ void W_GiveWeapon (entity e, float wep, string name)
 }
 
 .float railgundistance;
+.vector railgunforce;
 void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, float deathtype)
 {
        local vector hitloc, force, endpoint, dir;
@@ -67,6 +68,7 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f
                trace_ent.railgunhitloc = end;
                trace_ent.railgunhitsolidbackup = trace_ent.solid;
                trace_ent.railgundistance = vlen(WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos) - start);
+               trace_ent.railgunforce = WarpZone_TransformVelocity(WarpZone_trace_transform, force);
 
                // stop if this is a wall
                if (trace_ent.solid == SOLID_BSP)
@@ -130,7 +132,7 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f
 
                // apply the damage
                if (ent.takedamage)
-                       Damage (ent, self, self, bdamage * f, deathtype, hitloc, force * ffs);
+                       Damage (ent, self, self, bdamage * f, deathtype, hitloc, ent.railgunforce * ffs);
 
                // create a small explosion to throw gibs around (if applicable)
                //setorigin (explosion, hitloc);
@@ -182,7 +184,7 @@ void W_BallisticBullet_Hit (void)
 
                if(headshot)
                        f *= q;
-               if(DEATH_WEAPONOF(self.projectiledeathtype) == WEP_CAMPINGRIFLE)
+               if(DEATH_WEAPONOF(self.projectiledeathtype) == WEP_SNIPERRIFLE)
                {
                        if(headshot)
                                AnnounceTo(self.owner, "headshot");
@@ -391,6 +393,8 @@ void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, f
 
                if(tracereffects & EF_RED)
                        eff = particleeffectnum("tr_rifle");
+               else if(tracereffects & EF_BLUE)
+                       eff = particleeffectnum("tr_rifle_weak");
                else
                        eff = particleeffectnum("tr_bullet");
 
index 4495b720c54e02eecd3ab2ca62e772aa31771adb..151b508f4105b7bb336391678c137c2bbc9cfe9e 100644 (file)
@@ -397,6 +397,7 @@ void W_Crylink_Attack (void)
                        proj.fade_rate = 1 / autocvar_g_balance_crylink_primary_other_fadetime;
                        proj.nextthink = time + autocvar_g_balance_crylink_primary_other_lifetime + autocvar_g_balance_crylink_primary_other_fadetime;
                }
+               proj.teleport_time = time + autocvar_g_balance_crylink_primary_joindelay;
                proj.cnt = autocvar_g_balance_crylink_primary_bounces;
                //proj.scale = 1 + 1 * proj.cnt;
 
@@ -484,6 +485,7 @@ void W_Crylink_Attack2 (void)
                        proj.fade_rate = 1 / autocvar_g_balance_crylink_secondary_line_fadetime;
                        proj.nextthink = time + autocvar_g_balance_crylink_secondary_line_lifetime + autocvar_g_balance_crylink_secondary_line_fadetime;
                }
+               proj.teleport_time = time + autocvar_g_balance_crylink_secondary_joindelay;
                proj.cnt = autocvar_g_balance_crylink_secondary_bounces;
                //proj.scale = 1 + 1 * proj.cnt;
 
@@ -542,7 +544,7 @@ float w_crylink(float req)
                }
                else
                {
-                       if (self.crylink_waitrelease)
+                       if (self.crylink_waitrelease && (!self.crylink_lastgroup || time > self.crylink_lastgroup.teleport_time))
                        {
                                // fired and released now!
                                if(self.crylink_lastgroup)
@@ -550,7 +552,6 @@ float w_crylink(float req)
                                        vector pos;
                                        entity linkjoineffect;
 
-
                                        if(self.crylink_waitrelease == 1)
                                        {
                                                pos = W_Crylink_LinkJoin(self.crylink_lastgroup, autocvar_g_balance_crylink_primary_joinspread * autocvar_g_balance_crylink_primary_speed, autocvar_g_balance_crylink_primary_jointime);
@@ -567,8 +568,6 @@ float w_crylink(float req)
                                        linkjoineffect.nextthink = time + w_crylink_linkjoin_time;
                                        linkjoineffect.owner = self;
                                        setorigin(linkjoineffect, pos);
-
-
                                }
                                self.crylink_waitrelease = 0;
                                if(!w_crylink(WR_CHECKAMMO1) && !w_crylink(WR_CHECKAMMO2))
index 1ae02b1613e47c5f1e7ba97a347688cd0a35b2ce..13301a0f7325b3e8dc4cc54ad9e77288d19e431d 100644 (file)
@@ -295,6 +295,7 @@ void W_Electro_Attack3 (void)
        entity beam, oldself;
 
        self.lgbeam = beam = spawn();
+       beam.classname = "lgbeam";
        beam.solid = SOLID_NOT;
        beam.think = lgbeam_think;
        beam.owner = self;
@@ -377,6 +378,15 @@ float w_electro(float req)
        {
                if (self.BUTTON_ATCK)
                {
+                       if(autocvar_g_balance_electro_lightning)
+                               if(self.BUTTON_ATCK_prev)
+                               {
+                                       // prolong the animtime while the gun is being fired
+                                       if(self.animstate_startframe == self.anim_shoot_x && self.animstate_numframes == self.anim_shoot_y)
+                                               weapon_thinkf(WFRAME_DONTCHANGE, autocvar_g_balance_electro_primary_animtime, w_ready);
+                                       else
+                                               weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_electro_primary_animtime, w_ready);
+                               }
                        if (weapon_prepareattack(0, (autocvar_g_balance_electro_lightning ? 0 : autocvar_g_balance_electro_primary_refire)))
                        {
                                if(autocvar_g_balance_electro_lightning)
@@ -385,19 +395,24 @@ float w_electro(float req)
                                        {
                                                W_Electro_Attack3();
                                        }
-                                       self.BUTTON_ATCK_prev = 1;
+                                       if(!self.BUTTON_ATCK_prev)
+                                       {
+                                               weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_electro_primary_animtime, w_ready);
+                                               self.BUTTON_ATCK_prev = 1;
+                                       }
                                }
                                else
                                {
                                        W_Electro_Attack();
+                                       weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_electro_primary_animtime, w_ready);
                                }
-                               weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_electro_primary_animtime, w_ready);
                        }
                } else {
                        if(autocvar_g_balance_electro_lightning)
                        {
                                if (self.BUTTON_ATCK_prev != 0)
                                {
+                                       weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_electro_primary_animtime, w_ready);
                                        ATTACK_FINISHED(self) = time + autocvar_g_balance_electro_primary_refire * W_WeaponRateFactor();
                                }
                                self.BUTTON_ATCK_prev = 0;
@@ -411,7 +426,7 @@ float w_electro(float req)
                        W_Electro_Attack2();
                        self.electro_count = autocvar_g_balance_electro_secondary_count;
                        weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_electro_secondary_animtime, w_electro_checkattack);
-                       self.electro_secondarytime = time + autocvar_g_balance_electro_secondary_refire2;
+                       self.electro_secondarytime = time + autocvar_g_balance_electro_secondary_refire2 * W_WeaponRateFactor();
                }
        }
        else if (req == WR_PRECACHE)
index e3d3cb991883e1f209cb666712a89a3110f3693e..a07d54c2283e330741d84697ac72b50a7b33126d 100644 (file)
@@ -2,25 +2,17 @@
 REGISTER_WEAPON(HLAC, w_hlac, IT_CELLS, 6, WEP_FLAG_NORMAL | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "hlac", "hlac", "Heavy Laser Assault Cannon");
 #else
 #ifdef SVQC
-.float HLAC_bulletcounter;
-void W_HLAC_Touch (void)
-{
-       PROJECTILE_TOUCH;
 
-       self.event_damage = SUB_Null;
-
-    RadiusDamage (self, self.owner, autocvar_g_balance_hlac_primary_damage, autocvar_g_balance_hlac_primary_edgedamage, autocvar_g_balance_hlac_primary_radius, world, autocvar_g_balance_hlac_primary_force, self.projectiledeathtype, other);
-
-       remove (self);
-}
-
-void W_HLAC_Touch2 (void)
+void W_HLAC_Touch (void)
 {
        PROJECTILE_TOUCH;
 
        self.event_damage = SUB_Null;
-
-    RadiusDamage (self, self.owner, autocvar_g_balance_hlac_secondary_damage, autocvar_g_balance_hlac_secondary_edgedamage, autocvar_g_balance_hlac_secondary_radius, world, autocvar_g_balance_hlac_secondary_force, self.projectiledeathtype, other);
+       
+       if(self.projectiledeathtype & HITTYPE_SECONDARY)
+               RadiusDamage (self, self.owner, autocvar_g_balance_hlac_secondary_damage, autocvar_g_balance_hlac_secondary_edgedamage, autocvar_g_balance_hlac_secondary_radius, world, autocvar_g_balance_hlac_secondary_force, self.projectiledeathtype, other);
+       else
+               RadiusDamage (self, self.owner, autocvar_g_balance_hlac_primary_damage, autocvar_g_balance_hlac_primary_edgedamage, autocvar_g_balance_hlac_primary_radius, world, autocvar_g_balance_hlac_primary_force, self.projectiledeathtype, other);
 
        remove (self);
 }
@@ -35,7 +27,7 @@ void W_HLAC_Attack (void)
         self.ammo_cells = self.ammo_cells - autocvar_g_balance_hlac_primary_ammo;
     }
 
-    spread = autocvar_g_balance_hlac_primary_spread_min + (autocvar_g_balance_hlac_primary_spread_add * self.HLAC_bulletcounter);
+    spread = autocvar_g_balance_hlac_primary_spread_min + (autocvar_g_balance_hlac_primary_spread_add * self.misc_bulletcounter);
     spread = min(spread,autocvar_g_balance_hlac_primary_spread_max);
     if(self.crouch)
         spread = spread * autocvar_g_balance_hlac_primary_spread_crouchmod;
@@ -51,7 +43,6 @@ void W_HLAC_Attack (void)
        missile = spawn ();
        missile.owner = self;
        missile.classname = "hlacbolt";
-       // missile.dmg = issecondary;
        missile.bot_dodge = TRUE;
 
     missile.bot_dodgerating = autocvar_g_balance_hlac_primary_damage;
@@ -63,7 +54,7 @@ void W_HLAC_Attack (void)
        setsize(missile, '0 0 0', '0 0 0');
 
        W_SetupProjectileVelocity(missile, autocvar_g_balance_hlac_primary_speed, spread);
-       missile.angles = vectoangles (missile.velocity);
+       //missile.angles = vectoangles (missile.velocity); // csqc
 
        missile.touch = W_HLAC_Touch;
        missile.think = SUB_Remove;
@@ -95,7 +86,6 @@ void W_HLAC_Attack2f (void)
        missile = spawn ();
        missile.owner = self;
        missile.classname = "hlacbolt";
-       // missile.dmg = issecondary;
        missile.bot_dodge = TRUE;
 
     missile.bot_dodgerating = autocvar_g_balance_hlac_secondary_damage;
@@ -107,9 +97,9 @@ void W_HLAC_Attack2f (void)
        setsize(missile, '0 0 0', '0 0 0');
 
        W_SetupProjectileVelocity(missile, autocvar_g_balance_hlac_secondary_speed, spread);
-       missile.angles = vectoangles (missile.velocity);
+       //missile.angles = vectoangles (missile.velocity); // csqc
 
-       missile.touch = W_HLAC_Touch2;
+       missile.touch = W_HLAC_Touch;
        missile.think = SUB_Remove;
 
     missile.nextthink = time + autocvar_g_balance_hlac_secondary_lifetime;
@@ -161,7 +151,7 @@ void HLAC_fire1_02()
 
                ATTACK_FINISHED(self) = time + autocvar_g_balance_hlac_primary_refire * W_WeaponRateFactor();
                W_HLAC_Attack();
-               self.HLAC_bulletcounter = self.HLAC_bulletcounter + 1;
+               self.misc_bulletcounter = self.misc_bulletcounter + 1;
         weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_hlac_primary_refire, HLAC_fire1_02);
        }
        else
@@ -184,7 +174,7 @@ float w_hlac(float req)
                if (self.BUTTON_ATCK)
                if (weapon_prepareattack(0, autocvar_g_balance_hlac_primary_refire))
                {
-                       self.HLAC_bulletcounter = 0;
+                       self.misc_bulletcounter = 0;
                        W_HLAC_Attack();
                        weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_hlac_primary_refire, HLAC_fire1_02);
                }
index 42c8ec3ececc565e599fec2ba0541ba45823942f..25998bd5836ade6a515b7ffa5c9bd159b43a8f86 100644 (file)
@@ -1,5 +1,5 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(MINE_LAYER, w_minelayer, IT_ROCKETS, 4, WEP_FLAG_NORMAL | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_HIGH, "minelayer", "minelayer", "Mine Layer");
+REGISTER_WEAPON(MINE_LAYER, w_minelayer, IT_ROCKETS, 4, WEP_TYPE_SPLASH, BOT_PICKUP_RATING_HIGH, "minelayer", "minelayer", "Mine Layer");
 #else
 #ifdef SVQC
 void W_Mine_Think (void);
index 7b1239b898859f206b22bfe7881b49d8b72a8fb6..031749be3868368bd338991344c0077292cca0f4 100644 (file)
@@ -47,8 +47,8 @@ void W_Nex_Attack (float issecondary)
        {
                charge = autocvar_g_balance_nex_charge_mindmg / mydmg + (1 - autocvar_g_balance_nex_charge_mindmg / mydmg) * self.nex_charge;
                self.nex_charge *= autocvar_g_balance_nex_charge_shot_multiplier; // do this AFTER setting mydmg/myforce
-                                                                                // O RLY? -- divVerent
-                                                                         // YA RLY -- FruitieX
+               // O RLY? -- divVerent
+               // YA RLY -- FruitieX
        }
        else
                charge = 1;
@@ -56,10 +56,10 @@ void W_Nex_Attack (float issecondary)
        myforce *= charge;
 
        W_SetupShot (self, TRUE, 5, "weapons/nexfire.wav", CHAN_WEAPON, mydmg);
-    if(charge > autocvar_g_balance_nex_charge_limit && autocvar_g_balance_nex_charge_limit) // if the Nex is overcharged, we play an extra sound
-    {
-        sound (self, CHAN_WEAPON2, "weapons/nexcharge.wav", VOL_BASE * (charge - 0.5 * autocvar_g_balance_nex_charge_limit) / (1 - 0.5 * autocvar_g_balance_nex_charge_limit), ATTN_NORM);
-    }
+       if(charge > autocvar_g_balance_nex_charge_limit && autocvar_g_balance_nex_charge_limit) // if the Nex is overcharged, we play an extra sound
+       {
+               sound (self, CHAN_WEAPON2, "weapons/nexcharge.wav", VOL_BASE * (charge - 0.5 * autocvar_g_balance_nex_charge_limit) / (1 - 0.5 * autocvar_g_balance_nex_charge_limit), ATTN_NORM);
+       }
 
        yoda = 0;
        FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_NEX);
@@ -69,7 +69,7 @@ void W_Nex_Attack (float issecondary)
 
        //beam and muzzle flash done on client
        SendCSQCNexBeamParticle(charge);
-       
+
        // flash and burn the wall
        if (trace_ent.solid == SOLID_BSP && !(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT))
                Damage_DamageInfo(trace_endpos, mydmg, 0, 0, myforce * w_shotdir, WEP_NEX, self);
@@ -94,27 +94,13 @@ float w_nex(float req)
                if(autocvar_g_balance_nex_charge && self.nex_charge < autocvar_g_balance_nex_charge_limit)
                        self.nex_charge = min(1, self.nex_charge + autocvar_g_balance_nex_charge_rate * frametime / W_TICSPERFRAME);
 
-        if(autocvar_g_balance_nex_charge)
-        {
-            self.weaponentity_glowmod_x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
-            self.weaponentity_glowmod_y = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
-            self.weaponentity_glowmod_z = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
-
-            if(self.nex_charge > autocvar_g_balance_nex_charge_limit)
-            {
-                self.weaponentity_glowmod_x = self.weaponentity_glowmod_x + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
-                self.weaponentity_glowmod_y = self.weaponentity_glowmod_y + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
-                self.weaponentity_glowmod_z = self.weaponentity_glowmod_z + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
-            }
-        }
-
                if(autocvar_g_balance_nex_secondary_chargepool)
-               if(self.nex_chargepool_ammo < 1)
-               {
-                       if(self.nex_chargepool_pauseregen_finished < time)
-                               self.nex_chargepool_ammo = min(1, self.nex_chargepool_ammo + autocvar_g_balance_nex_secondary_chargepool_regen * frametime / W_TICSPERFRAME);
-                       self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_nex_secondary_chargepool_pause_health_regen);
-               }
+                       if(self.nex_chargepool_ammo < 1)
+                       {
+                               if(self.nex_chargepool_pauseregen_finished < time)
+                                       self.nex_chargepool_ammo = min(1, self.nex_chargepool_ammo + autocvar_g_balance_nex_secondary_chargepool_regen * frametime / W_TICSPERFRAME);
+                               self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_nex_secondary_chargepool_pause_health_regen);
+                       }
 
                if (self.BUTTON_ATCK)
                {
@@ -124,43 +110,52 @@ float w_nex(float req)
                                weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_nex_primary_animtime, w_ready);
                        }
                }
-               if (self.BUTTON_ATCK2)
+               if ((autocvar_g_balance_nex_secondary_charge && !autocvar_g_balance_nex_secondary) ? self.BUTTON_ZOOM : self.BUTTON_ATCK2)
                {
                        if(autocvar_g_balance_nex_secondary_charge)
                        {
                                self.nex_charge_rottime = time + autocvar_g_balance_nex_charge_rot_pause;
                                dt = frametime / W_TICSPERFRAME;
 
-                               if(autocvar_g_balance_nex_secondary_chargepool)
+                               if(self.nex_charge < 1)
                                {
-                                       if(autocvar_g_balance_nex_secondary_ammo)
+                                       if(autocvar_g_balance_nex_secondary_chargepool)
                                        {
-                                               // always deplete if secondary is held
-                                               self.nex_chargepool_ammo = max(0, self.nex_chargepool_ammo - autocvar_g_balance_nex_secondary_ammo * dt);
+                                               if(autocvar_g_balance_nex_secondary_ammo)
+                                               {
+                                                       // always deplete if secondary is held
+                                                       self.nex_chargepool_ammo = max(0, self.nex_chargepool_ammo - autocvar_g_balance_nex_secondary_ammo * dt);
 
-                                               dt = min(dt, (1 - self.nex_charge) / autocvar_g_balance_nex_secondary_charge_rate);
-                                               self.nex_chargepool_pauseregen_finished = time + autocvar_g_balance_nex_secondary_chargepool_pause_regen;
-                                               dt = min(dt, self.nex_chargepool_ammo);
-                                               dt = max(0, dt);
+                                                       dt = min(dt, (1 - self.nex_charge) / autocvar_g_balance_nex_secondary_charge_rate);
+                                                       self.nex_chargepool_pauseregen_finished = time + autocvar_g_balance_nex_secondary_chargepool_pause_regen;
+                                                       dt = min(dt, self.nex_chargepool_ammo);
+                                                       dt = max(0, dt);
 
-                                               self.nex_charge += dt * autocvar_g_balance_nex_secondary_charge_rate;
+                                                       self.nex_charge += dt * autocvar_g_balance_nex_secondary_charge_rate;
+                                               }
                                        }
-                               }
 
-                               else if(autocvar_g_balance_nex_secondary_ammo)
-                               {
-                                       if(self.nex_charge < 1)
+                                       else if(autocvar_g_balance_nex_secondary_ammo)
                                        {
-                                               dt = min(dt, (1 - self.nex_charge) / autocvar_g_balance_nex_secondary_charge_rate);
-                                               if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+                                               if(self.BUTTON_ATCK2) // only eat ammo when the button is pressed
                                                {
-                                                       dt = min(dt, (self.ammo_cells - autocvar_g_balance_nex_primary_ammo) / autocvar_g_balance_nex_secondary_ammo);
-                                                       dt = max(0, dt);
-                                                       if(dt > 0)
+                                                       dt = min(dt, (1 - self.nex_charge) / autocvar_g_balance_nex_secondary_charge_rate);
+                                                       if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                                                        {
-                                                               self.ammo_cells = max(autocvar_g_balance_nex_secondary_ammo, self.ammo_cells - autocvar_g_balance_nex_secondary_ammo * dt);
+                                                               dt = min(dt, (self.ammo_cells - autocvar_g_balance_nex_primary_ammo) / autocvar_g_balance_nex_secondary_ammo);
+                                                               dt = max(0, dt);
+                                                               if(dt > 0)
+                                                               {
+                                                                       self.ammo_cells = max(autocvar_g_balance_nex_secondary_ammo, self.ammo_cells - autocvar_g_balance_nex_secondary_ammo * dt);
+                                                               }
                                                        }
+                                                       self.nex_charge += dt * autocvar_g_balance_nex_secondary_charge_rate;
                                                }
+                                       }
+
+                                       else
+                                       {
+                                               dt = min(dt, (1 - self.nex_charge) / autocvar_g_balance_nex_secondary_charge_rate);
                                                self.nex_charge += dt * autocvar_g_balance_nex_secondary_charge_rate;
                                        }
                                }
@@ -174,6 +169,20 @@ float w_nex(float req)
                                }
                        }
                }
+
+               if(autocvar_g_balance_nex_charge)
+               {
+                       self.weaponentity_glowmod_x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
+                       self.weaponentity_glowmod_y = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
+                       self.weaponentity_glowmod_z = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
+
+                       if(self.nex_charge > autocvar_g_balance_nex_charge_limit)
+                       {
+                               self.weaponentity_glowmod_x = self.weaponentity_glowmod_x + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
+                               self.weaponentity_glowmod_y = self.weaponentity_glowmod_y + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
+                               self.weaponentity_glowmod_z = self.weaponentity_glowmod_z + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
+                       }
+               }
        }
        else if (req == WR_PRECACHE)
        {
index 08c4a901e12083d7bdd972ed8755e3010cf97d9e..d9d717ecdeb6d3165d2c2109d74b55917f756b19 100644 (file)
@@ -56,9 +56,12 @@ void shotgun_meleethink (void)
        vector angle;
        angle = v_forward;
 
+       float meleetime;
+       meleetime = autocvar_g_balance_shotgun_secondary_melee_time * W_WeaponRateFactor();
+
        // perform trace
        float f;
-       f = (self.cnt + autocvar_g_balance_shotgun_secondary_melee_time - time) / autocvar_g_balance_shotgun_secondary_melee_time * 2 - 1;
+       f = (self.cnt + meleetime - time) / meleetime * 2 - 1;
        vector targpos;
        targpos = self.owner.origin + self.owner.view_ofs + angle * autocvar_g_balance_shotgun_secondary_melee_range + v_right * f * autocvar_g_balance_shotgun_secondary_melee_swing + v_up * f * autocvar_g_balance_shotgun_secondary_melee_swing;
 
@@ -74,7 +77,7 @@ void shotgun_meleethink (void)
                Damage (trace_ent, self.owner, self.owner, autocvar_g_balance_shotgun_secondary_damage * min(1, f + 1), WEP_SHOTGUN | HITTYPE_SECONDARY , self.owner.origin + self.owner.view_ofs, force);
                remove(self);
        }
-       else if(time >= self.cnt + autocvar_g_balance_shotgun_secondary_melee_time) // missed, remove ent
+       else if(time >= self.cnt + meleetime) // missed, remove ent
                remove(self);
        else // continue swinging the weapon in hope of hitting someone :)
                self.nextthink = time;
diff --git a/qcsrc/server/w_sniperrifle.qc b/qcsrc/server/w_sniperrifle.qc
new file mode 100644 (file)
index 0000000..720ab8f
--- /dev/null
@@ -0,0 +1,339 @@
+#ifdef REGISTER_WEAPON
+REGISTER_WEAPON(SNIPERRIFLE, w_sniperrifle, IT_NAILS, 7, WEP_FLAG_NORMAL | WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_MID, "campingrifle", "sniperrifle", "Sniper Rifle");
+#else
+#ifdef SVQC
+//Sniper rifle Primary mode: manually operated bolt*, Secondary: full automatic**
+//* Manually operating the bolt means that all the power of the gas is used to propell the bullet. In this mode the bolt is prevented from moving backwards in response to the firing of the bullet.
+//** In fully automatic mode some of the gas is used to extract and reload the next cartrige, thus there is less power and range.
+
+.float sniperrifle_accumulator;
+
+float W_SniperRifle_CheckMaxBullets(float checkammo)
+{
+       float maxbulls;
+       maxbulls = autocvar_g_balance_sniperrifle_magazinecapacity;
+       if(!maxbulls)
+               maxbulls = 8; // match HUD
+       if(checkammo)
+               if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+                       maxbulls = min(maxbulls, floor(self.ammo_nails / min(autocvar_g_balance_sniperrifle_primary_ammo, autocvar_g_balance_sniperrifle_secondary_ammo)));
+       if(self.sniperrifle_bulletcounter > maxbulls || !autocvar_g_balance_sniperrifle_magazinecapacity)
+               self.sniperrifle_bulletcounter = maxbulls;
+       return (self.sniperrifle_bulletcounter == maxbulls);
+}
+
+void W_SniperRifle_ReloadedAndReady()
+{
+       float t;
+       self.sniperrifle_bulletcounter = autocvar_g_balance_sniperrifle_magazinecapacity;
+       W_SniperRifle_CheckMaxBullets(TRUE);
+       t = ATTACK_FINISHED(self) - autocvar_g_balance_sniperrifle_reloadtime - 1;
+       ATTACK_FINISHED(self) = t;
+       w_ready();
+}
+
+float W_SniperRifle_Reload()
+{
+       float t;
+
+       W_SniperRifle_CheckMaxBullets(TRUE);
+
+       if(self.ammo_nails < min(autocvar_g_balance_sniperrifle_primary_ammo, autocvar_g_balance_sniperrifle_secondary_ammo)) // when we get here, bulletcounter must be 0 or -1
+       {
+               print("cannot reload... not enough bullets\n");
+               self.sniperrifle_bulletcounter = -1; // reload later
+               W_SwitchToOtherWeapon(self);
+               return 0;
+       }
+       
+       if (self.sniperrifle_bulletcounter >= autocvar_g_balance_sniperrifle_magazinecapacity)
+               return 0;
+
+       if (self.weaponentity)
+       {
+               if (self.weaponentity.wframe == WFRAME_RELOAD)
+                       return 0;
+
+               // allow to switch away while reloading, but this will cause a new reload!
+               self.weaponentity.state = WS_READY;
+       }
+
+       sound (self, CHAN_WEAPON2, "weapons/campingrifle_reload.wav", VOL_BASE, ATTN_NORM);
+
+       t = max(time, ATTACK_FINISHED(self)) + autocvar_g_balance_sniperrifle_reloadtime + 1;
+       ATTACK_FINISHED(self) = t;
+
+       weapon_thinkf(WFRAME_RELOAD, autocvar_g_balance_sniperrifle_reloadtime, W_SniperRifle_ReloadedAndReady);
+
+       self.sniperrifle_bulletcounter = -1;
+
+       return 1;
+}
+
+void W_SniperRifle_CheckReloadAndReady()
+{
+       w_ready();
+       if(self.sniperrifle_bulletcounter <= 0)
+               if(W_SniperRifle_Reload())
+                       return;
+}
+
+void W_SniperRifle_FireBullet(float pSpread, float pDamage, float pHeadshotAddedDamage, float pForce, float pSpeed, float pLifetime, float pAmmo, float deathtype, float pBulletConstant)
+{
+       if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+               self.ammo_nails -= pAmmo;
+
+       if(deathtype & HITTYPE_SECONDARY)
+               W_SetupShot (self, autocvar_g_antilag_bullets && pSpeed >= autocvar_g_antilag_bullets, 2, "weapons/campingrifle_fire2.wav", CHAN_WEAPON, autocvar_g_balance_sniperrifle_secondary_damage + autocvar_g_balance_sniperrifle_secondary_headshotaddeddamage);
+       else
+               W_SetupShot (self, autocvar_g_antilag_bullets && pSpeed >= autocvar_g_antilag_bullets, 2, "weapons/campingrifle_fire.wav", CHAN_WEAPON, autocvar_g_balance_sniperrifle_primary_damage + autocvar_g_balance_sniperrifle_primary_headshotaddeddamage);
+
+       pointparticles(particleeffectnum("shotgun_muzzleflash"), w_shotorg, w_shotdir * 2000, 1);
+
+       if(self.BUTTON_ZOOM) // if zoomed, shoot from the eye
+       {
+               w_shotdir = v_forward;
+               w_shotorg = self.origin + self.view_ofs + ((w_shotorg - self.origin - self.view_ofs) * v_forward) * v_forward;
+       }
+
+       if(deathtype & HITTYPE_SECONDARY)
+               fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, (autocvar_g_balance_sniperrifle_secondary_tracer ? EF_RED : EF_BLUE), 1, pBulletConstant);
+       else
+               fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, (autocvar_g_balance_sniperrifle_primary_tracer ? EF_RED : EF_BLUE), 1, pBulletConstant);
+       endFireBallisticBullet();
+
+       if (autocvar_g_casings >= 2)
+               SpawnCasing (((random () * 50 + 50) * v_right) - (v_forward * (random () * 25 + 25)) - ((random () * 5 - 70) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 3, self);
+       
+       self.sniperrifle_bulletcounter = self.sniperrifle_bulletcounter - 1;
+       W_SniperRifle_CheckMaxBullets(TRUE);
+}
+
+void W_SniperRifle_Attack()
+{
+       W_SniperRifle_FireBullet(autocvar_g_balance_sniperrifle_primary_spread, autocvar_g_balance_sniperrifle_primary_damage, autocvar_g_balance_sniperrifle_primary_headshotaddeddamage, autocvar_g_balance_sniperrifle_primary_force, autocvar_g_balance_sniperrifle_primary_speed, autocvar_g_balance_sniperrifle_primary_lifetime, autocvar_g_balance_sniperrifle_primary_ammo, WEP_SNIPERRIFLE, autocvar_g_balance_sniperrifle_primary_bulletconstant);
+}
+
+void W_SniperRifle_Attack2()
+{
+       W_SniperRifle_FireBullet(autocvar_g_balance_sniperrifle_secondary_spread, autocvar_g_balance_sniperrifle_secondary_damage, autocvar_g_balance_sniperrifle_secondary_headshotaddeddamage, autocvar_g_balance_sniperrifle_secondary_force, autocvar_g_balance_sniperrifle_secondary_speed, autocvar_g_balance_sniperrifle_secondary_lifetime, autocvar_g_balance_sniperrifle_secondary_ammo, WEP_SNIPERRIFLE | HITTYPE_SECONDARY, autocvar_g_balance_sniperrifle_secondary_bulletconstant);
+}
+
+void spawnfunc_weapon_sniperrifle (void)
+{
+       weapon_defaultspawnfunc(WEP_SNIPERRIFLE);
+}
+
+// compatibility alias
+void spawnfunc_weapon_campingrifle (void)
+{
+       spawnfunc_weapon_sniperrifle();
+}
+
+.void(void) sniperrifle_bullethail_attackfunc;
+.float sniperrifle_bullethail_frame;
+.float sniperrifle_bullethail_animtime;
+.float sniperrifle_bullethail_refire;
+void W_SniperRifle_BulletHail_Continue()
+{
+       float r, sw, af;
+       W_SniperRifle_CheckReloadAndReady();
+       if(self.sniperrifle_bulletcounter < 0)
+               return; // reloading, so we are done
+       sw = self.switchweapon; // make it not detect weapon changes as reason to abort firing
+       af = ATTACK_FINISHED(self);
+       self.switchweapon = self.weapon;
+       ATTACK_FINISHED(self) = time;
+       print(ftos(self.ammo_nails), "\n");
+       r = weapon_prepareattack(self.sniperrifle_bullethail_frame == WFRAME_FIRE2, self.sniperrifle_bullethail_refire);
+       if(self.switchweapon == self.weapon)
+               self.switchweapon = sw;
+       if(r)
+       {
+               self.sniperrifle_bullethail_attackfunc();
+               weapon_thinkf(self.sniperrifle_bullethail_frame, self.sniperrifle_bullethail_animtime, W_SniperRifle_BulletHail_Continue);
+               print("thinkf set\n");
+       }
+       else
+       {
+               ATTACK_FINISHED(self) = af; // reset attack_finished if we didn't fire, so the last shot enforces the refire time
+               print("out of ammo... ", ftos(self.weaponentity.state), "\n");
+       }
+}
+
+void W_SniperRifle_BulletHail(float mode, void(void) AttackFunc, float fr, float animtime, float refire)
+{
+       // if we get here, we have at least one bullet to fire
+       AttackFunc();
+       if(mode)
+       {
+               // continue hail
+               self.sniperrifle_bullethail_attackfunc = AttackFunc;
+               self.sniperrifle_bullethail_frame = fr;
+               self.sniperrifle_bullethail_animtime = animtime;
+               self.sniperrifle_bullethail_refire = refire;
+               weapon_thinkf(fr, animtime, W_SniperRifle_BulletHail_Continue);
+       }
+       else
+       {
+               // just one shot
+               weapon_thinkf(fr, animtime, W_SniperRifle_CheckReloadAndReady);
+       }
+}
+
+.float bot_secondary_sniperriflemooth;
+float w_sniperrifle(float req)
+{
+       float full;
+       if (req == WR_AIM)
+       {
+               self.BUTTON_ATCK=FALSE;
+               self.BUTTON_ATCK2=FALSE;
+               if(vlen(self.origin-self.enemy.origin) > 1000)
+                       self.bot_secondary_sniperriflemooth = 0;
+               if(self.bot_secondary_sniperriflemooth == 0)
+               {
+                       if(bot_aim(autocvar_g_balance_sniperrifle_primary_speed, 0, autocvar_g_balance_sniperrifle_primary_lifetime, TRUE))
+                       {
+                               self.BUTTON_ATCK = TRUE;
+                               if(random() < 0.01) self.bot_secondary_sniperriflemooth = 1;
+                       }
+               }
+               else
+               {
+                       if(bot_aim(autocvar_g_balance_sniperrifle_secondary_speed, 0, autocvar_g_balance_sniperrifle_secondary_lifetime, TRUE))
+                       {
+                               self.BUTTON_ATCK2 = TRUE;
+                               if(random() < 0.03) self.bot_secondary_sniperriflemooth = 0;
+                       }
+               }
+       }
+       else if (req == WR_THINK)
+       {
+               if(self.sniperrifle_bulletcounter < 0) // forced reload (e.g. because interrupted)
+               {
+                       if(self.switchweapon == self.weapon)
+                       if(self.weaponentity.state == WS_READY)
+                               W_SniperRifle_Reload();
+               }
+               else
+               {
+                       self.sniperrifle_accumulator = bound(time - autocvar_g_balance_sniperrifle_bursttime, self.sniperrifle_accumulator, time);
+                       if (self.BUTTON_ATCK)
+                       if (weapon_prepareattack_check(0, autocvar_g_balance_sniperrifle_primary_refire))
+                       if (time >= self.sniperrifle_accumulator + autocvar_g_balance_sniperrifle_primary_burstcost)
+                       {
+                               weapon_prepareattack_do(0, autocvar_g_balance_sniperrifle_primary_refire);
+                               W_SniperRifle_BulletHail(autocvar_g_balance_sniperrifle_primary_bullethail, W_SniperRifle_Attack, WFRAME_FIRE1, autocvar_g_balance_sniperrifle_primary_animtime, autocvar_g_balance_sniperrifle_primary_refire);
+                               self.sniperrifle_accumulator += autocvar_g_balance_sniperrifle_primary_burstcost;
+                       }
+                       if (self.BUTTON_ATCK2)
+                       {       
+                               if (autocvar_g_balance_sniperrifle_secondary)
+                               {
+                                       if (weapon_prepareattack_check(1, autocvar_g_balance_sniperrifle_secondary_refire))
+                                       if (time >= self.sniperrifle_accumulator + autocvar_g_balance_sniperrifle_secondary_burstcost)
+                                       {
+                                               weapon_prepareattack_do(1, autocvar_g_balance_sniperrifle_secondary_refire);
+                                               W_SniperRifle_BulletHail(autocvar_g_balance_sniperrifle_secondary_bullethail, W_SniperRifle_Attack2, WFRAME_FIRE2, autocvar_g_balance_sniperrifle_secondary_animtime, autocvar_g_balance_sniperrifle_primary_refire);
+                                               self.sniperrifle_accumulator += autocvar_g_balance_sniperrifle_secondary_burstcost;
+                                       }
+                               }
+                       }
+               }
+       }
+       else if (req == WR_PRECACHE)
+       {
+               precache_model ("models/weapons/g_campingrifle.md3");
+               precache_model ("models/weapons/v_campingrifle.md3");
+               precache_model ("models/weapons/h_campingrifle.iqm");
+               precache_sound ("weapons/campingrifle_reload.wav");
+               precache_sound ("weapons/campingrifle_fire.wav");
+               precache_sound ("weapons/campingrifle_fire2.wav");
+       }
+       else if (req == WR_SETUP)
+       {
+               weapon_setup(WEP_SNIPERRIFLE);
+
+               full = W_SniperRifle_CheckMaxBullets(TRUE);
+               if(autocvar_g_balance_sniperrifle_auto_reload_on_switch)
+                       if(!full)
+                               self.sniperrifle_bulletcounter = -1;
+       }
+       else if (req == WR_CHECKAMMO1)
+               return self.ammo_nails >= autocvar_g_balance_sniperrifle_primary_ammo;
+       else if (req == WR_CHECKAMMO2)
+               return self.ammo_nails >= autocvar_g_balance_sniperrifle_secondary_ammo;
+       else if (req == WR_RELOAD)
+       {
+               W_SniperRifle_Reload();
+       }
+       else if (req == WR_RESETPLAYER)
+       {
+               self.sniperrifle_accumulator = time - autocvar_g_balance_sniperrifle_bursttime;
+               self.sniperrifle_bulletcounter = autocvar_g_balance_sniperrifle_magazinecapacity;
+               W_SniperRifle_CheckMaxBullets(FALSE);
+       }
+       return TRUE;
+};
+#endif
+#ifdef CSQC
+float w_sniperrifle(float req)
+{
+       if(req == WR_IMPACTEFFECT)
+       {
+               vector org2;
+               org2 = w_org + w_backoff * 2;
+               pointparticles(particleeffectnum("machinegun_impact"), org2, w_backoff * 1000, 1);
+               if(!w_issilent)
+               {
+                       if(w_random < 0.2)
+                               sound(self, CHAN_PROJECTILE, "weapons/ric1.wav", VOL_BASE, ATTN_NORM);
+                       else if(w_random < 0.4)
+                               sound(self, CHAN_PROJECTILE, "weapons/ric2.wav", VOL_BASE, ATTN_NORM);
+                       else if(w_random < 0.5)
+                               sound(self, CHAN_PROJECTILE, "weapons/ric3.wav", VOL_BASE, ATTN_NORM);
+               }
+       }
+       else if(req == WR_PRECACHE)
+       {
+               precache_sound("weapons/ric1.wav");
+               precache_sound("weapons/ric2.wav");
+               precache_sound("weapons/ric3.wav");
+       }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       w_deathtypestring = "%s shot themself automatically";
+               else
+                       w_deathtypestring = "%s sniped themself somehow";
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+               {
+                       if(w_deathtype & HITTYPE_BOUNCE)
+                               w_deathtypestring = "%s failed to hide from %s's bullet hail";
+                       else
+                               w_deathtypestring = "%s died in %s's bullet hail";
+               }
+               else
+               {
+                       if(w_deathtype & HITTYPE_BOUNCE)
+                       {
+                               // TODO special headshot message here too?
+                               w_deathtypestring = "%s failed to hide from %s's rifle";
+                       }
+                       else
+                       {
+                               if(w_deathtype & HITTYPE_HEADSHOT)
+                                       w_deathtypestring = "%s got hit in the head by %s";
+                               else
+                                       w_deathtypestring = "%s was sniped by %s";
+                       }
+               }
+       }
+       return TRUE;
+}
+#endif
+#endif
index 2d50143deed1ddad0ca5623cca74363ed66ab9aa..50f59ff01e74cbce9010c7ca8b00446bf13612a8 100644 (file)
@@ -2,7 +2,6 @@
 REGISTER_WEAPON(UZI, w_uzi, IT_NAILS, 3, WEP_FLAG_NORMAL | WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_MID, "uzi", "uzi", "Machine Gun");
 #else
 #ifdef SVQC
-.entity muzzle_flash;
 
 // leilei's fancy muzzleflash stuff
 void Uzi_Flash_Go() 
@@ -40,17 +39,16 @@ void UziFlash()
        self.muzzle_flash.owner = self;
 }
 
-.float uzi_bulletcounter;
 void W_Uzi_Attack (float deathtype)
 {
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
        {
-               if (self.uzi_bulletcounter == 1)
+               if (self.misc_bulletcounter == 1)
                        self.ammo_nails = self.ammo_nails - autocvar_g_balance_uzi_first_ammo;
                else
                        self.ammo_nails = self.ammo_nails - autocvar_g_balance_uzi_sustained_ammo;
        }
-       W_SetupShot (self, autocvar_g_antilag_bullets && autocvar_g_balance_uzi_speed >= autocvar_g_antilag_bullets, 0, "weapons/uzi_fire.wav", CHAN_WEAPON, ((self.uzi_bulletcounter == 1) ? autocvar_g_balance_uzi_first_damage : autocvar_g_balance_uzi_sustained_damage));
+       W_SetupShot (self, autocvar_g_antilag_bullets && autocvar_g_balance_uzi_speed >= autocvar_g_antilag_bullets, 0, "weapons/uzi_fire.wav", CHAN_WEAPON, ((self.misc_bulletcounter == 1) ? autocvar_g_balance_uzi_first_damage : autocvar_g_balance_uzi_sustained_damage));
        if (!g_norecoil)
        {
                self.punchangle_x = random () - 0.5;
@@ -60,7 +58,7 @@ void W_Uzi_Attack (float deathtype)
        // this attack_finished just enforces a cooldown at the end of a burst
        ATTACK_FINISHED(self) = time + autocvar_g_balance_uzi_first_refire * W_WeaponRateFactor();
 
-       if (self.uzi_bulletcounter == 1)
+       if (self.misc_bulletcounter == 1)
                fireBallisticBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_first_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_first_damage, 0, autocvar_g_balance_uzi_first_force, deathtype, 0, 1, autocvar_g_balance_uzi_bulletconstant);
        else
                fireBallisticBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_sustained_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_sustained_damage, 0, autocvar_g_balance_uzi_sustained_force, deathtype, 0, 1, autocvar_g_balance_uzi_bulletconstant);
@@ -92,7 +90,7 @@ void uzi_fire1_02()
                        w_ready();
                        return;
                }
-               self.uzi_bulletcounter = self.uzi_bulletcounter + 1;
+               self.misc_bulletcounter = self.misc_bulletcounter + 1;
                W_Uzi_Attack(WEP_UZI);
                weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_uzi_sustained_refire, uzi_fire1_02);
        }
@@ -128,11 +126,11 @@ void uzi_mode1_fire_auto()
                self.punchangle_y = random () - 0.5;
        }
        
-       uzi_spread = bound(autocvar_g_balance_uzi_spread_min, autocvar_g_balance_uzi_spread_min + (autocvar_g_balance_uzi_spread_add * self.uzi_bulletcounter), autocvar_g_balance_uzi_spread_max);
+       uzi_spread = bound(autocvar_g_balance_uzi_spread_min, autocvar_g_balance_uzi_spread_min + (autocvar_g_balance_uzi_spread_add * self.misc_bulletcounter), autocvar_g_balance_uzi_spread_max);
        fireBallisticBullet(w_shotorg, w_shotdir, uzi_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_sustained_damage, 0, autocvar_g_balance_uzi_sustained_force, WEP_UZI, 0, 1, autocvar_g_balance_uzi_bulletconstant);
        endFireBallisticBullet();
        
-       self.uzi_bulletcounter = self.uzi_bulletcounter + 1;
+       self.misc_bulletcounter = self.misc_bulletcounter + 1;
        
        pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
@@ -168,13 +166,12 @@ void uzi_mode1_fire_burst()
        if (autocvar_g_casings >= 2) // casing code
                SpawnCasing (((random () * 50 + 50) * v_right) - (v_forward * (random () * 25 + 25)) - ((random () * 5 - 70) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 3, self);
 
-       self.uzi_bulletcounter = self.uzi_bulletcounter + 1;
-       if (self.uzi_bulletcounter == 0)
+       self.misc_bulletcounter = self.misc_bulletcounter + 1;
+       if (self.misc_bulletcounter == 0)
                weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_uzi_burst_refire2, w_ready);
        else
        {
                weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_uzi_burst_refire, uzi_mode1_fire_burst);
-               dprint("bullets:", ftos(self.uzi_bulletcounter),"\n");
        }
                
 }
@@ -197,7 +194,7 @@ float w_uzi(float req)
                        if (self.BUTTON_ATCK)
                        if (weapon_prepareattack(0, 0))
                        {                               
-                               self.uzi_bulletcounter = 0;
+                               self.misc_bulletcounter = 0;
                                uzi_mode1_fire_auto();
                        }
                        
@@ -214,7 +211,7 @@ float w_uzi(float req)
                                if not(self.items & IT_UNLIMITED_WEAPON_AMMO)   
                                        self.ammo_nails = self.ammo_nails - autocvar_g_balance_uzi_burst_ammo;
 
-                               self.uzi_bulletcounter = autocvar_g_balance_uzi_burst * -1;
+                               self.misc_bulletcounter = autocvar_g_balance_uzi_burst * -1;
                                uzi_mode1_fire_burst();
                        }
                }
@@ -224,7 +221,7 @@ float w_uzi(float req)
                        if (self.BUTTON_ATCK)
                        if (weapon_prepareattack(0, 0))
                        {
-                               self.uzi_bulletcounter = 1;
+                               self.misc_bulletcounter = 1;
                                W_Uzi_Attack(WEP_UZI); // sets attack_finished
                                weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_uzi_sustained_refire, uzi_fire1_02);
                        }
@@ -232,7 +229,7 @@ float w_uzi(float req)
                        if (self.BUTTON_ATCK2 && autocvar_g_balance_uzi_first)
                        if (weapon_prepareattack(1, 0))
                        {
-                               self.uzi_bulletcounter = 1;
+                               self.misc_bulletcounter = 1;
                                W_Uzi_Attack(WEP_UZI | HITTYPE_SECONDARY); // sets attack_finished
                                weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_uzi_first_refire, w_ready);
                        }
index 5bbf02676f7a16e29a6b1e7dbbd19a0d80bf65d1..bda0e77b8a972543b558d4051a13aecdf6d7acec 100644 (file)
@@ -81,8 +81,13 @@ void WaypointSprite_UpdateTeamRadar(entity e, float icon, vector col)
        e.SendFlags |= 32;
 }
 
+.float waypointsprite_pingtime;
 void WaypointSprite_Ping(entity e)
 {
+       // anti spam
+       if(time < e.waypointsprite_pingtime)
+               return;
+       e.waypointsprite_pingtime = time + 0.3;
        // ALWAYS sends (this causes a radar circle), thus no check
        e.cnt |= 0x80;
        e.SendFlags |= 32;
index f71fbe2d985b37fc9279f11f98009f307c5540c5..f4141c8a3df01899ca3754c2bcb20c8a98f24cfe 100644 (file)
@@ -604,8 +604,38 @@ void WarpZone_StartFrame()
                self = e;
                WarpZones_Reconnect();
        }
+
+       entity oldself, oldother;
+       oldself = self;
+       oldother = other;
        for(e = world; (e = nextent(e)); )
+       {
                WarpZone_StoreProjectileData(e);
+               float f;
+               f = clienttype(e);
+               if(f == CLIENTTYPE_REAL)
+               {
+                       if(e.solid != SOLID_NOT) // not spectating?
+                               continue;
+                       if(e.movetype != MOVETYPE_NOCLIP && e.movetype != MOVETYPE_FLY) // not spectating? (this is to catch observers)
+                               continue;
+                       self = WarpZone_Find(e.origin + e.mins, e.origin + e.maxs);
+                       if(!self)
+                               continue;
+                       other = e;
+                       if(WarpZoneLib_ExactTrigger_Touch())
+                               continue;
+                       WarpZone_Teleport(e); // NOT triggering targets by this!
+               }
+               if(f == CLIENTTYPE_NOTACLIENT)
+               {
+                       for(; (e = nextent(e)); )
+                               WarpZone_StoreProjectileData(e);
+                       break;
+               }
+       }
+       self = oldself;
+       other = oldother;
 }
 
 .float warpzone_reconnecting;
index 725fa430e1bdad63ef5c28560b257ef89a82b25d..a85fbab69b2c430a37a44b7c9bb3e6c885cf4e05 100644 (file)
--- a/quake.rc
+++ b/quake.rc
@@ -8,4 +8,4 @@ stuffcmds
 //startdemos demos/demo1 demos/demo2 demos/demo3
 //startdemos
 //play announcer/male/welcome.ogg
-crypto_keygen 0 http://rm.endoftheinternet.org/~xonotic/keygen/?ca=0&key=
+crypto_keygen 0 http://ca.xonotic.org/?ca=0&key=
diff --git a/textures/hlac_glass.tga b/textures/hlac_glass.tga
new file mode 100644 (file)
index 0000000..e0ed0a7
Binary files /dev/null and b/textures/hlac_glass.tga differ
diff --git a/textures/hlac_plasma.tga b/textures/hlac_plasma.tga
new file mode 100644 (file)
index 0000000..5603b16
Binary files /dev/null and b/textures/hlac_plasma.tga differ