prey.swallow_model.aiment = prey;\r
\r
prey.swallow_model.owner = prey; // owned by the prey\r
- prey.swallow_model.enemy = self; // enemy is the predator\r
prey.swallow_model.think = Vore_SwallowModel_Think;\r
prey.swallow_model.nextthink = time;\r
}\r
\r
- // if the model or skin of the prey's swallow model don't match those of our current predator, change them\r
- string swallow_mdl;\r
- swallow_mdl = strcat(substring(self.playermodel, 0, strlen(self.playermodel) - 4), "_swallow.md3"); // 4 is the extension length\r
- if(prey.swallow_model.model != swallow_mdl)\r
- setmodel(prey.swallow_model, swallow_mdl);\r
- if(prey.swallow_model.skin != self.skin)\r
+ // if predator has changed, update the swallow model\r
+ if(prey.swallow_model.enemy != self)\r
+ {\r
+ setmodel(prey.swallow_model, strcat(substring(self.playermodel, 0, strlen(self.playermodel) - 4), "_swallow.md3")); // 4 is the extension length\r
prey.swallow_model.skin = self.skin;\r
+ prey.swallow_model.enemy = self; // enemy is the predator\r
+ }\r
}\r
\r
.entity pusher;\r