]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Rework the buttons yet again. Both grabber modes is on the alt fire button, while...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 19 Jul 2011 13:54:10 +0000 (16:54 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 19 Jul 2011 13:54:10 +0000 (16:54 +0300)
data/qcsrc/server/bot/havocbot/vore_ai.qc
data/qcsrc/server/vore.qc
data/qcsrc/server/w_grabber.qc
docs/Release notes.txt

index 52be2a4120dac13b74109c7a984be3c7ef433fbd..e582678a63996dd61e8e5c9291775df31a3156a7 100644 (file)
@@ -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:
 
index 855b402eb1f5d5d92a90f4cd384d677d47b204da..febc062e7cf86f2410a66f90941a1357992c6c31 100644 (file)
@@ -60,7 +60,7 @@ float Swallow_condition_check(entity prey)
 \r
                if(swallow_complain != "")\r
                {\r
-                       if(time > self.complain_vore && self.BUTTON_ATCK2)\r
+                       if(time > self.complain_vore && self.BUTTON_ATCK)\r
                        {\r
                                play2(self, "misc/forbidden.wav");\r
                                sprint(self, swallow_complain);\r
@@ -782,7 +782,7 @@ void Vore()
                else\r
                        self.stat_canswallow = 1;\r
 \r
-               if(self.BUTTON_ATCK2)\r
+               if(self.BUTTON_ATCK)\r
                        Vore_SwallowStep(prey);\r
        }\r
        else if(prey != world)\r
index bd5f3431e72603f42ea254fa50e602580fe61b6c..611b69c253afa8577c4602fb56e76f03fd8eb6d9 100644 (file)
@@ -89,14 +89,14 @@ float w_grabber(float req)
                grabbered_fuel = cvar("g_balance_grabber_primary_grabbered_fuel");\r
                // forced reload\r
                if(cvar("g_balance_grabber_reload_ammo") && self.clip_load < min(cvar("g_balance_grabber_primary_ammo"), cvar("g_balance_grabber_secondary_ammo"))\r
-               && 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\r
+               && 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\r
                {\r
                        if(self.ammo_fuel >= 1) // we only have one weapon in VT, so nothing else to switch to if we're out of ammo\r
                                weapon_action(self.weapon, WR_RELOAD);\r
                }\r
                else if(self.clip_load >= 0 && !self.stat_eaten) // we're not currently reloading or eaten\r
                {\r
-                       if(!self.stat_crosshair_style && self.BUTTON_ATCK && weapon_action(self.weapon, WR_CHECKAMMO1)) // primary attack\r
+                       if(!self.stat_crosshair_style && self.BUTTON_ATCK2 && weapon_action(self.weapon, WR_CHECKAMMO1)) // primary attack\r
                        {\r
                                if(time < self.weapon_delay)\r
                                        return FALSE;\r
@@ -114,7 +114,7 @@ float w_grabber(float req)
                                        weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_grabber_primary_animtime"), w_ready);                               \r
                                }\r
                        }\r
-                       else if (self.BUTTON_ATCK && weapon_action(self.weapon, WR_CHECKAMMO2)) // secondary attack\r
+                       else if (self.BUTTON_ATCK2 && weapon_action(self.weapon, WR_CHECKAMMO2)) // secondary attack\r
                        {\r
                                if (weapon_prepareattack(1, cvar("g_balance_grabber_secondary_refire")))\r
                                {\r
@@ -180,7 +180,7 @@ float w_grabber(float req)
                self.grabber_state |= GRABBER_PULLING;\r
                self.grabber_state &~= GRABBER_RELEASING;\r
 \r
-               if (self.BUTTON_ATCK)\r
+               if (self.BUTTON_ATCK2)\r
                {\r
                        // already fired\r
                        if(self.grabber)\r
index a9a5abf35b01e5fb4905eb072dacc549819725bf..bf2266737c1248581273e3ce4398d4bb95b24627 100644 (file)
@@ -266,4 +266,4 @@ Features:
 \r
 - 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.\r
 \r
-- 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.\r
+- 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.\r