From 66bfd8d779c4753d9ea5b097d3a6b0c084d89acd Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Fri, 11 Feb 2011 19:06:21 +0200 Subject: [PATCH] Stop sending ammo type in W_Reload, now that we update self.current_ammo in WR_SETUP for each weapon. --- qcsrc/server/cl_weaponsystem.qc | 3 +-- qcsrc/server/w_crylink.qc | 2 +- qcsrc/server/w_electro.qc | 2 +- qcsrc/server/w_fireball.qc | 2 +- qcsrc/server/w_grenadelauncher.qc | 2 +- qcsrc/server/w_hagar.qc | 2 +- qcsrc/server/w_hlac.qc | 2 +- qcsrc/server/w_laser.qc | 2 +- qcsrc/server/w_minelayer.qc | 2 +- qcsrc/server/w_minstanex.qc | 2 +- qcsrc/server/w_nex.qc | 2 +- qcsrc/server/w_rocketlauncher.qc | 2 +- qcsrc/server/w_seeker.qc | 2 +- qcsrc/server/w_shotgun.qc | 2 +- qcsrc/server/w_sniperrifle.qc | 2 +- qcsrc/server/w_uzi.qc | 2 +- 16 files changed, 16 insertions(+), 17 deletions(-) diff --git a/qcsrc/server/cl_weaponsystem.qc b/qcsrc/server/cl_weaponsystem.qc index cea3c92fc..c04bbd257 100644 --- a/qcsrc/server/cl_weaponsystem.qc +++ b/qcsrc/server/cl_weaponsystem.qc @@ -1717,9 +1717,8 @@ void W_ReloadStart() self.clip_load = -1; } -void W_Reload(.float sent_ammo_player, float sent_ammo_min, float sent_ammo_amount, float sent_time, string sent_sound) +void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, string sent_sound) { - //self.current_ammo = sent_ammo_player; self.reload_ammo_min = sent_ammo_min; self.reload_ammo_amount = sent_ammo_amount; self.reload_time = sent_time; diff --git a/qcsrc/server/w_crylink.qc b/qcsrc/server/w_crylink.qc index 410980775..974e5a94b 100644 --- a/qcsrc/server/w_crylink.qc +++ b/qcsrc/server/w_crylink.qc @@ -625,7 +625,7 @@ float w_crylink(float req) } else if (req == WR_RELOAD) { - W_Reload(ammo_cells, min(autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_secondary_ammo), autocvar_g_balance_crylink_reload_ammo, autocvar_g_balance_crylink_reload_time, "weapons/reload.wav"); + W_Reload(min(autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_secondary_ammo), autocvar_g_balance_crylink_reload_ammo, autocvar_g_balance_crylink_reload_time, "weapons/reload.wav"); } return TRUE; }; diff --git a/qcsrc/server/w_electro.qc b/qcsrc/server/w_electro.qc index 31686c821..a9f927db1 100644 --- a/qcsrc/server/w_electro.qc +++ b/qcsrc/server/w_electro.qc @@ -525,7 +525,7 @@ float w_electro(float req) } else if (req == WR_RELOAD) { - W_Reload(ammo_cells, min(autocvar_g_balance_electro_primary_ammo, autocvar_g_balance_electro_secondary_ammo), autocvar_g_balance_electro_reload_ammo, autocvar_g_balance_electro_reload_time, "weapons/reload.wav"); + W_Reload(min(autocvar_g_balance_electro_primary_ammo, autocvar_g_balance_electro_secondary_ammo), autocvar_g_balance_electro_reload_ammo, autocvar_g_balance_electro_reload_time, "weapons/reload.wav"); } return TRUE; }; diff --git a/qcsrc/server/w_fireball.qc b/qcsrc/server/w_fireball.qc index 65b944ffe..e7dec2393 100644 --- a/qcsrc/server/w_fireball.qc +++ b/qcsrc/server/w_fireball.qc @@ -384,7 +384,7 @@ float w_fireball(float req) if(self.ammo_fuel < 1) self.ammo_fuel = 0; - W_Reload(ammo_fuel, min(autocvar_g_balance_fireball_primary_ammo, autocvar_g_balance_fireball_secondary_ammo), autocvar_g_balance_fireball_reload_ammo, autocvar_g_balance_fireball_reload_time, "weapons/reload.wav"); + W_Reload(min(autocvar_g_balance_fireball_primary_ammo, autocvar_g_balance_fireball_secondary_ammo), autocvar_g_balance_fireball_reload_ammo, autocvar_g_balance_fireball_reload_time, "weapons/reload.wav"); } return TRUE; }; diff --git a/qcsrc/server/w_grenadelauncher.qc b/qcsrc/server/w_grenadelauncher.qc index a50f47d37..82cca4490 100644 --- a/qcsrc/server/w_grenadelauncher.qc +++ b/qcsrc/server/w_grenadelauncher.qc @@ -352,7 +352,7 @@ float w_glauncher(float req) } else if (req == WR_RELOAD) { - W_Reload(ammo_rockets, min(autocvar_g_balance_grenadelauncher_primary_ammo, autocvar_g_balance_grenadelauncher_secondary_ammo), autocvar_g_balance_grenadelauncher_reload_ammo, autocvar_g_balance_grenadelauncher_reload_time, "weapons/reload.wav"); + W_Reload(min(autocvar_g_balance_grenadelauncher_primary_ammo, autocvar_g_balance_grenadelauncher_secondary_ammo), autocvar_g_balance_grenadelauncher_reload_ammo, autocvar_g_balance_grenadelauncher_reload_time, "weapons/reload.wav"); } return TRUE; }; diff --git a/qcsrc/server/w_hagar.qc b/qcsrc/server/w_hagar.qc index 7a6adffa9..92ca4ba00 100644 --- a/qcsrc/server/w_hagar.qc +++ b/qcsrc/server/w_hagar.qc @@ -176,7 +176,7 @@ float w_hagar(float req) } else if (req == WR_RELOAD) { - W_Reload(ammo_rockets, min(autocvar_g_balance_hagar_primary_ammo, autocvar_g_balance_hagar_secondary_ammo), autocvar_g_balance_hagar_reload_ammo, autocvar_g_balance_hagar_reload_time, "weapons/reload.wav"); + W_Reload(min(autocvar_g_balance_hagar_primary_ammo, autocvar_g_balance_hagar_secondary_ammo), autocvar_g_balance_hagar_reload_ammo, autocvar_g_balance_hagar_reload_time, "weapons/reload.wav"); } return TRUE; }; diff --git a/qcsrc/server/w_hlac.qc b/qcsrc/server/w_hlac.qc index 1809ab177..6d579cf48 100644 --- a/qcsrc/server/w_hlac.qc +++ b/qcsrc/server/w_hlac.qc @@ -215,7 +215,7 @@ float w_hlac(float req) } else if (req == WR_RELOAD) { - W_Reload(ammo_cells, min(autocvar_g_balance_hlac_primary_ammo, autocvar_g_balance_hlac_secondary_ammo), autocvar_g_balance_hlac_reload_ammo, autocvar_g_balance_hlac_reload_time, "weapons/reload.wav"); + W_Reload(min(autocvar_g_balance_hlac_primary_ammo, autocvar_g_balance_hlac_secondary_ammo), autocvar_g_balance_hlac_reload_ammo, autocvar_g_balance_hlac_reload_time, "weapons/reload.wav"); } return TRUE; }; diff --git a/qcsrc/server/w_laser.qc b/qcsrc/server/w_laser.qc index 9ba19f9d5..3bda4114f 100644 --- a/qcsrc/server/w_laser.qc +++ b/qcsrc/server/w_laser.qc @@ -281,7 +281,7 @@ float w_laser(float req) } else if (req == WR_RELOAD) { - W_Reload(zero_ammo, 0, autocvar_g_balance_laser_reload_ammo, autocvar_g_balance_laser_reload_time, "weapons/reload.wav"); + W_Reload(0, autocvar_g_balance_laser_reload_ammo, autocvar_g_balance_laser_reload_time, "weapons/reload.wav"); } return TRUE; }; diff --git a/qcsrc/server/w_minelayer.qc b/qcsrc/server/w_minelayer.qc index b52493fd5..b475989d6 100644 --- a/qcsrc/server/w_minelayer.qc +++ b/qcsrc/server/w_minelayer.qc @@ -439,7 +439,7 @@ float w_minelayer(float req) } else if (req == WR_RELOAD) { - W_Reload(ammo_rockets, autocvar_g_balance_minelayer_ammo, autocvar_g_balance_minelayer_reload_ammo, autocvar_g_balance_minelayer_reload_time, "weapons/reload.wav"); + W_Reload(autocvar_g_balance_minelayer_ammo, autocvar_g_balance_minelayer_reload_ammo, autocvar_g_balance_minelayer_reload_time, "weapons/reload.wav"); } return TRUE; }; diff --git a/qcsrc/server/w_minstanex.qc b/qcsrc/server/w_minstanex.qc index d5dd7d0f6..b826b9854 100644 --- a/qcsrc/server/w_minstanex.qc +++ b/qcsrc/server/w_minstanex.qc @@ -263,7 +263,7 @@ float w_minstanex(float req) else used_ammo = autocvar_g_balance_minstanex_ammo; - W_Reload(ammo_cells, used_ammo, autocvar_g_balance_minstanex_reload_ammo, autocvar_g_balance_minstanex_reload_time, "weapons/reload.wav"); + W_Reload(used_ammo, autocvar_g_balance_minstanex_reload_ammo, autocvar_g_balance_minstanex_reload_time, "weapons/reload.wav"); } return TRUE; }; diff --git a/qcsrc/server/w_nex.qc b/qcsrc/server/w_nex.qc index 670d8a3eb..482e216df 100644 --- a/qcsrc/server/w_nex.qc +++ b/qcsrc/server/w_nex.qc @@ -237,7 +237,7 @@ float w_nex(float req) } else if (req == WR_RELOAD) { - W_Reload(ammo_cells, min(autocvar_g_balance_nex_primary_ammo, autocvar_g_balance_nex_secondary_ammo), autocvar_g_balance_nex_reload_ammo, autocvar_g_balance_nex_reload_time, "weapons/reload.wav"); + W_Reload(min(autocvar_g_balance_nex_primary_ammo, autocvar_g_balance_nex_secondary_ammo), autocvar_g_balance_nex_reload_ammo, autocvar_g_balance_nex_reload_time, "weapons/reload.wav"); } return TRUE; diff --git a/qcsrc/server/w_rocketlauncher.qc b/qcsrc/server/w_rocketlauncher.qc index 8e45a61da..36dbd8af8 100644 --- a/qcsrc/server/w_rocketlauncher.qc +++ b/qcsrc/server/w_rocketlauncher.qc @@ -476,7 +476,7 @@ float w_rlauncher(float req) } else if (req == WR_RELOAD) { - W_Reload(ammo_rockets, autocvar_g_balance_rocketlauncher_ammo, autocvar_g_balance_rocketlauncher_reload_ammo, autocvar_g_balance_rocketlauncher_reload_time, "weapons/reload.wav"); + W_Reload(autocvar_g_balance_rocketlauncher_ammo, autocvar_g_balance_rocketlauncher_reload_ammo, autocvar_g_balance_rocketlauncher_reload_time, "weapons/reload.wav"); } return TRUE; }; diff --git a/qcsrc/server/w_seeker.qc b/qcsrc/server/w_seeker.qc index cfe7df634..a08496660 100644 --- a/qcsrc/server/w_seeker.qc +++ b/qcsrc/server/w_seeker.qc @@ -467,7 +467,7 @@ float w_seeker(float req) } else if (req == WR_RELOAD) { - W_Reload(ammo_rockets, min(autocvar_g_balance_seeker_missile_ammo, autocvar_g_balance_seeker_tag_ammo), autocvar_g_balance_seeker_reload_ammo, autocvar_g_balance_seeker_reload_time, "weapons/reload.wav"); + W_Reload(min(autocvar_g_balance_seeker_missile_ammo, autocvar_g_balance_seeker_tag_ammo), autocvar_g_balance_seeker_reload_ammo, autocvar_g_balance_seeker_reload_time, "weapons/reload.wav"); } return TRUE; }; diff --git a/qcsrc/server/w_shotgun.qc b/qcsrc/server/w_shotgun.qc index 538e1de27..38e7fef8d 100644 --- a/qcsrc/server/w_shotgun.qc +++ b/qcsrc/server/w_shotgun.qc @@ -167,7 +167,7 @@ float w_shotgun(float req) } else if (req == WR_RELOAD) { - W_Reload(ammo_shells, autocvar_g_balance_shotgun_primary_ammo, autocvar_g_balance_shotgun_reload_ammo, autocvar_g_balance_shotgun_reload_time, "weapons/reload.wav"); + W_Reload(autocvar_g_balance_shotgun_primary_ammo, autocvar_g_balance_shotgun_reload_ammo, autocvar_g_balance_shotgun_reload_time, "weapons/reload.wav"); } return TRUE; }; diff --git a/qcsrc/server/w_sniperrifle.qc b/qcsrc/server/w_sniperrifle.qc index deeab0ad0..0b5ae414d 100644 --- a/qcsrc/server/w_sniperrifle.qc +++ b/qcsrc/server/w_sniperrifle.qc @@ -200,7 +200,7 @@ float w_sniperrifle(float req) } else if (req == WR_RELOAD) { - W_Reload(ammo_nails, min(autocvar_g_balance_sniperrifle_primary_ammo, autocvar_g_balance_sniperrifle_secondary_ammo), autocvar_g_balance_sniperrifle_reload_ammo, autocvar_g_balance_sniperrifle_reload_time, "weapons/reload.wav"); + W_Reload(min(autocvar_g_balance_sniperrifle_primary_ammo, autocvar_g_balance_sniperrifle_secondary_ammo), autocvar_g_balance_sniperrifle_reload_ammo, autocvar_g_balance_sniperrifle_reload_time, "weapons/reload.wav"); } return TRUE; }; diff --git a/qcsrc/server/w_uzi.qc b/qcsrc/server/w_uzi.qc index 8903ba810..eb9e08b20 100644 --- a/qcsrc/server/w_uzi.qc +++ b/qcsrc/server/w_uzi.qc @@ -284,7 +284,7 @@ float w_uzi(float req) } else if (req == WR_RELOAD) { - W_Reload(ammo_nails, min(max(autocvar_g_balance_uzi_sustained_ammo, autocvar_g_balance_uzi_first_ammo), autocvar_g_balance_uzi_burst_ammo), autocvar_g_balance_uzi_reload_ammo, autocvar_g_balance_uzi_reload_time, "weapons/reload.wav"); + W_Reload(min(max(autocvar_g_balance_uzi_sustained_ammo, autocvar_g_balance_uzi_first_ammo), autocvar_g_balance_uzi_burst_ammo), autocvar_g_balance_uzi_reload_ammo, autocvar_g_balance_uzi_reload_time, "weapons/reload.wav"); } return TRUE; }; -- 2.39.2