From ceadafbce4d70ec7ac772c66b32a703aa00e88a5 Mon Sep 17 00:00:00 2001 From: FruitieX Date: Mon, 19 Jul 2010 00:22:41 +0300 Subject: [PATCH] fix ammo usage, and revert the size change to the electro blobs, it's not even needed... (to prevent affecting other balances, also seemed to have some bugs like blobs falling through the floor at times (???)) --- balanceFruit.cfg | 34 +++++++++++++++++----------------- qcsrc/server/w_electro.qc | 31 ++++++++++++++++++++----------- 2 files changed, 37 insertions(+), 28 deletions(-) diff --git a/balanceFruit.cfg b/balanceFruit.cfg index e48eba308..d010748fa 100644 --- a/balanceFruit.cfg +++ b/balanceFruit.cfg @@ -18,7 +18,7 @@ set g_start_weapon_fireball 0 "0 = never provide the weapon, 1 = always provide set g_start_weapon_seeker 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_balance_health_start 125 set g_balance_armor_start 0 -set g_start_ammo_shells 20 +set g_start_ammo_shells 14 set g_start_ammo_nails 0 set g_start_ammo_rockets 0 set g_start_ammo_cells 0 @@ -54,12 +54,12 @@ 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 15 -set g_pickup_shells_max 100 -set g_pickup_nails 150 +set g_pickup_shells 10 +set g_pickup_shells_max 30 +set g_pickup_nails 120 set g_pickup_nails_max 300 set g_pickup_rockets 15 -set g_pickup_rockets_max 200 +set g_pickup_rockets_max 150 set g_pickup_cells 25 set g_pickup_cells_max 200 set g_pickup_fuel 25 @@ -303,12 +303,12 @@ set g_balance_grenadelauncher_secondary_bouncestop 0.075 // }}} // {{{ electro // TODO set g_balance_electro_lightning 1 -set g_balance_electro_primary_damage 120 +set g_balance_electro_primary_damage 100 set g_balance_electro_primary_edgedamage 0 set g_balance_electro_primary_force 900 set g_balance_electro_primary_force_up 100 set g_balance_electro_primary_radius 850 -set g_balance_electro_primary_comboradius 30 +set g_balance_electro_primary_comboradius 45 set g_balance_electro_primary_speed 0 set g_balance_electro_primary_spread 0 set g_balance_electro_primary_lifetime 0 @@ -316,26 +316,26 @@ set g_balance_electro_primary_refire 0.03333333 set g_balance_electro_primary_animtime 0.03333333 set g_balance_electro_primary_ammo 1 set g_balance_electro_primary_range 800 -set g_balance_electro_secondary_damage 30 -set g_balance_electro_secondary_spread 0.05 +set g_balance_electro_secondary_damage 50 +set g_balance_electro_secondary_spread 0 set g_balance_electro_secondary_edgedamage 0 set g_balance_electro_secondary_force 100 set g_balance_electro_secondary_radius 100 -set g_balance_electro_secondary_speed 700 +set g_balance_electro_secondary_speed 800 set g_balance_electro_secondary_speed_up 0 set g_balance_electro_secondary_speed_z 200 -set g_balance_electro_secondary_spread 0.15 -set g_balance_electro_secondary_lifetime 2.5 -set g_balance_electro_secondary_refire 0.2 -set g_balance_electro_secondary_refire2 1 -set g_balance_electro_secondary_animtime 0.2 +set g_balance_electro_secondary_spread 0.08 +set g_balance_electro_secondary_lifetime 3 +set g_balance_electro_secondary_refire 0.6 +set g_balance_electro_secondary_refire2 0 +set g_balance_electro_secondary_animtime 0.6 set g_balance_electro_secondary_ammo 2 set g_balance_electro_secondary_health 5 set g_balance_electro_secondary_damageforcescale 4 set g_balance_electro_secondary_count 3 -set g_balance_electro_combo_damage 30 +set g_balance_electro_combo_damage 50 set g_balance_electro_combo_edgedamage 0 -set g_balance_electro_combo_force 130 +set g_balance_electro_combo_force 150 set g_balance_electro_combo_radius 250 set g_balance_electro_combo_comboradius 0 set g_balance_electro_combo_speed 2000 diff --git a/qcsrc/server/w_electro.qc b/qcsrc/server/w_electro.qc index 42b9887ce..1959d9a98 100644 --- a/qcsrc/server/w_electro.qc +++ b/qcsrc/server/w_electro.qc @@ -142,7 +142,7 @@ void W_Electro_Attack2() { local entity proj; - W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 2, "weapons/electro_fire2.wav", cvar("g_balance_electro_secondary_damage")); + W_SetupShot_ProjectileSize (self, '0 0 -4', '0 0 -4', FALSE, 2, "weapons/electro_fire2.wav", cvar("g_balance_electro_secondary_damage")); w_shotdir = v_forward; // no TrueAim for grenades please pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); @@ -166,7 +166,7 @@ void W_Electro_Attack2() proj.movetype = MOVETYPE_BOUNCE; W_SETUPPROJECTILEVELOCITY_UP(proj, g_balance_electro_secondary); proj.touch = W_Plasma_Touch; - setsize(proj, '-3 -3 -3', '3 3 3'); + setsize(proj, '0 0 -4', '0 0 -4'); proj.takedamage = DAMAGE_YES; proj.damageforcescale = cvar("g_balance_electro_secondary_damageforcescale"); proj.health = cvar("g_balance_electro_secondary_health"); @@ -208,6 +208,7 @@ void lgbeam_think() self.scale = vlen(self.owner.origin - trace_endpos) / 256 * (0.75 + 0.75 * random()); } +// execute each frame to update the beam visuals, but only apply damage at intervals of "refire" to prevent massive hitsound spam void exteriorlgbeam_think() { if (self.owner.weaponentity.state != WS_INUSE || (self.owner.ammo_cells <= 0 && !(self.owner.items & IT_UNLIMITED_WEAPON_AMMO)) || self != self.owner.exteriorlgbeam || self.owner.BUTTON_ATCK == 0) @@ -231,16 +232,19 @@ void exteriorlgbeam_think() traceline_antilag(self.owner, self.owner.origin + self.owner.view_ofs, self.owner.origin + self.owner.view_ofs + angle * cvar("g_balance_electro_primary_range"), FALSE, self.owner, ANTILAG_LATENCY(self.owner)); - // apply the damage - if(trace_fraction < 1 && self.nextdamagethink <= time) + if(self.nextdamagethink <= time) { - if not(self.items & IT_UNLIMITED_WEAPON_AMMO) - self.ammo_cells = max(0, self.ammo_cells - cvar("g_balance_electro_primary_ammo") * cvar("g_balance_electro_primary_refire")); + if not(self.owner.items & IT_UNLIMITED_WEAPON_AMMO) + self.owner.ammo_cells = max(0, self.owner.ammo_cells - cvar("g_balance_electro_primary_ammo") * cvar("g_balance_electro_primary_refire")); - vector force; - force = angle * cvar("g_balance_electro_primary_force") + '0 0 1' * cvar("g_balance_electro_primary_force_up"); - Damage (trace_ent, self.owner, self.owner, cvar("g_balance_electro_primary_damage") * cvar("g_balance_electro_primary_refire"), WEP_ELECTRO, trace_endpos, force * cvar("g_balance_electro_primary_refire")); - W_Plasma_TriggerCombo(trace_endpos, cvar("g_balance_electro_primary_comboradius"), self.owner); + // apply the damage + if(trace_fraction < 1) + { + vector force; + force = angle * cvar("g_balance_electro_primary_force") + '0 0 1' * cvar("g_balance_electro_primary_force_up"); + Damage (trace_ent, self.owner, self.owner, cvar("g_balance_electro_primary_damage") * cvar("g_balance_electro_primary_refire"), WEP_ELECTRO, trace_endpos, force * cvar("g_balance_electro_primary_refire")); + W_Plasma_TriggerCombo(trace_endpos, cvar("g_balance_electro_primary_comboradius"), self.owner); + } self.nextdamagethink = time + cvar("g_balance_electro_primary_refire"); } @@ -402,7 +406,12 @@ float w_electro(float req) else if (req == WR_SETUP) weapon_setup(WEP_ELECTRO); else if (req == WR_CHECKAMMO1) - return self.ammo_cells >= cvar("g_balance_electro_primary_ammo"); + { + if(cvar("g_balance_electro_lightning")) + return self.ammo_cells >= cvar("g_balance_electro_primary_ammo") * cvar("g_balance_electro_primary_refire"); + else + return self.ammo_cells >= cvar("g_balance_electro_primary_ammo"); + } else if (req == WR_CHECKAMMO2) return self.ammo_cells >= cvar("g_balance_electro_secondary_ammo"); else if (req == WR_RESETPLAYER) -- 2.39.2