From 1b75bbdddf514bf664e65425724e4e0fbe30e157 Mon Sep 17 00:00:00 2001 From: Finny Merrill Date: Tue, 17 Feb 2004 00:42:19 +0000 Subject: [PATCH] Can fire assault cannon anywhere now, but off of ground gives a bit of a recoil. scuba underwater reduces this. --- player.qc | 4 ++-- weapons.qc | 17 +++++++---------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/player.qc b/player.qc index 8cd79dc..6b70b59 100644 --- a/player.qc +++ b/player.qc @@ -582,7 +582,7 @@ void() player_nail4 =[ $nailatt2, player_nail1 ] // Cannon powering up void() player_assaultcannonup1 =[$nailatt1, player_assaultcannonup2 ] { - if ((!self.button0) || (self.ammo_shells < 1) || intermission_running || !(self.flags & FL_ONGROUND)) + if ((!self.button0) || (self.ammo_shells < 1) || intermission_running) { // Let him/her walk again // if (!self.is_haxxxoring) //- OfN already checked on TeamFortress_SetSpeed() { @@ -627,7 +627,7 @@ void() player_assaultcannonup1 =[$nailatt1, player_assaultcannonup2 ] // Cannon powering up 2 void() player_assaultcannonup2 =[$nailatt1, player_assaultcannonup1 ] { - if ((!self.button0) || (self.ammo_shells < 1) || intermission_running || !(self.flags & FL_ONGROUND)) + if ((!self.button0) || (self.ammo_shells < 1) || intermission_running) { // Let him/her walk again // if (!self.is_haxxxoring) //- OfN already checked on TeamFortress_SetSpeed() { diff --git a/weapons.qc b/weapons.qc index 10e6b36..9374852 100644 --- a/weapons.qc +++ b/weapons.qc @@ -1447,6 +1447,13 @@ void(float num) W_FireAssaultCannon = dir = aim (self, 100000); deathmsg = DMSG_ASSAULTCANNON; FireBullets (num, dir, '0.01 0.01 0' * num); + + if (!(self.flags & FL_ONGROUND)) { + if (!self.waterlevel || (self.tf_items & NIT_SCUBA)) + self.velocity -= 10 * num * dir; + else + self.velocity -= 25 * num * dir; + } }; /* @@ -4175,16 +4182,6 @@ void() W_WeaponFrame = TeamFortress_SetSpeed(self); } - } else if (self.current_weapon == WEAP_ASSAULT_CANNON) { - // Only fire the Assault Cannon if the player is on the ground - // WK Or if you are a Scuba Commando Underwater! - if (self.flags & FL_ONGROUND || ((self.tf_items & NIT_SCUBA) && self.waterlevel)) { - SuperDamageSound (); - W_Attack (); - } else { - sprint(self, PRINT_MEDIUM, "You cannot fire the assault cannon without\nyour feet on the ground...\n"); - stuffcmd (self, "-attack;\n"); // so that they don't get flooded - } } else { SuperDamageSound (); W_Attack ();