pl.last_pickup = time;\r
}\r
\r
+float Item_Swallow(entity item, entity player);\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
+ if(Item_Swallow(self, other))\r
{\r
- Item_Consumable_Spawn(self, other);\r
remove(self);\r
self = world;\r
}\r
setmodel(item, e.model);\r
item.health = e.health;\r
item.inithealth = e.inithealth;\r
+ item.dmg = e.dmg;\r
item.initdmg = e.initdmg;\r
item.max_health = e.max_health;\r
item.scale = e.scale;\r
float Item_Swallow(entity item, entity player)\r
{\r
float pickedup, usage;\r
- pickedup = FALSE;\r
if(item.dmg && cvar("g_vore"))\r
{\r
if(player.stomach_load + item.dmg <= player.stomach_maxload)\r
return;\r
\r
self.swallow_progress_prey = max(0, self.swallow_progress_prey - 0.01);\r
- self.alpha = 1 / self.swallow_progress_prey;\r
+ self.alpha = 1 - self.swallow_progress_prey;\r
}\r
\r
void Item_Touch (void)\r