From 5c6c657082339c0ed2794a9fa56f9c377c3326b6 Mon Sep 17 00:00:00 2001 From: vermeulenl Date: Fri, 26 Nov 2004 02:28:15 +0000 Subject: [PATCH] Got rid of third attack and replaced it with a zoom git-svn-id: svn://svn.icculus.org/nexuiz/trunk@236 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- qcsrc/gamec/cl_aliases.c | 2 +- qcsrc/gamec/cl_client.c | 7 ++-- qcsrc/gamec/cl_weapons.c | 2 -- qcsrc/gamec/g_world.c | 2 ++ qcsrc/gamec/w_crylink.c | 7 ++-- qcsrc/gamec/w_electro.c | 61 +++------------------------------ qcsrc/gamec/w_grenadelauncher.c | 16 +-------- qcsrc/gamec/w_hagar.c | 27 --------------- qcsrc/gamec/w_laser.c | 8 ----- qcsrc/gamec/w_nex.c | 9 ----- qcsrc/gamec/w_rocketlauncher.c | 14 -------- qcsrc/gamec/w_shotgun.c | 10 ------ qcsrc/gamec/w_uzi.c | 37 +------------------- 13 files changed, 15 insertions(+), 187 deletions(-) diff --git a/qcsrc/gamec/cl_aliases.c b/qcsrc/gamec/cl_aliases.c index 45cbc4fb8..443960576 100644 --- a/qcsrc/gamec/cl_aliases.c +++ b/qcsrc/gamec/cl_aliases.c @@ -19,7 +19,7 @@ void DoAliases() { return; AddImpulse(self, "weapnext", 10); - AddImpulse(self, "weapnext", 12); + AddImpulse(self, "weapprev", 12); AddImpulse(self, "+crouch", 97); AddImpulse(self, "-crouch", 98); AddImpulse(self, "bot_add", 100); diff --git a/qcsrc/gamec/cl_client.c b/qcsrc/gamec/cl_client.c index 24c76319b..338a7a662 100644 --- a/qcsrc/gamec/cl_client.c +++ b/qcsrc/gamec/cl_client.c @@ -417,11 +417,10 @@ void PlayerPreThink (void) W_WeaponFrame(); - if (self.button3) + if (self.button4) { - if (self.weapon == IT_NEX) - if (self.viewzoom > 0.4) - self.viewzoom = max (0.4, self.viewzoom - frametime * 2); + if (self.viewzoom > 0.4) + self.viewzoom = max (0.4, self.viewzoom - frametime * 2); } else if (self.viewzoom < 1.0) self.viewzoom = min (1.0, self.viewzoom + frametime); diff --git a/qcsrc/gamec/cl_weapons.c b/qcsrc/gamec/cl_weapons.c index 4fb316d7b..4f657bde6 100644 --- a/qcsrc/gamec/cl_weapons.c +++ b/qcsrc/gamec/cl_weapons.c @@ -106,8 +106,6 @@ void() W_WeaponFrame = weapon_action(self.weapon, WR_FIRE1); if (self.button3) weapon_action(self.weapon, WR_FIRE2); - if (self.button4) - weapon_action(self.weapon, WR_FIRE3); // do weapon think if (time >= self.weapon_nextthink) diff --git a/qcsrc/gamec/g_world.c b/qcsrc/gamec/g_world.c index ccb6f1b1c..7a9f4e099 100644 --- a/qcsrc/gamec/g_world.c +++ b/qcsrc/gamec/g_world.c @@ -45,6 +45,8 @@ void worldspawn (void) precache_model ("models/flash.md3"); precache_model ("models/laser.mdl"); precache_model ("models/elaser.mdl"); + precache_model ("models/ebomb.mdl"); + precache_model ("models/plasma.mdl"); precache_model ("models/fire.mdl"); precache_model ("models/items/g_h1.md3"); diff --git a/qcsrc/gamec/w_crylink.c b/qcsrc/gamec/w_crylink.c index 8a58357e8..4070d825e 100644 --- a/qcsrc/gamec/w_crylink.c +++ b/qcsrc/gamec/w_crylink.c @@ -1,7 +1,6 @@ void() crylink_ready_01; void() crylink_fire1_01; void() crylink_fire2_01; -void() crylink_fire3_01; void() crylink_deselect_01; void() crylink_select_01; @@ -20,8 +19,6 @@ void(float req) w_crylink = weapon_prepareattack(crylink_check, crylink_check, crylink_fire1_01, 0.2); else if (req == WR_FIRE2) weapon_prepareattack(crylink_check, crylink_check, crylink_fire2_01, 0.2); - else if (req == WR_FIRE3) - weapon_prepareattack(crylink_check, crylink_check, crylink_fire3_01, 0.2); else if (req == WR_RAISE) crylink_select_01(); else if (req == WR_UPDATECOUNTS) @@ -57,7 +54,7 @@ void W_Crylink_Attack (void) //(float postion) proj.movetype = MOVETYPE_FLY; proj.solid = SOLID_BBOX; - setmodel (proj, "models/sprites/bubbles.spr"); + setmodel (proj, "models/plasma.mdl"); setsize (proj, '0 0 0', '0 0 0'); setorigin (proj, self.origin + self.view_ofs + v_forward * 10 + v_right * 5 + v_up * -14); @@ -71,6 +68,8 @@ void W_Crylink_Attack (void) //(float postion) proj.glow_color = 10; proj.glow_size = 30; + proj.effects = proj.effects | EF_ADDITIVE; + self.attack_finished = time + 0.20; self.ammo_cells = self.ammo_cells - 0.2; } diff --git a/qcsrc/gamec/w_electro.c b/qcsrc/gamec/w_electro.c index 5038b62f7..5d69c79d3 100644 --- a/qcsrc/gamec/w_electro.c +++ b/qcsrc/gamec/w_electro.c @@ -1,7 +1,6 @@ void() electro_ready_01; void() electro_fire1_01; void() electro_fire2_01; -void() electro_fire3_01; void() electro_deselect_01; void() electro_select_01; @@ -20,8 +19,6 @@ void(float req) w_electro = weapon_prepareattack(electro_check, electro_check, electro_fire1_01, 0.4); else if (req == WR_FIRE2) weapon_prepareattack(electro_check, electro_check, electro_fire2_01, 2); - else if (req == WR_FIRE3) - weapon_prepareattack(electro_check, electro_check, electro_fire3_01, 0.4); else if (req == WR_RAISE) electro_select_01(); else if (req == WR_UPDATECOUNTS) @@ -195,7 +192,7 @@ void() W_Electro_Attack2 Plasma.health = 5; Plasma.event_damage = W_Plasma_Damage; - setmodel (Plasma, "models/elaser.mdl"); + setmodel (Plasma, "models/ebomb.mdl"); setsize (Plasma, '-6 -6 -3', '6 6 3'); if (postion == 0) @@ -207,7 +204,9 @@ void() W_Electro_Attack2 Plasma.velocity = v_forward * 900 + v_up * 200; Plasma.angles = vectoangles (Plasma.velocity); - Plasma.avelocity = '0 0 0'; + Plasma.avelocity_y = random () * -500 - 500; + Plasma.avelocity_x = random () * -500 - 500; + Plasma.avelocity_z = random () * -500 - 500; Plasma.touch = W_Plasma_Touch; Plasma.think = W_Plasma_FuseExplode; @@ -220,48 +219,6 @@ void() W_Electro_Attack2 } -void() W_Electro_Attack3 -{ - entity proj; - vector org; - float postion; - - postion = self.electrocount; - makevectors(self.v_angle); - sound (self, CHAN_WEAPON, "weapons/electro_fire.wav", 1, ATTN_NORM); - - proj = spawn (); - proj.owner = self; - proj.classname = "spike"; - - proj.movetype = MOVETYPE_BOUNCEMISSILE; - proj.solid = SOLID_BBOX; - proj.effects = 1; - - org = self.origin + self.view_ofs + v_forward * 18 + v_right * 7 + v_up * -9; - te_smallflash(org); - - setmodel (proj, "models/bullet.mdl"); - setsize (proj, '0 0 0', '0 0 0'); - if (postion == 0) - setorigin (proj, self.origin + self.view_ofs + v_forward * 18 + v_right * 5 + v_up * -14); - if (postion == 1) - setorigin (proj, self.origin + self.view_ofs + v_forward * 18 + v_right * 10 + v_up * -12); - if (postion == 2) - setorigin (proj, self.origin + self.view_ofs + v_forward * 18 + v_right * 15 + v_up * -14); - - proj.velocity = v_forward * 9999; - proj.think = W_Electro_Touch; - proj.nextthink = time + 8; - - proj.effects = proj.effects | EF_ADDITIVE; - - self.attack_finished = time + 0.4; - self.ammo_cells = self.ammo_cells - 1; - -} - - // weapon frames void() electro_ready_01 = {weapon_thinkf(WFRAME_IDLE, 0.1, electro_ready_01); self.weaponentity.state = WS_READY;}; @@ -287,13 +244,3 @@ void() electro_fire2_01 = weapon_thinkf(WFRAME_FIRE2, 0.3, electro_ready_01); }; -void() electro_fire3_01 = -{ - weapon_doattack(electro_check, electro_check, W_Electro_Attack3); - - self.electrocount = self.electrocount + 1; - if (self.electrocount == 3) - self.electrocount = 0; - - weapon_thinkf(WFRAME_FIRE2, 0.3, electro_ready_01); -}; diff --git a/qcsrc/gamec/w_grenadelauncher.c b/qcsrc/gamec/w_grenadelauncher.c index 1ce762428..c86a71c7a 100644 --- a/qcsrc/gamec/w_grenadelauncher.c +++ b/qcsrc/gamec/w_grenadelauncher.c @@ -1,7 +1,6 @@ void() glauncher_ready_01; void() glauncher_fire1_01; void() glauncher_fire2_01; -void() glauncher_fire3_01; void() glauncher_deselect_01; void() glauncher_select_01; @@ -20,8 +19,6 @@ void(float req) w_glauncher = weapon_prepareattack(glauncher_check, glauncher_check, glauncher_fire1_01, 0.8); else if (req == WR_FIRE2) weapon_prepareattack(glauncher_check, glauncher_check, glauncher_fire2_01, 1); - else if (req == WR_FIRE3) - weapon_prepareattack(glauncher_check, glauncher_check, glauncher_fire3_01, 0.3); else if (req == WR_RAISE) glauncher_select_01(); else if (req == WR_UPDATECOUNTS) @@ -142,11 +139,6 @@ void W_Grenade_Attack2 (void) self.ammo_rockets = self.ammo_rockets - 1; } -void W_Grenade_Attack3 (void) -{ - makevectors(self.v_angle); -} - // weapon frames void() glauncher_ready_01 = {weapon_thinkf(WFRAME_IDLE, 0.1, glauncher_ready_01); self.weaponentity.state = WS_READY;}; @@ -161,10 +153,4 @@ void() glauncher_fire2_01 = { weapon_doattack(glauncher_check, glauncher_check, W_Grenade_Attack2); weapon_thinkf(WFRAME_FIRE2, 0.8, glauncher_ready_01); -}; -void() glauncher_fire3_01 = -{ - weapon_doattack(glauncher_check, glauncher_check, W_Grenade_Attack3); - weapon_thinkf(WFRAME_FIRE2, 0.3, glauncher_ready_01); -}; - +}; \ No newline at end of file diff --git a/qcsrc/gamec/w_hagar.c b/qcsrc/gamec/w_hagar.c index c1d393075..c214177f7 100644 --- a/qcsrc/gamec/w_hagar.c +++ b/qcsrc/gamec/w_hagar.c @@ -1,7 +1,6 @@ void() hagar_ready_01; void() hagar_fire1_01; void() hagar_fire2_01; -void() hagar_fire3_01; void() hagar_deselect_01; void() hagar_select_01; @@ -20,8 +19,6 @@ void(float req) w_hagar = weapon_prepareattack(hagar_check, hagar_check, hagar_fire1_01, 0.2); else if (req == WR_FIRE2) weapon_prepareattack(hagar_check, hagar_check, hagar_fire2_01, 0.2); - else if (req == WR_FIRE3) - weapon_prepareattack(hagar_check, hagar_check, hagar_fire3_01, 0); else if (req == WR_RAISE) hagar_select_01(); else if (req == WR_UPDATECOUNTS) @@ -138,25 +135,6 @@ void W_Hagar_Attack2 (void) self.ammo_rockets = self.ammo_rockets - 0.25; } -void W_Hagar_Attack3 (void) -{ - entity proj; - makevectors(self.v_angle); - proj = findradius (self.origin, 50000); - while (proj) - { - if (proj.classname == "missile" && proj.owner == self) - { - proj.velocity = proj.velocity - v_up * 500; - proj.velocity = proj.velocity - v_forward * 1000; - } - proj = proj.chain; - } - - self.attack_finished = time; -} - - // weapon frames void() hagar_ready_01 = {weapon_thinkf(WFRAME_IDLE, 0.1, hagar_ready_01); self.weaponentity.state = WS_READY;}; void() hagar_select_01 = {weapon_thinkf(-1, PLAYER_WEAPONSELECTION_DELAY, w_ready); weapon_boblayer1(PLAYER_WEAPONSELECTION_SPEED, '0 0 0');}; @@ -171,9 +149,4 @@ void() hagar_fire2_01 = weapon_doattack(hagar_check, hagar_check, W_Hagar_Attack2); weapon_thinkf(WFRAME_FIRE2, 0.15, hagar_ready_01); }; -void() hagar_fire3_01 = -{ - weapon_doattack(hagar_check, hagar_check, W_Hagar_Attack3); - weapon_thinkf(WFRAME_FIRE2, 0.15, hagar_ready_01); -}; diff --git a/qcsrc/gamec/w_laser.c b/qcsrc/gamec/w_laser.c index b7be3baef..a72c8574f 100644 --- a/qcsrc/gamec/w_laser.c +++ b/qcsrc/gamec/w_laser.c @@ -1,7 +1,6 @@ void() laser_ready_01; void() laser_fire1_01; void() laser_fire2_01; -void() laser_fire3_01; void() laser_deselect_01; void() laser_select_01; @@ -15,8 +14,6 @@ void(float req) w_laser = 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.3); - else if (req == WR_FIRE3) - weapon_prepareattack(laser_check, laser_check, laser_fire3_01, 0.3); else if (req == WR_RAISE) laser_select_01(); else if (req == WR_UPDATECOUNTS) @@ -127,9 +124,4 @@ void() laser_fire2_01 = weapon_doattack(laser_check, laser_check, W_Laser_Attack2); weapon_thinkf(WFRAME_FIRE1, 0.2, laser_ready_01); }; -void() laser_fire3_01 = -{ - weapon_doattack(laser_check, laser_check, W_Laser_Attack2); - weapon_thinkf(WFRAME_FIRE1, 0.2, laser_ready_01); -}; diff --git a/qcsrc/gamec/w_nex.c b/qcsrc/gamec/w_nex.c index 6eb8e384d..67fa6f225 100644 --- a/qcsrc/gamec/w_nex.c +++ b/qcsrc/gamec/w_nex.c @@ -1,7 +1,6 @@ void() nex_ready_01; void() nex_fire1_01; void() nex_fire2_01; -void() nex_fire3_01; void() nex_deselect_01; void() nex_select_01; @@ -20,8 +19,6 @@ void(float req) w_nex = weapon_prepareattack(nex_check, nex_check, nex_fire1_01, 1); else if (req == WR_FIRE2) weapon_prepareattack(nex_check, nex_check, nex_fire2_01, 1); - else if (req == WR_FIRE3) - weapon_prepareattack(nex_check, nex_check, nex_fire3_01, 1); else if (req == WR_RAISE) nex_select_01(); else if (req == WR_UPDATECOUNTS) @@ -100,10 +97,4 @@ void() nex_fire2_01 = weapon_doattack(nex_check, nex_check, W_Nex_Attack); weapon_thinkf(WFRAME_FIRE2, 0.5, nex_ready_01); }; -void() nex_fire3_01 = -{ - weapon_doattack(nex_check, nex_check, W_Nex_Attack); - weapon_thinkf(WFRAME_FIRE2, 0.5, nex_ready_01); -}; - diff --git a/qcsrc/gamec/w_rocketlauncher.c b/qcsrc/gamec/w_rocketlauncher.c index a4b982f35..0538a2748 100644 --- a/qcsrc/gamec/w_rocketlauncher.c +++ b/qcsrc/gamec/w_rocketlauncher.c @@ -1,7 +1,6 @@ void() rlauncher_ready_01; void() rlauncher_fire1_01; void() rlauncher_fire2_01; -void() rlauncher_fire3_01; void() rlauncher_deselect_01; void() rlauncher_select_01; void() W_Rocket_Attack2; @@ -24,8 +23,6 @@ void(float req) w_rlauncher = if (time < self.attack_finished) W_Rocket_Attack2(); } - else if (req == WR_FIRE3) - weapon_prepareattack(rlauncher_check, rlauncher_check, rlauncher_fire3_01, 1.5); else if (req == WR_RAISE) rlauncher_select_01(); else if (req == WR_UPDATECOUNTS) @@ -127,12 +124,6 @@ void W_Rocket_Attack2 (void) self.attack_finished = time + 0.1; } - -void W_Rocket_Attack3 (void) -{ - -} - // weapon frames void() rlauncher_ready_01 = {weapon_thinkf(WFRAME_IDLE, 0.1, rlauncher_ready_01); self.weaponentity.state = WS_READY;}; @@ -148,8 +139,3 @@ void() rlauncher_fire2_01 = weapon_doattack(rlauncher_check, rlauncher_check, W_Rocket_Attack2); weapon_thinkf(WFRAME_FIRE2, 0.3, rlauncher_ready_01); }; -void() rlauncher_fire3_01 = -{ - weapon_doattack(rlauncher_check, rlauncher_check, W_Rocket_Attack3); - weapon_thinkf(WFRAME_FIRE2, 0.3, rlauncher_ready_01); -}; \ No newline at end of file diff --git a/qcsrc/gamec/w_shotgun.c b/qcsrc/gamec/w_shotgun.c index 91c52f2ce..bac8f3dbe 100644 --- a/qcsrc/gamec/w_shotgun.c +++ b/qcsrc/gamec/w_shotgun.c @@ -1,7 +1,6 @@ void() shotgun_ready_01; void() shotgun_fire1_01; void() shotgun_fire2_01; -void() shotgun_fire3_01; void() shotgun_deselect_01; void() shotgun_select_01; @@ -20,8 +19,6 @@ void(float req) w_shotgun = weapon_prepareattack(shotgun_check, shotgun_check, shotgun_fire1_01, 0.7); else if (req == WR_FIRE2) weapon_prepareattack(shotgun_check, shotgun_check, shotgun_fire2_01, 0.7); - else if (req == WR_FIRE3) - weapon_prepareattack(shotgun_check, shotgun_check, shotgun_fire3_01, 0.7); else if (req == WR_RAISE) shotgun_select_01(); else if (req == WR_UPDATECOUNTS) @@ -72,10 +69,3 @@ void() shotgun_fire2_01 = weapon_doattack(shotgun_check, shotgun_check, W_Shotgun_Attack2); weapon_thinkf(WFRAME_FIRE2, 0.5, shotgun_ready_01); }; -void() shotgun_fire3_01 = -{ - weapon_doattack(shotgun_check, shotgun_check, W_Shotgun_Attack2); - weapon_thinkf(WFRAME_FIRE2, 0.5, shotgun_ready_01); -}; - - diff --git a/qcsrc/gamec/w_uzi.c b/qcsrc/gamec/w_uzi.c index e54294060..671c2a5e7 100644 --- a/qcsrc/gamec/w_uzi.c +++ b/qcsrc/gamec/w_uzi.c @@ -1,7 +1,6 @@ void() uzi_ready_01; void() uzi_fire1_01; void() uzi_fire2_01; -void() uzi_fire3_01; void() uzi_deselect_01; void() uzi_select_01; @@ -20,8 +19,6 @@ void(float req) w_uzi = weapon_prepareattack(uzi_check, uzi_check, uzi_fire1_01, 0.075); else if (req == WR_FIRE2) weapon_prepareattack(uzi_check, uzi_check, uzi_fire2_01, 0.4); - else if (req == WR_FIRE3) - weapon_prepareattack(uzi_check, uzi_check, uzi_fire3_01, 0.16); else if (req == WR_RAISE) uzi_select_01(); else if (req == WR_UPDATECOUNTS) @@ -55,33 +52,6 @@ void W_Uzi_Attack (void) } void W_Uzi_Attack2 (void) -{ - float sc; - float bullets; - - makevectors(self.v_angle); - sound (self, CHAN_WEAPON, "weapons/shotgun_fire.wav", 1, ATTN_NORM); - - bullets = 5; - if (bullets > self.ammo_nails) - bullets = self.ammo_nails; - - sound (self, CHAN_WEAPON, "weapons/uzi_fire_secondary.wav", 1, ATTN_NORM); - - for (sc = bullets; sc > 0; sc = sc - 1) - fireBullet (v_forward, 400, 10, IT_SHOTGUN); - - self.punchangle_x = -1.5; - - self.ammo_nails = self.ammo_nails - bullets; - self.attack_finished = time + 0.4; - - vector org; // casing code - org = self.origin + self.view_ofs + (v_right * 6) - (v_up * 4) + (v_forward * 15); - SpawnCasing (org, ((random () * 50 + 50) * v_right) - ((random () * 25 + 25) * v_forward) - ((random () * 5 + 10) * v_up), 2, v_forward,'0 250 0', 100, 3); -} - -void W_Uzi_Attack3 (void) { makevectors(self.v_angle); sound (self, CHAN_WEAPON, "weapons/uzi_fire.wav", 1, ATTN_NORM); @@ -111,13 +81,8 @@ void() uzi_fire1_01 = void() uzi_fire2_01 = { weapon_doattack(uzi_check, uzi_check, W_Uzi_Attack2); - weapon_thinkf(WFRAME_FIRE2, 0.4, uzi_ready_01); -}; -void() uzi_fire3_01 = -{ - weapon_doattack(uzi_check, uzi_check, W_Uzi_Attack3); if (self.button0) - weapon_thinkf(WFRAME_FIRE2, 0.16, uzi_fire3_01); + weapon_thinkf(WFRAME_FIRE2, 0.16, uzi_fire2_01); else weapon_thinkf(WFRAME_FIRE2, 0.1, uzi_ready_01); }; -- 2.39.2