]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/master' into samual/individual_switchdelay
authorSamual Lenks <samual@xonotic.org>
Tue, 14 May 2013 17:59:18 +0000 (13:59 -0400)
committerSamual Lenks <samual@xonotic.org>
Tue, 14 May 2013 17:59:18 +0000 (13:59 -0400)
29 files changed:
balanceXPM.cfg
balanceXonotic.cfg
crosshairs.cfg
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/autocvars.qh
qcsrc/client/main.qh
qcsrc/server/autocvars.qh
qcsrc/server/cl_client.qc
qcsrc/server/cl_weapons.qc
qcsrc/server/cl_weaponsystem.qc
qcsrc/server/w_crylink.qc
qcsrc/server/w_electro.qc
qcsrc/server/w_fireball.qc
qcsrc/server/w_grenadelauncher.qc
qcsrc/server/w_hagar.qc
qcsrc/server/w_hlac.qc
qcsrc/server/w_hook.qc
qcsrc/server/w_laser.qc
qcsrc/server/w_minelayer.qc
qcsrc/server/w_minstanex.qc
qcsrc/server/w_nex.qc
qcsrc/server/w_porto.qc
qcsrc/server/w_rifle.qc
qcsrc/server/w_rocketlauncher.qc
qcsrc/server/w_seeker.qc
qcsrc/server/w_shotgun.qc
qcsrc/server/w_tuba.qc
qcsrc/server/w_uzi.qc

index 8012967ad73d324c181202296550e76605601d6e..80c58c0f62ef7d9fe3bd6166b10ed2e67a9abb88 100644 (file)
@@ -259,6 +259,8 @@ set g_balance_laser_secondary_gauntlet 0
 set g_balance_laser_secondary_force_zscale 1.25
 set g_balance_laser_secondary_force_velocitybias 0
 set g_balance_laser_secondary_force_other_scale 1
+set g_balance_laser_switchdelay_drop 0.15
+set g_balance_laser_switchdelay_raise 0.15
 set g_balance_laser_reload_ammo 0 //default: 6
 set g_balance_laser_reload_time 2
 // }}}
@@ -286,6 +288,8 @@ set g_balance_shotgun_secondary_damage 80
 set g_balance_shotgun_secondary_force 200
 set g_balance_shotgun_secondary_refire 1.25
 set g_balance_shotgun_secondary_animtime 1
+set g_balance_shotgun_switchdelay_drop 0.2
+set g_balance_shotgun_switchdelay_raise 0.2
 set g_balance_shotgun_reload_ammo 0 //default: 5
 set g_balance_shotgun_reload_time 2
 // }}}
@@ -320,6 +324,9 @@ set g_balance_uzi_sustained_ammo 1
 set g_balance_uzi_speed 18000
 set g_balance_uzi_bulletconstant 115 // 13.1qu
 
+set g_balance_uzi_switchdelay_drop 0.2
+set g_balance_uzi_switchdelay_raise 0.2
+
 set g_balance_uzi_reload_ammo 60 //default: 30
 set g_balance_uzi_reload_time 2
 // }}}
@@ -364,6 +371,9 @@ set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
 set g_balance_grenadelauncher_bouncefactor 0.5
 set g_balance_grenadelauncher_bouncestop 0.075
 
+set g_balance_grenadelauncher_switchdelay_drop 0.2
+set g_balance_grenadelauncher_switchdelay_raise 0.2
+
 set g_balance_grenadelauncher_reload_ammo 0 //default: 12
 set g_balance_grenadelauncher_reload_time 2
 // }}}
@@ -411,6 +421,8 @@ set g_balance_electro_combo_radius 150
 set g_balance_electro_combo_comboradius 300
 set g_balance_electro_combo_speed 2000
 set g_balance_electro_combo_safeammocheck 1
+set g_balance_electro_switchdelay_drop 0.2
+set g_balance_electro_switchdelay_raise 0.2
 set g_balance_electro_reload_ammo 0 //default: 20
 set g_balance_electro_reload_time 2
 // }}}
@@ -471,6 +483,9 @@ set g_balance_crylink_secondary_middle_fadetime 5
 set g_balance_crylink_secondary_line_lifetime 5 
 set g_balance_crylink_secondary_line_fadetime 5
 
+set g_balance_crylink_switchdelay_drop 0.2
+set g_balance_crylink_switchdelay_raise 0.2
+
 set g_balance_crylink_reload_ammo 0 //default: 10
 set g_balance_crylink_reload_time 2
 // }}}
@@ -478,7 +493,7 @@ set g_balance_crylink_reload_time 2
 set g_balance_nex_primary_damage 80
 set g_balance_nex_primary_force 400
 set g_balance_nex_primary_refire 1.5
-set g_balance_nex_primary_animtime 0.5
+set g_balance_nex_primary_animtime 0.6
 set g_balance_nex_primary_ammo 6
 set g_balance_nex_primary_damagefalloff_mindist 0 // 1000    For tZork ;3
 set g_balance_nex_primary_damagefalloff_maxdist 0 // 3000
@@ -515,6 +530,9 @@ set g_balance_nex_charge_velocity_rate 0
 set g_balance_nex_charge_minspeed 400
 set g_balance_nex_charge_maxspeed 800
 
+set g_balance_nex_switchdelay_drop 0.3
+set g_balance_nex_switchdelay_raise 0.3
+
 set g_balance_nex_reload_ammo 0 //default: 25
 set g_balance_nex_reload_time 2
 // }}}
@@ -525,6 +543,8 @@ set g_balance_minstanex_ammo 10
 set g_balance_minstanex_laser_ammo 0
 set g_balance_minstanex_laser_animtime 0.3
 set g_balance_minstanex_laser_refire 0.7
+set g_balance_minstanex_switchdelay_drop 0.2
+set g_balance_minstanex_switchdelay_raise 0.2
 set g_balance_minstanex_reload_ammo 0 //default: 50
 set g_balance_minstanex_reload_time 2
 // }}}
@@ -548,7 +568,7 @@ set g_balance_hagar_secondary_load_spread_bias 0.5
 set g_balance_hagar_secondary_load_max 4
 set g_balance_hagar_secondary_load_hold 4
 set g_balance_hagar_secondary_load_releasedeath 0
-set g_balance_hagar_secondary_load_abort 1
+set g_balance_hagar_secondary_load_abort 0
 set g_balance_hagar_secondary_load_linkexplode 0
 set g_balance_hagar_secondary_load_animtime 0.2
 set g_balance_hagar_secondary_damage 40
@@ -563,6 +583,8 @@ set g_balance_hagar_secondary_lifetime_min 10
 set g_balance_hagar_secondary_lifetime_rand 0
 set g_balance_hagar_secondary_refire 0.5
 set g_balance_hagar_secondary_ammo 1
+set g_balance_hagar_switchdelay_drop 0.2
+set g_balance_hagar_switchdelay_raise 0.2
 set g_balance_hagar_reload_ammo 0 //default: 25
 set g_balance_hagar_reload_time 2
 // }}}
@@ -590,6 +612,8 @@ set g_balance_rocketlauncher_remote_damage 70
 set g_balance_rocketlauncher_remote_edgedamage 35
 set g_balance_rocketlauncher_remote_radius 110
 set g_balance_rocketlauncher_remote_force 400
+set g_balance_rocketlauncher_switchdelay_drop 0.2
+set g_balance_rocketlauncher_switchdelay_raise 0.2
 set g_balance_rocketlauncher_reload_ammo 0 //default: 25
 set g_balance_rocketlauncher_reload_time 2
 // }}}
@@ -603,6 +627,8 @@ set g_balance_porto_secondary_refire 1.5
 set g_balance_porto_secondary_animtime 0.3
 set g_balance_porto_secondary_speed 1000
 set g_balance_porto_secondary_lifetime 5
+set g_balance_porto_switchdelay_drop 0.2
+set g_balance_porto_switchdelay_raise 0.2
 set g_balance_portal_health 200 // these get recharged whenever the portal is used
 set g_balance_portal_lifetime 15 // these get recharged whenever the portal is used
 // }}}
@@ -626,7 +652,9 @@ set g_balance_hook_secondary_animtime 0.3 // good shoot anim
 set g_balance_hook_secondary_power 3 // effect behaves like a square function
 set g_balance_hook_secondary_duration 1.5 // effect runs for three seconds
 set g_balance_hook_secondary_health 15
-set g_balance_hook_secondary_damageforcescale 0 
+set g_balance_hook_secondary_damageforcescale 0
+set g_balance_hook_switchdelay_drop 0.2
+set g_balance_hook_switchdelay_raise 0.2
 // }}}
 // {{{ tuba
 set g_balance_tuba_refire 0.05
@@ -639,9 +667,11 @@ set g_balance_tuba_edgedamage 0
 set g_balance_tuba_radius 200
 set g_balance_tuba_force 40
 set g_balance_tuba_pitchstep 6
+set g_balance_tuba_switchdelay_drop 0.2
+set g_balance_tuba_switchdelay_raise 0.2
 // }}}
 // {{{ fireball // this is a superweapon -- lets make it behave as one. 
-set g_balance_fireball_primary_animtime 0.4
+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
@@ -675,4 +705,6 @@ set g_balance_fireball_secondary_speed 900
 set g_balance_fireball_secondary_speed_up 100
 set g_balance_fireball_secondary_speed_z 0
 set g_balance_fireball_secondary_spread 0
+set g_balance_fireball_switchdelay_drop 0.2
+set g_balance_fireball_switchdelay_raise 0.2
 // }}}
index c96ea218707c446825ad3d065dda6c66c3c68232..ea82c365f9397feca1a0c58d4ffcbc541c1609a4 100644 (file)
@@ -259,6 +259,8 @@ set g_balance_laser_secondary_gauntlet 0
 set g_balance_laser_secondary_force_zscale 1.25
 set g_balance_laser_secondary_force_velocitybias 0
 set g_balance_laser_secondary_force_other_scale 1
+set g_balance_laser_switchdelay_drop 0.15
+set g_balance_laser_switchdelay_raise 0.15
 set g_balance_laser_reload_ammo 0 //default: 6
 set g_balance_laser_reload_time 2
 // }}}
@@ -286,6 +288,8 @@ set g_balance_shotgun_secondary_damage 80
 set g_balance_shotgun_secondary_force 200
 set g_balance_shotgun_secondary_refire 1.25
 set g_balance_shotgun_secondary_animtime 1
+set g_balance_shotgun_switchdelay_drop 0.2
+set g_balance_shotgun_switchdelay_raise 0.2
 set g_balance_shotgun_reload_ammo 0 //default: 5
 set g_balance_shotgun_reload_time 2
 // }}}
@@ -320,6 +324,9 @@ set g_balance_uzi_sustained_ammo 1
 set g_balance_uzi_speed 18000
 set g_balance_uzi_bulletconstant 115 // 13.1qu
 
+set g_balance_uzi_switchdelay_drop 0.2
+set g_balance_uzi_switchdelay_raise 0.2
+
 set g_balance_uzi_reload_ammo 60 //default: 30
 set g_balance_uzi_reload_time 2
 // }}}
@@ -364,6 +371,9 @@ set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
 set g_balance_grenadelauncher_bouncefactor 0.5
 set g_balance_grenadelauncher_bouncestop 0.075
 
+set g_balance_grenadelauncher_switchdelay_drop 0.2
+set g_balance_grenadelauncher_switchdelay_raise 0.2
+
 set g_balance_grenadelauncher_reload_ammo 0 //default: 12
 set g_balance_grenadelauncher_reload_time 2
 // }}}
@@ -411,6 +421,8 @@ set g_balance_electro_combo_radius 150
 set g_balance_electro_combo_comboradius 300
 set g_balance_electro_combo_speed 2000
 set g_balance_electro_combo_safeammocheck 1
+set g_balance_electro_switchdelay_drop 0.2
+set g_balance_electro_switchdelay_raise 0.2
 set g_balance_electro_reload_ammo 0 //default: 20
 set g_balance_electro_reload_time 2
 // }}}
@@ -471,6 +483,9 @@ set g_balance_crylink_secondary_middle_fadetime 5
 set g_balance_crylink_secondary_line_lifetime 5 
 set g_balance_crylink_secondary_line_fadetime 5
 
+set g_balance_crylink_switchdelay_drop 0.2
+set g_balance_crylink_switchdelay_raise 0.2
+
 set g_balance_crylink_reload_ammo 0 //default: 10
 set g_balance_crylink_reload_time 2
 // }}}
@@ -478,7 +493,7 @@ set g_balance_crylink_reload_time 2
 set g_balance_nex_primary_damage 80
 set g_balance_nex_primary_force 400
 set g_balance_nex_primary_refire 1.5
-set g_balance_nex_primary_animtime 0.5
+set g_balance_nex_primary_animtime 0.6
 set g_balance_nex_primary_ammo 6
 set g_balance_nex_primary_damagefalloff_mindist 0 // 1000    For tZork ;3
 set g_balance_nex_primary_damagefalloff_maxdist 0 // 3000
@@ -515,6 +530,9 @@ set g_balance_nex_charge_velocity_rate 0
 set g_balance_nex_charge_minspeed 400
 set g_balance_nex_charge_maxspeed 800
 
+set g_balance_nex_switchdelay_drop 0.3
+set g_balance_nex_switchdelay_raise 0.3
+
 set g_balance_nex_reload_ammo 0 //default: 25
 set g_balance_nex_reload_time 2
 // }}}
@@ -525,6 +543,8 @@ set g_balance_minstanex_ammo 10
 set g_balance_minstanex_laser_ammo 0
 set g_balance_minstanex_laser_animtime 0.3
 set g_balance_minstanex_laser_refire 0.7
+set g_balance_minstanex_switchdelay_drop 0.2
+set g_balance_minstanex_switchdelay_raise 0.2
 set g_balance_minstanex_reload_ammo 0 //default: 50
 set g_balance_minstanex_reload_time 2
 // }}}
@@ -563,6 +583,8 @@ set g_balance_hagar_secondary_lifetime_min 10
 set g_balance_hagar_secondary_lifetime_rand 0
 set g_balance_hagar_secondary_refire 0.5
 set g_balance_hagar_secondary_ammo 1
+set g_balance_hagar_switchdelay_drop 0.2
+set g_balance_hagar_switchdelay_raise 0.2
 set g_balance_hagar_reload_ammo 0 //default: 25
 set g_balance_hagar_reload_time 2
 // }}}
@@ -590,6 +612,8 @@ set g_balance_rocketlauncher_remote_damage 70
 set g_balance_rocketlauncher_remote_edgedamage 35
 set g_balance_rocketlauncher_remote_radius 110
 set g_balance_rocketlauncher_remote_force 400
+set g_balance_rocketlauncher_switchdelay_drop 0.2
+set g_balance_rocketlauncher_switchdelay_raise 0.2
 set g_balance_rocketlauncher_reload_ammo 0 //default: 25
 set g_balance_rocketlauncher_reload_time 2
 // }}}
@@ -603,6 +627,8 @@ set g_balance_porto_secondary_refire 1.5
 set g_balance_porto_secondary_animtime 0.3
 set g_balance_porto_secondary_speed 1000
 set g_balance_porto_secondary_lifetime 5
+set g_balance_porto_switchdelay_drop 0.2
+set g_balance_porto_switchdelay_raise 0.2
 set g_balance_portal_health 200 // these get recharged whenever the portal is used
 set g_balance_portal_lifetime 15 // these get recharged whenever the portal is used
 // }}}
@@ -626,7 +652,9 @@ set g_balance_hook_secondary_animtime 0.3 // good shoot anim
 set g_balance_hook_secondary_power 3 // effect behaves like a square function
 set g_balance_hook_secondary_duration 1.5 // effect runs for three seconds
 set g_balance_hook_secondary_health 15
-set g_balance_hook_secondary_damageforcescale 0 
+set g_balance_hook_secondary_damageforcescale 0
+set g_balance_hook_switchdelay_drop 0.2
+set g_balance_hook_switchdelay_raise 0.2
 // }}}
 // {{{ tuba
 set g_balance_tuba_refire 0.05
@@ -639,6 +667,8 @@ set g_balance_tuba_edgedamage 0
 set g_balance_tuba_radius 200
 set g_balance_tuba_force 40
 set g_balance_tuba_pitchstep 6
+set g_balance_tuba_switchdelay_drop 0.2
+set g_balance_tuba_switchdelay_raise 0.2
 // }}}
 // {{{ fireball // this is a superweapon -- lets make it behave as one. 
 set g_balance_fireball_primary_animtime 0.2
@@ -675,4 +705,6 @@ set g_balance_fireball_secondary_speed 900
 set g_balance_fireball_secondary_speed_up 100
 set g_balance_fireball_secondary_speed_z 0
 set g_balance_fireball_secondary_spread 0
+set g_balance_fireball_switchdelay_drop 0.2
+set g_balance_fireball_switchdelay_raise 0.2
 // }}}
index e37584bdf5c194c0229765edf283dbf4b787370e..e02e7c2e2ebe50949338d03c0794e6187a174813 100644 (file)
@@ -17,7 +17,7 @@ seta crosshair_dot_color "1 0 0"
 seta crosshair_dot_color_custom 1 "use a custom color for the crosshair dot"
 
 // smooth transitions for crosshair changes
-seta crosshair_effect_speed -1 "how fast (in seconds) some crosshair effects should take place, 0 = instant, -1 = 2x weapon switch time"
+seta crosshair_effect_time 0.4 "how fast (in seconds) some crosshair effects should take place, 0 = instant"
 seta crosshair_effect_scalefade 1 "use scaling and fading for crosshair effects"
 
 // item pickup animation settings
index 930ea1b76d1be99eee2b0ac94f7b8eac3c221b33..06d8c512841040fd45734d8a36e330b9d404e576 100644 (file)
@@ -1027,8 +1027,6 @@ void Ent_Init()
 
        armorblockpercent = ReadByte() / 255.0;
 
-       g_weaponswitchdelay = ReadByte() / 255.0;
-
        g_balance_grenadelauncher_bouncefactor = ReadCoord();
        g_balance_grenadelauncher_bouncestop = ReadCoord();
        g_balance_electro_secondary_bouncefactor = ReadCoord();
index b2e9c03e0ea5659da6b93b5f1c41b0592283e864..08c247f4e2ddd3a418f6a78798b69ba02f7f1c91 100644 (file)
@@ -1294,9 +1294,7 @@ void CSQC_UpdateView(float w, float h)
                        if(shottype == SHOTTYPE_HITTEAM)
                                wcross_scale /= autocvar_crosshair_hittest; // is not queried if hittest is 0
 
-                       f = autocvar_crosshair_effect_speed;
-                       if(f < 0)
-                               f *= -2 * g_weaponswitchdelay; // anim starts when weapon has been lowered and new weapon comes up
+                       f = fabs(autocvar_crosshair_effect_time);
                        if(wcross_scale != wcross_scale_goal_prev || wcross_alpha != wcross_alpha_goal_prev || wcross_color != wcross_color_goal_prev)
                        {
                                wcross_changedonetime = time + f;
@@ -1420,9 +1418,9 @@ void CSQC_UpdateView(float w, float h)
                                        }
 
                                        // if in weapon switch animation, fade ring out/in
-                                       if(g_weaponswitchdelay > 0)
+                                       if(fabs(autocvar_crosshair_effect_time) > 0)
                                        {
-                                               f = (time - wcross_name_changestarttime) / g_weaponswitchdelay;
+                                               f = (time - wcross_name_changestarttime) / wcross_changedonetime;
                                                if(f > 0 && f < 2)
                                                        ring_alpha *= fabs(1 - f);
                                        }
index 16714460b581112b40e7458066b1a22c169b176b..af7008150eadf03b39bebccad78c018f5aaadbdc 100644 (file)
@@ -105,7 +105,7 @@ string autocvar_crosshair_dot_color;
 var float autocvar_crosshair_dot_color_custom = 1;
 float autocvar_crosshair_dot_size;
 float autocvar_crosshair_effect_scalefade;
-float autocvar_crosshair_effect_speed;
+var float autocvar_crosshair_effect_time = 0.2;
 var float autocvar_crosshair_enabled = 1;
 float autocvar_crosshair_hitindication;
 string autocvar_crosshair_hitindication_color;
index 8369a5ff20bc9ce399d0eef7c1a35d1063b4d8a9..10a3b165c89d6ba1cf5c8ea8146e8f7b867b625b 100644 (file)
@@ -127,7 +127,6 @@ void centerprint_generic(float new_id, string strMessage, float duration, float
 #define ALPHA_MIN_VISIBLE 0.003
 
 float armorblockpercent;
-float g_weaponswitchdelay;
 
 //hooks
 float calledhooks;
index 91b89168624346836a382945628e4f35a901c8ed..e6a242a70454a714e47bfbeeb151a875b45789d4 100644 (file)
@@ -688,7 +688,6 @@ float autocvar_g_balance_uzi_sustained_refire;
 float autocvar_g_balance_uzi_sustained_spread;
 float autocvar_g_balance_uzi_reload_ammo;
 float autocvar_g_balance_uzi_reload_time;
-float autocvar_g_balance_weaponswitchdelay;
 float autocvar_g_ballistics_density_corpse;
 float autocvar_g_ballistics_density_player;
 float autocvar_g_ballistics_materialconstant;
index c86ced02e1f327dccf5fcefcb957d4c8489f056e..036bb45fb6dc48f029212faead961db052d00d12 100644 (file)
@@ -629,7 +629,6 @@ float ClientInit_SendEntity(entity to, float sf)
        else
                WriteString(MSG_ENTITY, "");
        WriteByte(MSG_ENTITY, self.count * 255.0); // g_balance_armor_blockpercent
-       WriteByte(MSG_ENTITY, self.cnt * 255.0); // g_balance_weaponswitchdelay
        WriteCoord(MSG_ENTITY, self.bouncefactor); // g_balance_grenadelauncher_bouncefactor
        WriteCoord(MSG_ENTITY, self.bouncestop); // g_balance_grenadelauncher_bouncestop
        WriteCoord(MSG_ENTITY, self.ebouncefactor); // g_balance_grenadelauncher_bouncefactor
@@ -652,11 +651,6 @@ void ClientInit_CheckUpdate()
                self.count = autocvar_g_balance_armor_blockpercent;
                self.SendFlags |= 1;
        }
-       if(self.cnt != autocvar_g_balance_weaponswitchdelay)
-       {
-               self.cnt = autocvar_g_balance_weaponswitchdelay;
-               self.SendFlags |= 1;
-       }
        if(self.bouncefactor != autocvar_g_balance_grenadelauncher_bouncefactor)
        {
                self.bouncefactor = autocvar_g_balance_grenadelauncher_bouncefactor;
index 0014e9182d4f4c864559af9f5982902dbc37efcb..44227fda6bd7dd3ea777ba43e3a70ed3849464ff 100644 (file)
@@ -403,24 +403,24 @@ void W_WeaponFrame()
                        // end switching!
                        self.switchingweapon = self.switchweapon;
 
+                       entity newwep = get_weaponinfo(self.switchweapon);
+
                        //setanim(self, self.anim_draw, FALSE, TRUE, TRUE);
                        self.weaponentity.state = WS_RAISE;
                        weapon_action(self.switchweapon, WR_SETUP);
 
                        // set our clip load to the load of the weapon we switched to, if it's reloadable
-                       entity e;
-                       e = get_weaponinfo(self.switchweapon);
-                       if(e.spawnflags & WEP_FLAG_RELOADABLE && cvar(strcat("g_balance_", e.netname, "_reload_ammo"))) // prevent accessing undefined cvars
+                       if(newwep.spawnflags & WEP_FLAG_RELOADABLE && cvar(strcat("g_balance_", newwep.netname, "_reload_ammo"))) // prevent accessing undefined cvars
                        {
                                self.clip_load = self.(weapon_load[self.switchweapon]);
-                               self.clip_size = cvar(strcat("g_balance_", e.netname, "_reload_ammo"));
+                               self.clip_size = cvar(strcat("g_balance_", newwep.netname, "_reload_ammo"));
                        }
                        else
                                self.clip_load = self.clip_size = 0;
 
                        // VorteX: add player model weapon select frame here
                        // setcustomframe(PlayerWeaponRaise);
-                       weapon_thinkf(WFRAME_IDLE, autocvar_g_balance_weaponswitchdelay, w_ready);
+                       weapon_thinkf(WFRAME_IDLE, cvar(sprintf("g_balance_%s_switchdelay_raise", newwep.netname)), w_ready);
                        weapon_boblayer1(PLAYER_WEAPONSELECTION_SPEED, '0 0 0');
                }
                else if (self.weaponentity.state == WS_DROP)
@@ -433,6 +433,8 @@ void W_WeaponFrame()
                        // start switching!
                        self.switchingweapon = self.switchweapon;
 
+                       entity oldwep = get_weaponinfo(self.weapon);
+                       
 #ifndef INDEPENDENT_ATTACK_FINISHED
                        if(ATTACK_FINISHED(self) <= time + self.weapon_frametime * 0.5)
                        {
@@ -440,7 +442,7 @@ void W_WeaponFrame()
                        sound (self, CH_WEAPON_SINGLE, "weapons/weapon_switch.wav", VOL_BASE, ATTN_NORM);
                        self.weaponentity.state = WS_DROP;
                        // set up weapon switch think in the future, and start drop anim
-                       weapon_thinkf(WFRAME_DONTCHANGE, autocvar_g_balance_weaponswitchdelay, w_clear);
+                       weapon_thinkf(WFRAME_DONTCHANGE, cvar(sprintf("g_balance_%s_switchdelay_drop", oldwep.netname)), w_clear);
                        weapon_boblayer1(PLAYER_WEAPONSELECTION_SPEED, PLAYER_WEAPONSELECTION_RANGE);
 #ifndef INDEPENDENT_ATTACK_FINISHED
                        }
index 7625e9b504ed36c80b7524852f722b7768aef1b6..cda4dc72c423e2ed21b85dea1f5b2596d1c755a8 100644 (file)
@@ -541,15 +541,18 @@ void CL_Weaponentity_Think()
        }
 
        self.angles = '0 0 0';
+       
        float f;
        if (self.state == WS_RAISE && !intermission_running)
        {
-               f = (self.owner.weapon_nextthink - time) * g_weaponratefactor / autocvar_g_balance_weaponswitchdelay;
+               entity newwep = get_weaponinfo(self.owner.switchweapon);
+               f = (self.owner.weapon_nextthink - time) * g_weaponratefactor / cvar(sprintf("g_balance_%s_switchdelay_raise", newwep.netname));
                self.angles_x = -90 * f * f;
        }
        else if (self.state == WS_DROP && !intermission_running)
        {
-               f = 1 - (self.owner.weapon_nextthink - time) * g_weaponratefactor / autocvar_g_balance_weaponswitchdelay;
+               entity oldwep = get_weaponinfo(self.owner.weapon);
+               f = 1 - (self.owner.weapon_nextthink - time) * g_weaponratefactor / cvar(sprintf("g_balance_%s_switchdelay_drop", oldwep.netname));
                self.angles_x = -90 * f * f;
        }
        else if (self.state == WS_CLEAR)
index b2472df2ae0fa5798f7cc3e80de744210cf88827..4cce61bbe021f37bbcb3269bbdb9e14ea6e218b0 100644 (file)
@@ -1,5 +1,15 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(CRYLINK, w_crylink, IT_CELLS, 6, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "crylink", "crylink", _("Crylink"));
+REGISTER_WEAPON(
+/* WEP_##id  */ CRYLINK,
+/* function  */ w_crylink,
+/* ammotype  */ IT_CELLS,
+/* impulse   */ 6,
+/* flags     */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH,
+/* rating    */ BOT_PICKUP_RATING_MID,
+/* model     */ "crylink",
+/* shortname */ "crylink",
+/* fullname  */ _("Crylink")
+);
 #else
 #ifdef SVQC
 .float gravity;
index 29af116bc4977dbd80f7be4311761bdaff1b8b87..649e72374ecc3754ffb6f29b84075854212739e2 100644 (file)
@@ -1,5 +1,15 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(ELECTRO, w_electro, IT_CELLS, 5, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "electro", "electro", _("Electro"));
+REGISTER_WEAPON(
+/* WEP_##id  */ ELECTRO,
+/* function  */ w_electro,
+/* ammotype  */ IT_CELLS,
+/* impulse   */ 5,
+/* flags     */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH,
+/* rating    */ BOT_PICKUP_RATING_MID,
+/* model     */ "electro",
+/* shortname */ "electro",
+/* fullname  */ _("Electro")
+);
 #else
 #ifdef SVQC
 .float electro_count;
index 7d9ef6c04e3a39b937899414abe51c0cee345a59..7bccac949414513b6f2aa50cb21ab896fdb3bdc2 100644 (file)
@@ -1,5 +1,15 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(FIREBALL, w_fireball, 0, 9, WEP_FLAG_SUPERWEAPON | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "fireball", "fireball", _("Fireball"));
+REGISTER_WEAPON(
+/* WEP_##id  */ FIREBALL,
+/* function  */ w_fireball,
+/* ammotype  */ 0,
+/* impulse   */ 9,
+/* flags     */ WEP_FLAG_SUPERWEAPON | WEP_TYPE_SPLASH,
+/* rating    */ BOT_PICKUP_RATING_MID,
+/* model     */ "fireball",
+/* shortname */ "fireball",
+/* fullname  */ _("Fireball")
+);
 #else
 #ifdef SVQC
 .float bot_primary_fireballmooth; // whatever a mooth is
index dcf06ceaa7f168e7e76fc0a549b3ccad62724c65..826740dbf3f80c51cc1c8f684675ae4ce7870273 100644 (file)
@@ -1,5 +1,15 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(GRENADE_LAUNCHER, w_glauncher, IT_ROCKETS, 4, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "gl", "grenadelauncher", _("Mortar"))
+REGISTER_WEAPON(
+/* WEP_##id  */ GRENADE_LAUNCHER,
+/* function  */ w_glauncher,
+/* ammotype  */ IT_ROCKETS,
+/* impulse   */ 4,
+/* flags     */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH,
+/* rating    */ BOT_PICKUP_RATING_MID,
+/* model     */ "gl",
+/* shortname */ "grenadelauncher",
+/* fullname  */ _("Mortar")
+);
 #else
 #ifdef SVQC
 .float gl_detonate_later;
index 4d9a0fabe137652c5ec2c8085d1fdf4868db74c6..0be6ea527e4e20f125eed0586c54b094e092b8db 100644 (file)
@@ -1,5 +1,15 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(HAGAR, w_hagar, IT_ROCKETS, 8, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "hagar", "hagar", _("Hagar"))
+REGISTER_WEAPON(
+/* WEP_##id  */ HAGAR,
+/* function  */ w_hagar,
+/* ammotype  */ IT_ROCKETS,
+/* impulse   */ 8,
+/* flags     */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH,
+/* rating    */ BOT_PICKUP_RATING_MID,
+/* model     */ "hagar",
+/* shortname */ "hagar",
+/* fullname  */ _("Hagar")
+);
 #else
 #ifdef SVQC
 // NO bounce protection, as bounces are limited!
index 142a231923214be2cfd8a91b921fa00e88d56d15..0b5d386fd85aebb6294977b673a512e1c87daa70 100644 (file)
@@ -1,5 +1,15 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(HLAC, w_hlac, IT_CELLS, 6, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "hlac", "hlac", _("Heavy Laser Assault Cannon"))
+REGISTER_WEAPON(
+/* WEP_##id  */ HLAC,
+/* function  */ w_hlac,
+/* ammotype  */ IT_CELLS,
+/* impulse   */ 6,
+/* flags     */ WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH,
+/* rating    */ BOT_PICKUP_RATING_MID,
+/* model     */ "hlac",
+/* shortname */ "hlac",
+/* fullname  */ _("Heavy Laser Assault Cannon")
+);
 #else
 #ifdef SVQC
 
index 1f9dda17b6adcad942d336bd3ea224b2e0416092..998f0723b63219731bfeee6b71880e36acb786fc 100644 (file)
@@ -1,5 +1,15 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(HOOK, w_hook, IT_CELLS|IT_FUEL, 0, WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH, 0, "hookgun", "hook", _("Grappling Hook"))
+REGISTER_WEAPON(
+/* WEP_##id  */ HOOK,
+/* function  */ w_hook,
+/* ammotype  */ IT_CELLS|IT_FUEL,
+/* impulse   */ 0,
+/* flags     */ WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH,
+/* rating    */ 0,
+/* model     */ "hookgun",
+/* shortname */ "hook",
+/* fullname  */ _("Grappling Hook")
+);
 #else
 #ifdef SVQC
 .float dmg;
index f2a4ba281509d6ff7df6a9f17a3d613e684a1b46..d68240c56cc18130107c28b3c71a7c80ba7a7ebd 100644 (file)
@@ -1,5 +1,15 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(LASER, w_laser, 0, 1, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH, 0, "laser", "laser", _("Laser"))
+REGISTER_WEAPON(
+/* WEP_##id  */ LASER,
+/* function  */ w_laser,
+/* ammotype  */ 0,
+/* impulse   */ 1,
+/* flags     */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH,
+/* rating    */ 0,
+/* model     */ "laser",
+/* shortname */ "laser",
+/* fullname  */ _("Laser")
+);
 #else
 #ifdef SVQC
 void(float imp) W_SwitchWeapon;
index 813bcff75508c01b044c43cfef5a48ff92593863..2cc464df6d704fac8ac91836eb42739322d431c3 100644 (file)
@@ -1,5 +1,15 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(MINE_LAYER, w_minelayer, IT_ROCKETS, 4, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_HIGH, "minelayer", "minelayer", _("Mine Layer"))
+REGISTER_WEAPON(
+/* WEP_##id  */ MINE_LAYER,
+/* function  */ w_minelayer,
+/* ammotype  */ IT_ROCKETS,
+/* impulse   */ 4,
+/* flags     */ WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH,
+/* rating    */ BOT_PICKUP_RATING_HIGH,
+/* model     */ "minelayer",
+/* shortname */ "minelayer",
+/* fullname  */ _("Mine Layer")
+);
 #else
 #ifdef SVQC
 void W_Mine_Think (void);
index 2ad71ce798667a92a5fa6d63e0f0b6fc8adca963..4f231a2cb46f5e221db2dfcc89090ed4c5c87c33 100644 (file)
@@ -1,5 +1,15 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(MINSTANEX, w_minstanex, IT_CELLS, 7, WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_FLAG_SUPERWEAPON | WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_HIGH, "minstanex", "minstanex", _("MinstaNex"))
+REGISTER_WEAPON(
+/* WEP_##id  */ MINSTANEX,
+/* function  */ w_minstanex,
+/* ammotype  */ IT_CELLS,
+/* impulse   */ 7,
+/* flags     */ WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_FLAG_SUPERWEAPON | WEP_TYPE_HITSCAN,
+/* rating    */ BOT_PICKUP_RATING_HIGH,
+/* model     */ "minstanex",
+/* shortname */ "minstanex",
+/* fullname  */ _("MinstaNex")
+);
 #else
 #ifdef SVQC
 .float minstanex_lasthit;
index 23dcce96d81a73fa8e2e3ab2e51cd56dbb2189cf..dc3c30ff6123692543bb051949741febc5ed8804 100644 (file)
@@ -1,5 +1,15 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(NEX, w_nex, IT_CELLS, 7, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_HIGH, "nex", "nex", _("Nex"))
+REGISTER_WEAPON(
+/* WEP_##id  */ NEX,
+/* function  */ w_nex,
+/* ammotype  */ IT_CELLS,
+/* impulse   */ 7,
+/* flags     */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN,
+/* rating    */ BOT_PICKUP_RATING_HIGH,
+/* model     */ "nex",
+/* shortname */ "nex",
+/* fullname  */ _("Nex")
+);
 #else
 #ifdef SVQC
 
index 790bcd124c588deff469d8d258bed5b919009d3e..7ccbc3f3d356f38f291dfd92ebe75e1c58221e34 100644 (file)
@@ -1,5 +1,15 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(PORTO, w_porto, 0, 0, WEP_TYPE_OTHER | WEP_FLAG_SUPERWEAPON, 0, "porto" , "porto", _("Port-O-Launch"))
+REGISTER_WEAPON(
+/* WEP_##id  */ PORTO,
+/* function  */ w_porto,
+/* ammotype  */ 0,
+/* impulse   */ 0,
+/* flags     */ WEP_TYPE_OTHER | WEP_FLAG_SUPERWEAPON,
+/* rating    */ 0,
+/* model     */ "porto" ,
+/* shortname */ "porto",
+/* fullname  */ _("Port-O-Launch")
+);
 #else
 #ifdef SVQC
 .entity porto_current;
index 749906638bf0e2ab56e782516983ebeda7dcdb01..8ed4491d7d6b921efbe9392d77ae3ed9aec6a432 100644 (file)
@@ -1,5 +1,15 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(RIFLE, w_rifle, IT_NAILS, 7, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_MID, "campingrifle", "rifle", _("Rifle"))
+REGISTER_WEAPON(
+/* WEP_##id  */ RIFLE,
+/* function  */ w_rifle,
+/* ammotype  */ IT_NAILS,
+/* impulse   */ 7,
+/* flags     */ WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN,
+/* rating    */ BOT_PICKUP_RATING_MID,
+/* model     */ "campingrifle",
+/* shortname */ "rifle",
+/* fullname  */ _("Rifle")
+);
 #else
 #ifdef SVQC
 
index 7548de88d5cfb96ed70c727f6b264ced34c71fb7..55b3379fc8aedd3d69335f428eec0256bcd2b4df 100644 (file)
@@ -1,5 +1,15 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(ROCKET_LAUNCHER, w_rlauncher, IT_ROCKETS, 9, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_HIGH, "rl", "rocketlauncher", _("Rocket Launcher"))
+REGISTER_WEAPON(
+/* WEP_##id  */ ROCKET_LAUNCHER,
+/* function  */ w_rlauncher,
+/* ammotype  */ IT_ROCKETS,
+/* impulse   */ 9,
+/* flags     */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH,
+/* rating    */ BOT_PICKUP_RATING_HIGH,
+/* model     */ "rl",
+/* shortname */ "rocketlauncher",
+/* fullname  */ _("Rocket Launcher")
+);
 #else
 #ifdef SVQC
 .float rl_release;
index 7dbe4aed10ba4c462fc8cbca281cbc34f128eaba..61d72708c2f9b8935c4e7c172ac53ce04fbb3111 100644 (file)
@@ -1,5 +1,15 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(SEEKER, w_seeker, IT_ROCKETS, 8, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "seeker", "seeker", _("T.A.G. Seeker"))
+REGISTER_WEAPON(
+/* WEP_##id  */ SEEKER,
+/* function  */ w_seeker,
+/* ammotype  */ IT_ROCKETS,
+/* impulse   */ 8,
+/* flags     */ WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH,
+/* rating    */ BOT_PICKUP_RATING_MID,
+/* model     */ "seeker",
+/* shortname */ "seeker",
+/* fullname  */ _("T.A.G. Seeker")
+);
 #else
 #ifdef SVQC
 //.float proxytime; = autoswitch
index b9a0dba0cf4b0eb2a76a15377c45c4301b90d628..6c6658d931dc7431ca06380e0cd936feedd2a464 100644 (file)
@@ -1,5 +1,15 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(SHOTGUN, w_shotgun, IT_SHELLS, 2, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_LOW, "shotgun", "shotgun", _("Shotgun"))
+REGISTER_WEAPON(
+/* WEP_##id  */ SHOTGUN,
+/* function  */ w_shotgun,
+/* ammotype  */ IT_SHELLS,
+/* impulse   */ 2,
+/* flags     */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN,
+/* rating    */ BOT_PICKUP_RATING_LOW,
+/* model     */ "shotgun",
+/* shortname */ "shotgun",
+/* fullname  */ _("Shotgun")
+);
 #else
 #ifdef SVQC
 
index 6b3287b59ed1ee29b1e0ee8228e89e819f0b04b0..71ea3ddbb73033c73e58d6f345abc2d5d724f052 100644 (file)
@@ -1,5 +1,15 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(TUBA, w_tuba, 0, 1, WEP_FLAG_HIDDEN | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "tuba", "tuba", _("@!#%'n Tuba"))
+REGISTER_WEAPON(
+/* WEP_##id  */ TUBA,
+/* function  */ w_tuba,
+/* ammotype  */ 0,
+/* impulse   */ 1,
+/* flags     */ WEP_FLAG_HIDDEN | WEP_TYPE_SPLASH,
+/* rating    */ BOT_PICKUP_RATING_MID,
+/* model     */ "tuba",
+/* shortname */ "tuba",
+/* fullname  */ _("@!#%'n Tuba")
+);
 #else
 #ifdef SVQC
 //#define TUBA_NOTE(n) strcat("weapons/tuba_note", ftos(n), ".wav")
index 3645b95db83f12c969e22e37fcdf1be8abb19c4d..923ed9504c9f075f7c917981689d76d3cd4ecd9c 100644 (file)
@@ -1,5 +1,15 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(UZI, w_uzi, IT_NAILS, 3, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_MID, "uzi", "uzi", _("Machine Gun"))
+REGISTER_WEAPON(
+/* WEP_##id  */ UZI,
+/* function  */ w_uzi,
+/* ammotype  */ IT_NAILS,
+/* impulse   */ 3,
+/* flags     */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN,
+/* rating    */ BOT_PICKUP_RATING_MID,
+/* model     */ "uzi",
+/* shortname */ "uzi",
+/* fullname  */ _("Machine Gun")
+);
 #else
 #ifdef SVQC