+void Vore_AutoDigest(entity e)\r
+{\r
+ // if the predator has the autodigest preference enabled, begin digesting new prey automatically\r
+\r
+ if(!cvar("g_vore_digestion") || e.digesting)\r
+ return;\r
+ if(!e.cvar_cl_vore_autodigest || clienttype(e) != CLIENTTYPE_REAL)\r
+ return; // this feature is only for players, not bots\r
+ if(e.stomach_load > 1)\r
+ return; // don't start digestion if we already ate someone, as that means we manually disabled it after the first prey and want it off\r
+ if(Stomach_TeamMates_check(e))\r
+ return; // never begin automatic digestion if we've swallowed a team mate\r
+\r
+ e.digesting = TRUE;\r
+}\r
+\r
+void Vore_SwallowModel_Think()\r
+{\r
+ //update the necessary angles to match our view\r
+ self.angles_x = self.owner.angles_x;\r
+ self.view_ofs = self.owner.view_ofs;\r
+ self.alpha = self.owner.cvar_cl_vore_stomachmodel;\r
+\r
+ // if our swallow progress is gone, the swallow model must also go\r
+ /*if(!self.owner.swallow_progress_prey)\r
+ {\r
+ self.nextthink = 0;\r
+ remove(self);\r
+ self = world;\r
+ return;\r
+ }*/\r
+\r
+ self.nextthink = time;\r
+}\r
+\r
+.entity swallow_model;\r
+void Vore_SwallowModel_Update(entity prey)\r
+{\r
+ // if we don't have a swallow model already, spawn one\r
+ if(!prey.swallow_model)\r
+ {\r
+ prey.swallow_model = spawn();\r
+ \r
+ prey.swallow_model.movetype = MOVETYPE_FOLLOW;\r
+ prey.swallow_model.solid = SOLID_NOT;\r
+\r
+ prey.swallow_model.skin = self.skin;\r
+ prey.swallow_model.scale = self.scale;\r
+\r
+ // apply the properties of the prey\r
+ prey.swallow_model.aiment = prey;\r
+\r
+ prey.swallow_model.owner = prey; // owned by the prey\r
+ prey.swallow_model.enemy = self; // enemy is the predator\r
+ prey.swallow_model.think = Vore_SwallowModel_Think;\r
+ prey.swallow_model.nextthink = time;\r
+ }\r
+\r
+ // if the model or skin of the prey's swallow model don't match those of our current predator, change them\r
+ string swallow_mdl;\r
+ swallow_mdl = strcat(substring(self.playermodel, 0, strlen(self.playermodel) - 4), "_swallow.md3"); // 4 is the extension length\r
+ if(prey.swallow_model.model != swallow_mdl)\r
+ setmodel(prey.swallow_model, swallow_mdl);\r
+ if(prey.swallow_model.skin != self.skin)\r
+ prey.swallow_model.skin = self.skin;\r
+}\r
+\r