Item_ScheduleRespawnIn(e, game_starttime - time + ITEM_RESPAWNTIME_INITIAL(e));\r
}\r
\r
-.float inithealth;\r
+.float inithealth, initdmg;\r
.float item_digestion_step;\r
void Item_Consumable_Remove(entity e, float regurgitate);\r
void Item_Consumable_Think()\r
return;\r
}\r
\r
+ self.scale = self.health / self.inithealth; // scale matches the item's digestion progress\r
+ self.dmg = self.initdmg * self.scale;\r
+ if(self.health < 1)\r
+ {\r
+ // this item is done\r
+ Item_Consumable_Remove(self, FALSE);\r
+ return;\r
+ }\r
+\r
if(self.predator.digesting)\r
{\r
if(time > self.item_digestion_step)\r
\r
self.health -= damage;\r
self.predator.health += damage;\r
- self.scale = self.health / self.inithealth; // scale matches the item's digestion progress\r
+\r
+ self.item_digestion_step = time + vore_steptime;\r
}\r
\r
if(stov(cvar_string("g_vore_regurgitatecolor_color_digest")))\r
self.colormod = stov(cvar_string("g_vore_regurgitatecolor_color_digest"));\r
-\r
- self.item_digestion_step = time + vore_steptime;\r
}\r
\r
self.nextthink = time;\r
item.health = e.health;\r
item.inithealth = e.health;\r
item.max_health = e.max_health;\r
- item.dmg = e.dmg;\r
+ item.initdmg = e.dmg;\r
\r
item.predator = pl;\r
item.aiment = pl;\r
item.health = e.health;\r
item.inithealth = e.inithealth;\r
item.max_health = e.max_health;\r
- item.dmg = e.dmg;\r
+ item.initdmg = e.initdmg;\r
item.scale = e.scale;\r
item.colormod = e.colormod;\r
\r