}\r
}\r
\r
+.entity prey;\r
void Vore()\r
{\r
// main vore code, this is where it all happens\r
\r
- if(vore_frametime > time) //account system frametime\r
- return;\r
- vore_frametime = time + sys_frametime;\r
-\r
Vore_AutoTaunt();\r
\r
// wash the goo away from players once they leave the stomach\r
// Code that addresses predators:\r
// --------------------------------\r
\r
- entity prey;\r
- prey = Swallow_player_check();\r
+ if(vore_frametime <= time) //account system frametime\r
+ {\r
+ self.prey = Swallow_player_check();\r
+ vore_frametime = time + sys_frametime;\r
+ }\r
\r
// attempt to swallow our new prey if we pressed the attack button, and there's any in range\r
self.stat_canswallow = 0;\r
- if(Swallow_condition_check(prey))\r
+ if(Swallow_condition_check(self.prey))\r
{\r
// canswallow stat, used by the HUD\r
- if(teams_matter && prey.team == self.team)\r
+ if(teams_matter && self.prey.team == self.team)\r
self.stat_canswallow = 2;\r
else\r
self.stat_canswallow = 1;\r
\r
if(self.BUTTON_ATCK)\r
- Vore_SwallowStep(prey);\r
+ Vore_SwallowStep(self.prey);\r
}\r
- else if(prey != world)\r
+ else if(self.prey != world)\r
self.stat_canswallow = -1;\r
\r
// toggle digestion, if the player has someone in their stomach\r