}\r
\r
.entity swallow_model;\r
+float Vore_SwallowModel_CustomizeEntityForClient()\r
+{\r
+ // use the same system as the weapon model\r
+ self.viewmodelforclient = self.owner;\r
+ if(other.classname == "spectator")\r
+ if(other.enemy == self.owner)\r
+ self.viewmodelforclient = other;\r
+ return TRUE;\r
+}\r
+\r
void Vore_SwallowModel_Think()\r
{\r
- //update the position of the swallow model to match our swallow progress\r
+ // update the position of the swallow model to match our swallow progress\r
float dist;\r
dist = (-0.5 + self.owner.swallow_progress_prey) * cvar("g_vore_swallowmodel_range"); // the model is centered at 0.5 progress\r
if(cvar("g_healthsize"))\r
if(!prey.swallow_model)\r
{\r
prey.swallow_model = spawn();\r
-\r
prey.swallow_model.movetype = MOVETYPE_FOLLOW;\r
prey.swallow_model.solid = SOLID_NOT;\r
-\r
- // apply the properties of the prey\r
- prey.swallow_model.viewmodelforclient = prey; // use the same system as the weapon model\r
//prey.swallow_model.effects |= EF_NOGUNBOB; // let it bob\r
prey.swallow_model.effects |= EF_NODEPTHTEST; // don't hide behind walls\r
- prey.swallow_model.colormap = prey.colormap; // pants and shirt color\r
- prey.swallow_model.glowmod = prey.glowmod; // glow color\r
-\r
- prey.swallow_model.owner = prey; // owned by the prey\r
+ prey.swallow_model.owner = prey;\r
+ prey.swallow_model.customizeentityforclient = Vore_SwallowModel_CustomizeEntityForClient;\r
prey.swallow_model.think = Vore_SwallowModel_Think;\r
prey.swallow_model.nextthink = time;\r
}\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
+ if(prey.swallow_model.colormap != pred.colormap)\r
+ prey.swallow_model.colormap = pred.colormap; // pants and shirt color\r
+ if(prey.swallow_model.glowmod != pred.glowmod)\r
+ prey.swallow_model.glowmod = pred.glowmod; // glow color\r
}\r
\r
.entity pusher;\r