self.dmg_take = self.dmg_take + take;//max(take - 10, 0);\r
self.dmg_inflictor = inflictor;\r
\r
- if (self.health <= -cvar("sv_gibhealth") && self.modelindex != 0)\r
- {\r
- // don't use any animations as a gib\r
- self.frame = 0;\r
- self.dead_frame = 0;\r
- // view just above the floor\r
- self.view_ofs = '0 0 4';\r
-\r
- Violence_GibSplash(self, 1, 1, attacker);\r
- self.modelindex = 0; // restore later\r
- self.solid = SOLID_NOT; // restore later\r
- }\r
+ PlayerGib(self, attacker);\r
}\r
\r
void ClientKill_Now_TeamChange();\r
e.pusher = e.predator; // allows us to frag players by regurgitating them in deadly pits\r
e.pushltime = time + cvar("g_maxpushtime");\r
\r
+ // if the dead body of the prey is below gibbing health, gib it\r
+ e.stat_eaten = 0; // necessary for gibs to show\r
+ PlayerGib(e, e.predator);\r
+\r
// regurgitated prey is given this amount of swallow progress, to simulate being more vulnerable\r
if(cvar("g_balance_vore_swallow_speed_fill") && cvar("g_balance_vore_regurgitate_swallowprogress"))\r
{\r
self.nextthink = time;\r
self.think = explode;\r
}\r
+\r
+void PlayerGib(entity e, entity attacker)\r
+{\r
+ if(e.stat_eaten)\r
+ return; // you can't gib outside of the stomach\r
+\r
+ if (e.health <= -cvar("sv_gibhealth") && e.modelindex != 0)\r
+ {\r
+ // don't use any animations as a gib\r
+ e.frame = 0;\r
+ e.dead_frame = 0;\r
+ // view just above the floor\r
+ e.view_ofs = '0 0 4';\r
+\r
+ Violence_GibSplash(e, 1, 1, attacker);\r
+ e.modelindex = 0; // restore later\r
+ e.solid = SOLID_NOT; // restore later\r
+ }\r
+}\r