From 07222cdef8ad94c7d60ebf53965ab36aa006c53d Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Tue, 19 Jul 2011 16:54:10 +0300 Subject: [PATCH] Rework the buttons yet again. Both grabber modes is on the alt fire button, while swallowing and stomach kicking on the primary button. It's much more like before, and should also be easier to use and get a hang of. --- data/qcsrc/server/bot/havocbot/vore_ai.qc | 14 +++++++------- data/qcsrc/server/vore.qc | 4 ++-- data/qcsrc/server/w_grabber.qc | 8 ++++---- docs/Release notes.txt | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/data/qcsrc/server/bot/havocbot/vore_ai.qc b/data/qcsrc/server/bot/havocbot/vore_ai.qc index 52be2a41..e582678a 100644 --- a/data/qcsrc/server/bot/havocbot/vore_ai.qc +++ b/data/qcsrc/server/bot/havocbot/vore_ai.qc @@ -1,5 +1,5 @@ .float status_teamhealing; // 0 = can't team heal, 1 = can team heal, 2 = team healing right now -.float hold_BUTTON_ATCK2; // marks the bot holding the fire button after having decided on his prey +.float hold_BUTTON_ATCK; // marks the bot holding the fire button after having decided on his prey float Swallow_condition_check_bot(entity prey) { @@ -87,12 +87,12 @@ void Vore_AI_Teamheal(entity prey) { // base the decision around HOW damaged the team mate is, centered around 100 health if(skill * (100 / prey.health) >= random() * 10) // there are 10 bot skill steps - self.hold_BUTTON_ATCK2 = TRUE; // swallow the team mate + self.hold_BUTTON_ATCK = TRUE; // swallow the team mate self.decide_swallow = time + cvar("bot_ai_vore_decide_swallow") / self.bot_vorethinkpred; // this is needed to take a proper decision, otherwise the code would execute each frame and return TRUE quickly } } else - self.hold_BUTTON_ATCK2 = FALSE; + self.hold_BUTTON_ATCK = FALSE; } void Vore_AI() @@ -169,18 +169,18 @@ void Vore_AI() if(skill / fear >= randomtry) if not(teams_matter && prey.team == self.team) { - self.hold_BUTTON_ATCK2 = TRUE; // swallow + self.hold_BUTTON_ATCK = TRUE; // swallow self.decide_pred = time + decide_pred_time; // time before the bot decides what to do with his prey } self.decide_swallow = time + cvar("bot_ai_vore_decide_swallow") / self.bot_vorethinkpred; // this is needed to take a proper decision, otherwise the code would execute each frame and return TRUE quickly } } else - self.hold_BUTTON_ATCK2 = FALSE; + self.hold_BUTTON_ATCK = FALSE; // if the bot is holding the firing button, apply that to the actual fire key - if(self.hold_BUTTON_ATCK2) - self.BUTTON_ATCK2 = TRUE; + if(self.hold_BUTTON_ATCK) + self.BUTTON_ATCK = TRUE; // deciding what to do with a victim: diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 855b402e..febc062e 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -60,7 +60,7 @@ float Swallow_condition_check(entity prey) if(swallow_complain != "") { - if(time > self.complain_vore && self.BUTTON_ATCK2) + if(time > self.complain_vore && self.BUTTON_ATCK) { play2(self, "misc/forbidden.wav"); sprint(self, swallow_complain); @@ -782,7 +782,7 @@ void Vore() else self.stat_canswallow = 1; - if(self.BUTTON_ATCK2) + if(self.BUTTON_ATCK) Vore_SwallowStep(prey); } else if(prey != world) diff --git a/data/qcsrc/server/w_grabber.qc b/data/qcsrc/server/w_grabber.qc index bd5f3431..611b69c2 100644 --- a/data/qcsrc/server/w_grabber.qc +++ b/data/qcsrc/server/w_grabber.qc @@ -89,14 +89,14 @@ float w_grabber(float req) grabbered_fuel = cvar("g_balance_grabber_primary_grabbered_fuel"); // forced reload if(cvar("g_balance_grabber_reload_ammo") && self.clip_load < min(cvar("g_balance_grabber_primary_ammo"), cvar("g_balance_grabber_secondary_ammo")) - && self.clip_load >= 0 && !(self.clip_load >= (time - self.grabber_time_fueldecrease) * grabbered_fuel && self.BUTTON_ATCK)) // not while hooked and still have ammo to stay hooked + && self.clip_load >= 0 && !(self.clip_load >= (time - self.grabber_time_fueldecrease) * grabbered_fuel && self.BUTTON_ATCK2)) // not while hooked and still have ammo to stay hooked { if(self.ammo_fuel >= 1) // we only have one weapon in VT, so nothing else to switch to if we're out of ammo weapon_action(self.weapon, WR_RELOAD); } else if(self.clip_load >= 0 && !self.stat_eaten) // we're not currently reloading or eaten { - if(!self.stat_crosshair_style && self.BUTTON_ATCK && weapon_action(self.weapon, WR_CHECKAMMO1)) // primary attack + if(!self.stat_crosshair_style && self.BUTTON_ATCK2 && weapon_action(self.weapon, WR_CHECKAMMO1)) // primary attack { if(time < self.weapon_delay) return FALSE; @@ -114,7 +114,7 @@ float w_grabber(float req) weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_grabber_primary_animtime"), w_ready); } } - else if (self.BUTTON_ATCK && weapon_action(self.weapon, WR_CHECKAMMO2)) // secondary attack + else if (self.BUTTON_ATCK2 && weapon_action(self.weapon, WR_CHECKAMMO2)) // secondary attack { if (weapon_prepareattack(1, cvar("g_balance_grabber_secondary_refire"))) { @@ -180,7 +180,7 @@ float w_grabber(float req) self.grabber_state |= GRABBER_PULLING; self.grabber_state &~= GRABBER_RELEASING; - if (self.BUTTON_ATCK) + if (self.BUTTON_ATCK2) { // already fired if(self.grabber) diff --git a/docs/Release notes.txt b/docs/Release notes.txt index a9a5abf3..bf226673 100644 --- a/docs/Release notes.txt +++ b/docs/Release notes.txt @@ -266,4 +266,4 @@ Features: - There is no longer a player swallow limit. Players now have a stomach capacity (for predators) and a mass (for prey), both based on player scale. As long as your mass is not exceeded, you can keep swallowing players. This affects your weight and overall player capacity based on player size as well. eg: You might be able to eat only one large player, while you could eat three tiny players or two normal sized players. Stomach size will also reflect your capacity, not the player count, being bigger or smaller based on the prey inside and their sizes compared to yours. By default, a macro player can swallow up to 15 mircos, and a micro up to 1 macro. -- Firing button functionality has been reworked. Both grabber primary and alternate modes are now on the attack1 button, the bolt attack automatically replacing the hook if looking at a surface in its range (crosshair changes to indicate that). The secondary fire button is used to swallow prey instead. This will take some getting used to, but I find it better to keep the swallowing on its own button from grabber fire. You can still hook to a player while swallowing them like before, by holding both firing buttons down. Stomach kicking stays on the same button. +- Firing button functionality has been reworked. Both grabber primary and alternate modes are now on the attack2 button, the bolt attack automatically replacing the hook if looking at a surface in its range (crosshair changes to indicate that). The primary fire button is used to swallow prey only, and to stomach kick. This will take some getting used to, but I find it better to keep the swallowing on its own button from grabber fire. You can still hook to a player while swallowing them like before, by holding both firing buttons down. -- 2.39.2