From a26b4d2f4beb1fd1054374fc58c2067d2e3bbb33 Mon Sep 17 00:00:00 2001 From: lordhavoc Date: Tue, 19 Apr 2005 10:08:56 +0000 Subject: [PATCH] added many g_balance cvars and renamed cl_weapon_ cvars to use the g_viewweapon_ prefix git-svn-id: svn://svn.icculus.org/nexuiz/trunk@371 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- qcsrc/gamec/cl_client.c | 23 +++++++++++++------ qcsrc/gamec/cl_weapons.c | 4 ++-- qcsrc/gamec/w_crylink.c | 16 ++++++------- qcsrc/gamec/w_electro.c | 8 +++---- qcsrc/gamec/w_grenadelauncher.c | 9 ++------ qcsrc/gamec/w_hagar.c | 8 +++---- qcsrc/gamec/w_laser.c | 33 +-------------------------- qcsrc/gamec/w_nex.c | 8 +++---- qcsrc/gamec/w_rocketlauncher.c | 5 ++--- qcsrc/gamec/w_shotgun.c | 18 +++++++-------- qcsrc/gamec/w_uzi.c | 40 ++++++++++++++++----------------- 11 files changed, 68 insertions(+), 104 deletions(-) diff --git a/qcsrc/gamec/cl_client.c b/qcsrc/gamec/cl_client.c index 27555a558..4d17521f9 100644 --- a/qcsrc/gamec/cl_client.c +++ b/qcsrc/gamec/cl_client.c @@ -75,7 +75,8 @@ void PutClientInServer (void) self.flags = FL_CLIENT; self.takedamage = DAMAGE_YES; self.effects = 0; - self.health = cvar("g_balance_health"); + self.health = cvar("g_balance_health_start"); + self.armorvalue = cvar("g_balance_armor_start"); self.damageforcescale = 2; self.death_time = 0; self.dead_time = 0; @@ -449,7 +450,7 @@ void player_powerups (void) if (time > self.invincible_finished) { self.items = self.items - (self.items & IT_INVINCIBLE); - sprint(self, "^3Invincible has worn off\n"); + sprint(self, "^3Shield has worn off\n"); } } else @@ -457,17 +458,25 @@ void player_powerups (void) if (time < self.invincible_finished) { self.items = self.items | IT_INVINCIBLE; - sprint(self, "^3Invincible shielding surrounds you\n"); + sprint(self, "^3Shield surrounds you\n"); } } } void player_regen (void) { - if (self.health >= 100 || time > self.pain_finished) - self.health = bound(0, self.health + (100 - self.health) * cvar("g_balance_healthregen") * frametime, 1000); - if (self.armorvalue > 100) - self.armorvalue = bound(100, self.armorvalue + (100 - self.armorvalue) * cvar("g_balance_armorrott") * frametime, 1000); + local float maxh; + local float maxa; + maxh = cvar("g_balance_health_stable"); + maxa = cvar("g_balance_armor_stable"); + if (self.health > maxh) + self.health = bound(0, self.health + (maxh - self.health) * cvar("g_balance_health_rot") * frametime, 1000); + else if (time > self.pain_finished) + self.health = bound(0, self.health + (maxh- self.health) * cvar("g_balance_health_regen") * frametime, 1000); + if (self.armorvalue > maxa) + self.armorvalue = bound(0, self.armorvalue + (maxa - self.armorvalue) * cvar("g_balance_armor_rot") * frametime, 1000); + else if (time > self.pain_finished) + self.armorvalue = bound(0, self.armorvalue + (maxa - self.armorvalue) * cvar("g_balance_armor_regen") * frametime, 1000); } /* diff --git a/qcsrc/gamec/cl_weapons.c b/qcsrc/gamec/cl_weapons.c index 1bee32cd0..0bc9972af 100644 --- a/qcsrc/gamec/cl_weapons.c +++ b/qcsrc/gamec/cl_weapons.c @@ -123,8 +123,8 @@ void() W_WeaponFrame = local float bobintensity, q1pitching, framespeed, diff; local vector vel, realorg, layer1, layer2, boblayer; - bobintensity = cvar("cl_weapon_bobintensity"); // weapon bob intensity - q1pitching = fabs(cvar("cl_weapon_q1pitching")); // q1 style of "bob" when looking up and down + bobintensity = cvar("g_viewweapon_bobintensity"); // weapon bob intensity + q1pitching = fabs(cvar("g_viewweapon_q1pitching")); // q1 style of "bob" when looking up and down realorg = self.weaponentity.origin + self.weaponentity.view_ofs; realorg = realorg - self.weaponentity.finaldest; // finaldest is last bob position diff --git a/qcsrc/gamec/w_crylink.c b/qcsrc/gamec/w_crylink.c index 7f24dd22c..5c4ed75e4 100644 --- a/qcsrc/gamec/w_crylink.c +++ b/qcsrc/gamec/w_crylink.c @@ -18,9 +18,9 @@ void(float req) w_crylink = if (req == WR_IDLE) crylink_ready_01(); else if (req == WR_FIRE1) - weapon_prepareattack(crylink_check, crylink_check, crylink_fire1_01, 0.2); + weapon_prepareattack(crylink_check, crylink_check, crylink_fire1_01, cvar("g_balance_crylink_refire")); else if (req == WR_FIRE2) - weapon_prepareattack(crylink_check, crylink_check, crylink_fire2_01, 0.2); + weapon_prepareattack(crylink_check, crylink_check, crylink_fire2_01, cvar("g_balance_crylink_refire")); else if (req == WR_RAISE) crylink_select_01(); else if (req == WR_UPDATECOUNTS) @@ -57,8 +57,8 @@ void W_Crylink_Attack (void) //(float postion) float counter; sound (self, CHAN_WEAPON, "weapons/crylink.wav", 1, ATTN_NORM); - self.attack_finished = time + cvar("g_balance_crylink_refire"); self.ammo_cells = self.ammo_cells - 1; + self.punchangle_x = -2; while (counter < 7) { @@ -84,8 +84,8 @@ void W_Crylink_Attack (void) //(float postion) proj.angles = vectoangles (proj.velocity); - proj.glow_color = 10; - proj.glow_size = 20; + //proj.glow_color = 10; + //proj.glow_size = 20; proj.effects = proj.effects | EF_ADDITIVE; proj.effects = proj.effects | EF_LOWPRECISION; @@ -98,8 +98,8 @@ void W_Crylink_Attack2 (void) float counter; sound (self, CHAN_WEAPON, "weapons/crylink.wav", 1, ATTN_NORM); - self.attack_finished = time + cvar("g_balance_crylink_refire"); self.ammo_cells = self.ammo_cells - 1; + self.punchangle_x = -2; while (counter < 5) { @@ -125,8 +125,8 @@ void W_Crylink_Attack2 (void) proj.angles = vectoangles (proj.velocity); - proj.glow_color = 10; - proj.glow_size = 20; + //proj.glow_color = 10; + //proj.glow_size = 20; proj.effects = proj.effects | EF_ADDITIVE; proj.effects = proj.effects | EF_LOWPRECISION; diff --git a/qcsrc/gamec/w_electro.c b/qcsrc/gamec/w_electro.c index 874817227..e9b054f09 100644 --- a/qcsrc/gamec/w_electro.c +++ b/qcsrc/gamec/w_electro.c @@ -16,9 +16,9 @@ void(float req) w_electro = if (req == WR_IDLE) electro_ready_01(); else if (req == WR_FIRE1) - weapon_prepareattack(electro_check, electro_check, electro_fire1_01, 0.4); + weapon_prepareattack(electro_check, electro_check, electro_fire1_01, cvar("g_balance_electro_refire")); else if (req == WR_FIRE2) - weapon_prepareattack(electro_check, electro_check, electro_fire2_01, 2); + weapon_prepareattack(electro_check, electro_check, electro_fire2_01, cvar("g_balance_electro_refire")); else if (req == WR_RAISE) electro_select_01(); else if (req == WR_UPDATECOUNTS) @@ -119,7 +119,6 @@ void() W_Electro_Attack proj.effects = proj.effects | EF_ADDITIVE; - self.attack_finished = time + cvar("g_balance_electro_refire"); self.ammo_cells = self.ammo_cells - 2; } @@ -132,7 +131,7 @@ void() W_Electro_Attack2 makevectors(self.v_angle); sound (self, CHAN_WEAPON, "weapons/electro_fire.wav", 1, ATTN_NORM); - self.punchangle_x = -4; + self.punchangle_x = -2; Plasma = spawn (); Plasma.owner = self; @@ -173,7 +172,6 @@ void() W_Electro_Attack2 Plasma.effects = Plasma.effects | EF_ADDITIVE; - self.attack_finished = time + cvar("g_balance_electro_refire"); self.ammo_cells = self.ammo_cells - 2; } diff --git a/qcsrc/gamec/w_grenadelauncher.c b/qcsrc/gamec/w_grenadelauncher.c index 5711aaf02..13ba61cd4 100644 --- a/qcsrc/gamec/w_grenadelauncher.c +++ b/qcsrc/gamec/w_grenadelauncher.c @@ -16,9 +16,9 @@ void(float req) w_glauncher = if (req == WR_IDLE) glauncher_ready_01(); else if (req == WR_FIRE1) - weapon_prepareattack(glauncher_check, glauncher_check, glauncher_fire1_01, 0.8); + weapon_prepareattack(glauncher_check, glauncher_check, glauncher_fire1_01, cvar("g_balance_grenadelauncher_refire")); else if (req == WR_FIRE2) - weapon_prepareattack(glauncher_check, glauncher_check, glauncher_fire2_01, 1); + weapon_prepareattack(glauncher_check, glauncher_check, glauncher_fire2_01, cvar("g_balance_grenadelauncher_refire")); else if (req == WR_RAISE) glauncher_select_01(); else if (req == WR_UPDATECOUNTS) @@ -82,9 +82,6 @@ void W_Grenade_Attack (void) gren.think = W_Grenade_Explode; gren.nextthink = time + 30; self.ammo_rockets = self.ammo_rockets - 3; - - - self.attack_finished = time + 0.8; } void W_Grenade_Attack2 (void) @@ -93,7 +90,6 @@ void W_Grenade_Attack2 (void) entity gren; makevectors(self.v_angle); sound (self, CHAN_WEAPON, "weapons/grenade_fire.wav", 1, ATTN_NORM); - self.punchangle_x = -4; gren = spawn (); @@ -121,7 +117,6 @@ void W_Grenade_Attack2 (void) //gren.think = W_Grenade_FuseExplode; //gren.nextthink = time + 5; - self.attack_finished = time + 1; self.ammo_rockets = self.ammo_rockets - 3; } diff --git a/qcsrc/gamec/w_hagar.c b/qcsrc/gamec/w_hagar.c index 3b00a0e10..9c2d6e251 100644 --- a/qcsrc/gamec/w_hagar.c +++ b/qcsrc/gamec/w_hagar.c @@ -16,9 +16,9 @@ void(float req) w_hagar = if (req == WR_IDLE) hagar_ready_01(); else if (req == WR_FIRE1) - weapon_prepareattack(hagar_check, hagar_check, hagar_fire1_01, 0.2); + weapon_prepareattack(hagar_check, hagar_check, hagar_fire1_01, cvar("g_balance_hagar_refire")); else if (req == WR_FIRE2) - weapon_prepareattack(hagar_check, hagar_check, hagar_fire2_01, 0.2); + weapon_prepareattack(hagar_check, hagar_check, hagar_fire2_01, cvar("g_balance_hagar_refire")); else if (req == WR_RAISE) hagar_select_01(); else if (req == WR_UPDATECOUNTS) @@ -94,8 +94,8 @@ void W_Hagar_Attack (void) missile.think = W_Hagar_Explode; missile.nextthink = time + 10; - self.attack_finished = time + 0.2; self.ammo_rockets = self.ammo_rockets - 1; + self.punchangle_x = -2; } void W_Hagar_Attack2 (void) @@ -133,8 +133,8 @@ void W_Hagar_Attack2 (void) missile.think = W_Hagar_Explode; missile.nextthink = time + 10; - self.attack_finished = time + 0.2; self.ammo_rockets = self.ammo_rockets - 1; + self.punchangle_x = -2; } // weapon frames diff --git a/qcsrc/gamec/w_laser.c b/qcsrc/gamec/w_laser.c index 9b0a8c842..e6b7231b1 100644 --- a/qcsrc/gamec/w_laser.c +++ b/qcsrc/gamec/w_laser.c @@ -1,6 +1,5 @@ void() laser_ready_01; void() laser_fire1_01; -void() laser_fire2_01; void() laser_deselect_01; void() laser_select_01; @@ -11,9 +10,7 @@ void(float req) w_laser = if (req == WR_IDLE) laser_ready_01(); else if (req == WR_FIRE1) - weapon_prepareattack(laser_check, laser_check, laser_fire1_01, 0.4); - else if (req == WR_FIRE2) - weapon_prepareattack(laser_check, laser_check, laser_fire2_01, 0.7); + weapon_prepareattack(laser_check, laser_check, laser_fire1_01, cvar("g_balance_laser_refire")); else if (req == WR_RAISE) laser_select_01(); else if (req == WR_UPDATECOUNTS) @@ -79,8 +76,6 @@ void W_Laser_Attack (void) setorigin (missile, self.origin + self.view_ofs + v_forward * 15 + v_right * 5 + v_up * -12); missile.velocity = v_forward * cvar("g_balance_laser_speed"); - missile.velocity = missile.velocity + v_right * ( crandom() * 45 ); - missile.velocity = missile.velocity + v_up * ( crandom() * 25 ); missile.angles = vectoangles (missile.velocity); missile.glow_color = 250; // 244, 250 missile.glow_size = 30; @@ -89,27 +84,6 @@ void W_Laser_Attack (void) missile.nextthink = time + 9; missile.effects = missile.effects | EF_ADDITIVE; - - self.punchangle_x = random () - 0.5; - self.punchangle_y = random () - 0.5; - self.punchangle_z = random () - 0.5; - - self.attack_finished = time + 0.3; -} - -void W_Laser_Attack2 (void) -{ - //makevectors(self.v_angle); - //self.velocity = self.velocity - v_forward * 900; - /* - weapon_shotdir(18, 5, -12); - // self.origin + self.view_ofs + v_forward * 18 + v_right * 5 + v_up * -12); - sound (self, CHAN_WEAPON, "weapons/crylink.wav", 1, ATTN_NORM); - //org = self.origin + self.view_ofs + v_forward * 10 + v_right * 5 + v_up * -14; - FireRailgunBullet (self.shotorg, self.origin + self.shotdir*4096, 25, IT_LASER); - te_spark(trace_endpos, self.shotdir, 55); - self.attack_finished = time + 0.400; - */ } // weapon frames @@ -122,9 +96,4 @@ void() laser_fire1_01 = weapon_doattack(laser_check, laser_check, W_Laser_Attack); weapon_thinkf(WFRAME_FIRE1, 0.3, laser_ready_01); }; -void() laser_fire2_01 = -{ - weapon_doattack(laser_check, laser_check, W_Laser_Attack2); - weapon_thinkf(WFRAME_FIRE1, 0.3, laser_ready_01); -}; diff --git a/qcsrc/gamec/w_nex.c b/qcsrc/gamec/w_nex.c index 09a5536b0..84d05e101 100644 --- a/qcsrc/gamec/w_nex.c +++ b/qcsrc/gamec/w_nex.c @@ -16,9 +16,9 @@ void(float req) w_nex = if (req == WR_IDLE) nex_ready_01(); else if (req == WR_FIRE1) - weapon_prepareattack(nex_check, nex_check, nex_fire1_01, 1); + weapon_prepareattack(nex_check, nex_check, nex_fire1_01, cvar("g_balance_nex_refire")); else if (req == WR_FIRE2) - weapon_prepareattack(nex_check, nex_check, nex_fire2_01, 1); + weapon_prepareattack(nex_check, nex_check, nex_fire2_01, cvar("g_balance_nex_refire")); else if (req == WR_RAISE) nex_select_01(); else if (req == WR_UPDATECOUNTS) @@ -40,7 +40,7 @@ void W_Nex_Attack (void) entity explosion; sound (self, CHAN_WEAPON, "weapons/nexfire.wav", 1, ATTN_NORM); - self.punchangle_x = -4; + self.punchangle_x = -5; makevectors(self.v_angle); org = self.origin + self.view_ofs + v_forward * 5 + v_right * 14 + v_up * -7; @@ -63,8 +63,6 @@ void W_Nex_Attack (void) WriteCoord (MSG_BROADCAST, 0); WriteCoord (MSG_BROADCAST, 0); - self.attack_finished = time + 1; - if (cvar("g_instagib") == 0) self.ammo_cells = self.ammo_cells - 5; diff --git a/qcsrc/gamec/w_rocketlauncher.c b/qcsrc/gamec/w_rocketlauncher.c index dfffaf547..e225c5232 100644 --- a/qcsrc/gamec/w_rocketlauncher.c +++ b/qcsrc/gamec/w_rocketlauncher.c @@ -17,7 +17,7 @@ void(float req) w_rlauncher = if (req == WR_IDLE) rlauncher_ready_01(); else if (req == WR_FIRE1) - weapon_prepareattack(rlauncher_check, rlauncher_check, rlauncher_fire1_01, 1.5); + weapon_prepareattack(rlauncher_check, rlauncher_check, rlauncher_fire1_01, cvar("g_balance_rocketlauncher_refire")); else if (req == WR_FIRE2) { if (time < self.attack_finished) @@ -102,8 +102,6 @@ void W_Rocket_Attack (void) missile.think = W_Rocket_Think; missile.nextthink = time + 9; - self.attack_finished = time + 1.2; - if (cvar("g_rocketarena") == 0) self.ammo_rockets = self.ammo_rockets - 3; @@ -116,6 +114,7 @@ void W_Rocket_Attack (void) flash.angles = vectoangles (flash.velocity); SUB_SetFade (flash, time); flash.effects = flash.effects | EF_ADDITIVE; + self.punchangle_x = -4; } void W_Rocket_Attack2 (void) diff --git a/qcsrc/gamec/w_shotgun.c b/qcsrc/gamec/w_shotgun.c index 0f1494ce5..8aaf9e71d 100644 --- a/qcsrc/gamec/w_shotgun.c +++ b/qcsrc/gamec/w_shotgun.c @@ -16,9 +16,9 @@ void(float req) w_shotgun = if (req == WR_IDLE) shotgun_ready_01(); else if (req == WR_FIRE1) - weapon_prepareattack(shotgun_check, shotgun_check, shotgun_fire1_01, 0.7); + weapon_prepareattack(shotgun_check, shotgun_check, shotgun_fire1_01, cvar("g_balance_shotgun_refire")); else if (req == WR_FIRE2) - weapon_prepareattack(shotgun_check, shotgun_check, shotgun_fire2_01, 0.7); + weapon_prepareattack(shotgun_check, shotgun_check, shotgun_fire2_01, cvar("g_balance_shotgun_refire2")); else if (req == WR_RAISE) shotgun_select_01(); else if (req == WR_UPDATECOUNTS) @@ -49,7 +49,6 @@ void W_Shotgun_Attack (void) for (sc = 0;sc < bullets;sc = sc + 1) fireBullet (org, v_forward, spread, d, IT_SHOTGUN, sc < 3); self.ammo_shells = self.ammo_shells - 1; - self.attack_finished = time + 0.7; // casing code if (cvar("g_casings") == 1) @@ -61,6 +60,8 @@ void W_Shotgun_Attack (void) org = self.origin + self.view_ofs + (v_right * 6) - (v_up * 8) + (v_forward * 20); W_Smoke(org, v_forward, 12); //te_smallflash(org); + + self.punchangle_x = -5; } // weapon frames @@ -71,23 +72,20 @@ void() shotgun_deselect_01 = {weapon_thinkf(-1, cvar("g_balance_weaponswitchdela void() shotgun_fire1_01 = { weapon_doattack(shotgun_check, shotgun_check, W_Shotgun_Attack); - weapon_thinkf(WFRAME_FIRE1, 0.3, shotgun_ready_01); + weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_shotgun_refire3"), shotgun_ready_01); }; void() shotgun_fire2_03 = { - self.punchangle_x = -5; weapon_doattack(shotgun_check, shotgun_check, W_Shotgun_Attack); - weapon_thinkf(WFRAME_FIRE1, 0.9, shotgun_ready_01); + weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_shotgun_refire3"), shotgun_ready_01); } void() shotgun_fire2_02 = { - self.punchangle_x = -5; weapon_doattack(shotgun_check, shotgun_check, W_Shotgun_Attack); - weapon_thinkf(WFRAME_FIRE1, 0.2, shotgun_fire2_03); + weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_shotgun_refire3"), shotgun_fire2_03); } void() shotgun_fire2_01 = { - self.punchangle_x = -5; weapon_doattack(shotgun_check, shotgun_check, W_Shotgun_Attack); - weapon_thinkf(WFRAME_FIRE1, 0.2, shotgun_fire2_02); + weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_shotgun_refire3"), shotgun_fire2_02); } \ No newline at end of file diff --git a/qcsrc/gamec/w_uzi.c b/qcsrc/gamec/w_uzi.c index 50a008e51..9c44227a0 100644 --- a/qcsrc/gamec/w_uzi.c +++ b/qcsrc/gamec/w_uzi.c @@ -1,6 +1,5 @@ void() uzi_ready_01; void() uzi_fire1_01; -void() uzi_fire2_01; void() uzi_deselect_01; void() uzi_select_01; @@ -18,7 +17,7 @@ void(float req) w_uzi = else if (req == WR_FIRE1) weapon_prepareattack(uzi_check, uzi_check, uzi_fire1_01, cvar("g_balance_uzi_refire")); else if (req == WR_FIRE2) - weapon_prepareattack(uzi_check, uzi_check, uzi_fire2_01, 0.4); + weapon_prepareattack(uzi_check, uzi_check, uzi_fire1_01, cvar("g_balance_uzi_refire")); else if (req == WR_RAISE) uzi_select_01(); else if (req == WR_UPDATECOUNTS) @@ -39,17 +38,17 @@ void W_Uzi_Attack (void) sound (self, CHAN_WEAPON, "weapons/uzi_fire.wav", 1, ATTN_NORM); org = self.origin + self.view_ofs + (v_right * 6) - (v_up * 8) + (v_forward * 15); - self.uzi_bulletcounter = self.uzi_bulletcounter + 1; - if (self.uzi_bulletcounter >= 4) - self.uzi_bulletcounter = 0; - fireBullet (org, v_forward, cvar("g_balance_uzi_spread"), cvar("g_balance_uzi_damage"), IT_UZI, self.uzi_bulletcounter == 0); + if (self.uzi_bulletcounter == 1) + fireBullet (org, v_forward, cvar("g_balance_uzi_spread2"), cvar("g_balance_uzi_damage2"), IT_UZI, (self.uzi_bulletcounter & 3) == 0); + else + fireBullet (org, v_forward, cvar("g_balance_uzi_spread"), cvar("g_balance_uzi_damage"), IT_UZI, (self.uzi_bulletcounter & 3) == 0); self.punchangle_x = random () - 0.5; self.punchangle_y = random () - 0.5; - self.punchangle_z = random () - 0.5; - //self.attack_finished = time + 0.2; self.ammo_nails = self.ammo_nails - 1; + // this attack_finished just enforces a cooldown at the end of a burst + self.attack_finished = time + cvar("g_balance_uzi_refire2"); // casing code if (cvar("g_casings") == 1) @@ -57,28 +56,27 @@ void W_Uzi_Attack (void) org = self.origin + self.view_ofs + (v_right * 6) - (v_up * 8) + (v_forward * 10); SpawnCasing (org, ((random () * 50 + 50) * v_right) - ((random () * 25 + 25) * v_forward) - ((random () * 5 + 10) * v_up), 2, v_forward,'0 250 0', 100, 2); } -} - -void W_Uzi_Attack2 (void) -{ - - } // weapon frames void() uzi_ready_01 = {weapon_thinkf(WFRAME_IDLE, 0.1, uzi_ready_01); self.weaponentity.state = WS_READY;}; void() uzi_select_01 = {weapon_thinkf(-1, cvar("g_balance_weaponswitchdelay"), w_ready); weapon_boblayer1(PLAYER_WEAPONSELECTION_SPEED, '0 0 0');}; void() uzi_deselect_01 = {weapon_thinkf(-1, cvar("g_balance_weaponswitchdelay"), w_clear); weapon_boblayer1(PLAYER_WEAPONSELECTION_SPEED, PLAYER_WEAPONSELECTION_RANGE);}; -void() uzi_fire1_01 = +void() uzi_fire1_02 = { - weapon_doattack(uzi_check, uzi_check, W_Uzi_Attack); if (self.button0) - weapon_thinkf(WFRAME_FIRE1, 0.05, uzi_fire1_01); + { + self.uzi_bulletcounter = self.uzi_bulletcounter + 1; + weapon_doattack(uzi_check, uzi_check, W_Uzi_Attack); + weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_uzi_refire"), uzi_fire1_02); + } else - weapon_thinkf(WFRAME_FIRE1, 0.05, uzi_ready_01); + weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_uzi_refire"), uzi_ready_01); }; -void() uzi_fire2_01 = +void() uzi_fire1_01 = { - weapon_doattack(uzi_check, uzi_check, W_Uzi_Attack2); - weapon_thinkf(WFRAME_FIRE2, 0.05, uzi_ready_01); + self.uzi_bulletcounter = 1; + weapon_doattack(uzi_check, uzi_check, W_Uzi_Attack); + weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_uzi_refire"), uzi_fire1_02); }; + -- 2.39.2