Can fire assault cannon anywhere now, but off of ground

gives a bit of a recoil. scuba underwater reduces this.
This commit is contained in:
Finny Merrill 2004-02-17 00:42:19 +00:00
parent 91ee6d6fba
commit 1b75bbdddf
2 changed files with 9 additions and 12 deletions

View file

@ -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() {

View file

@ -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 ();