From: MirceaKitsune Date: Tue, 1 Mar 2011 23:06:59 +0000 (+0200) Subject: Remove firing the grabber with the jetpack button when we have no jetpack. That's... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=694a16af0af4e9a0bf19c15a4f54c74267844805;p=voretournament%2Fvoretournament.git Remove firing the grabber with the jetpack button when we have no jetpack. That's an old behavior from Nexuiz that would not apply well or have any use in VoreTournament. --- diff --git a/data/qcsrc/server/g_grabber.qc b/data/qcsrc/server/g_grabber.qc index 1c3361e1..4ea53d32 100644 --- a/data/qcsrc/server/g_grabber.qc +++ b/data/qcsrc/server/g_grabber.qc @@ -85,7 +85,6 @@ float LostMovetypeFollow(entity ent) } .float grabber_length; -.float grabber_switchweapon; void RemoveGrabber(entity pl) { @@ -338,43 +337,12 @@ void FireGrabber (void) missile.damageforcescale = 0; } -// voidGrabberFrame() -// { -// // this function has been modified for Voretournament -// - if (self.BUTTON_JETPACK && g_grabber) -// { -// - if (!self.grabber && self.grabber_time <= time && !self.button6_pressed_before) -// - if (timeoutStatus != 2) //only allow the player to fire the grabber if the game is not paused (timeout) -// - FireGrabber(); -// } -// - else -// { -// if (self.grabber) -// RemoveGrabber(self); -// } -// - self.button6_pressed_before = self.BUTTON_JETPACK; -// /* -// // if I have no grabber or it's not pulling yet, make sure I'm not flying! -// if((self.grabber == world || !self.grabber.state) && self.movetype == MOVETYPE_FLY) - void GrabberFrame() { if(timeoutStatus != 2 && self.weapon != WEP_GRABBER) { - // offhand grabber controls - if(self.BUTTON_JETPACK) - { - if not(self.grabber || (self.grabber_state & GRABBER_WAITING_FOR_RELEASE)) - { - self.grabber_state |= GRABBER_FIRING; - self.grabber_state |= GRABBER_WAITING_FOR_RELEASE; - } - } - else - { - self.grabber_state |= GRABBER_REMOVING; - self.grabber_state &~= GRABBER_WAITING_FOR_RELEASE; - } + self.grabber_state |= GRABBER_REMOVING; + self.grabber_state &~= GRABBER_WAITING_FOR_RELEASE; self.grabber_state &~= GRABBER_RELEASING; if(self.BUTTON_CROUCH) @@ -388,12 +356,6 @@ void GrabberFrame() //self.grabber_state &~= GRABBER_RELEASING; } } - else if(!(self.items & IT_JETPACK) && self.switchweapon != WEP_GRABBER) - { - if(self.BUTTON_JETPACK && !self.grabber_switchweapon) - W_SwitchWeapon(WEP_GRABBER); - } - self.grabber_switchweapon = self.BUTTON_JETPACK; if(self.weapon != WEP_GRABBER) { diff --git a/data/qcsrc/server/w_grabber.qc b/data/qcsrc/server/w_grabber.qc index 92a12238..34b13778 100644 --- a/data/qcsrc/server/w_grabber.qc +++ b/data/qcsrc/server/w_grabber.qc @@ -87,7 +87,7 @@ float w_grabber(float req) } else if not(self.clip_load < 0) // we're currently reloading { - if (self.BUTTON_ATCK || (!(self.items & IT_JETPACK) && self.BUTTON_JETPACK)) + if (self.BUTTON_ATCK) { if(time < self.weapon_delay) return FALSE; @@ -164,7 +164,7 @@ float w_grabber(float req) if (self.BUTTON_CROUCH) { self.grabber_state &~= GRABBER_PULLING; - if (self.BUTTON_ATCK || (!(self.items & IT_JETPACK) && self.BUTTON_JETPACK)) + if (self.BUTTON_ATCK) self.grabber_state &~= GRABBER_RELEASING; else self.grabber_state |= GRABBER_RELEASING; @@ -174,7 +174,7 @@ float w_grabber(float req) self.grabber_state |= GRABBER_PULLING; self.grabber_state &~= GRABBER_RELEASING; - if (self.BUTTON_ATCK || (!(self.items & IT_JETPACK) && self.BUTTON_JETPACK)) + if (self.BUTTON_ATCK) { // already fired if(self.grabber)