self.nextthink = time;\r
}\r
\r
-void Vore_SwallowModel_Update(entity prey)\r
+void Vore_SwallowModel_Update(entity prey, entity pred)\r
{\r
// if we don't have a swallow model already, spawn one\r
if(!prey.swallow_model)\r
\r
// properties that should update whenever possible, but when the predator is available\r
string player_swallowmodel;\r
- player_swallowmodel = strcat(substring(self.playermodel, 0, strlen(self.playermodel) - 4), "_swallow.md3"); // 4 is the extension length\r
+ player_swallowmodel = strcat(substring(pred.playermodel, 0, strlen(pred.playermodel) - 4), "_swallow.md3"); // 4 is the extension length\r
if(prey.swallow_model.model != player_swallowmodel) // player model can be changed while the predator is active\r
setmodel(prey.swallow_model, player_swallowmodel);\r
- if(prey.swallow_model.skin != self.skin) // player skin can be changed while the predator is active\r
- prey.swallow_model.skin = self.skin;\r
+ if(prey.swallow_model.skin != pred.skin) // player skin can be changed while the predator is active\r
+ prey.swallow_model.skin = pred.skin;\r
if(cvar("g_healthsize"))\r
- prey.swallow_model.scale = self.scale / prey.scale; // player size difference\r
- if(prey.swallow_model.enemy != self)\r
- prey.swallow_model.enemy = self; // enemy is the predator\r
+ prey.swallow_model.scale = pred.scale / prey.scale; // player size difference\r
+ if(prey.swallow_model.enemy != pred)\r
+ prey.swallow_model.enemy = pred; // enemy is the predator\r
}\r
\r
.entity pusher;\r
return;\r
}\r
\r
- Vore_SwallowModel_Update(e);\r
+ Vore_SwallowModel_Update(e, self);\r
\r
// increase the progress value until it reaches 1, then swallow the player\r
if(e.swallow_progress_prey < 1)\r
e.pushltime = time + cvar("g_maxpushtime");\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"))\r
+ if(cvar("g_balance_vore_swallow_speed_fill") && cvar("g_balance_vore_regurgitate_swallowprogress"))\r
+ {\r
e.swallow_progress_prey = cvar("g_balance_vore_regurgitate_swallowprogress");\r
+ Vore_SwallowModel_Update(e, e.predator);\r
+ }\r
\r
PlayerSound(e.predator, playersound_regurgitate, CHAN_VOICE, VOICETYPE_PLAYERSOUND);\r
setanim(e.predator, e.predator.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating\r