+}\r
+\r
+void Item_DroppedConsumable_Touch()\r
+{\r
+ if(time < self.cnt)\r
+ return;\r
+\r
+ // give the consumable item to the player touching it\r
+ if not(other.stomach_load + self.dmg > other.stomach_maxload || other.stomach_load + self.initdmg > other.stomach_maxload)\r
+ if not(!cvar("g_balance_health_consumable_alwayspickup") && other.health >= self.max_health)\r
+ {\r
+ Item_Consumable_Spawn(self, other);\r
+ remove(self);\r
+ self = world;\r
+ }\r
+}\r
+\r
+void Item_DroppedConsumable_Spawn(entity e)\r
+{\r
+ entity item;\r
+ item = spawn();\r
+ item.owner = world;\r
+ item.classname = "droppedconsumable";\r
+ item.movetype = MOVETYPE_TOSS;\r
+ item.solid = SOLID_TRIGGER;\r
+ setmodel(item, e.model);\r
+ item.health = e.health;\r
+ item.inithealth = e.inithealth;\r
+ item.initdmg = e.initdmg;\r
+ item.max_health = e.max_health;\r
+ item.scale = e.scale;\r
+ item.colormod = e.colormod;\r
+\r
+ if(cvar("g_nodepthtestitems"))\r
+ item.effects |= EF_NODEPTHTEST;\r
+\r
+ float scalediff, sz;\r
+ sz = e.scale ? e.scale : 1; // the line below does not work if I define this directly (fteqcc bug?)\r
+ scalediff = cvar("g_healthsize") ? sz / e.predator.scale : sz; // the tighter the gut, the greater the velocity\r
+\r
+ setorigin(item, e.predator.origin);\r
+ item.angles_y = e.predator.angles_y;\r
+ makevectors(e.predator.v_angle);\r
+ item.velocity = v_forward * cvar("g_balance_vore_regurgitate_force") * scalediff;\r
+ e.predator.velocity = e.predator.velocity + (-v_forward * cvar("g_balance_vore_regurgitate_predatorforce") * scalediff); // don't use += here to avoid a fteqcc bug\r
+ item.touch = Item_DroppedConsumable_Touch;\r
+ item.cnt = time + 1; // 1 second delay\r
+ SUB_SetFade(item, time + 20, 1);\r