set g_vore_regurgitatecolor_fade 0.01 "how quickly the regurgitation color washes off players once they leave the stomach, does not apply to dead bodies"\r
set g_vore_regurgitatecolor_particles 0.75 "players who are dirty from regurgitation generate particles this often, based on the amount of goo they have on them"\r
set g_vore_neighborprey_distance 4 "Distance by which prey inside the same stomach are positioned away from each other. 0 disables seeing neighboring prey"\r
+set g_vore_neighborprey_distance_item 4 "Distance by which items inside the same stomach are positioned away from each other. 0 disables seeing neighboring items"\r
set g_vore_swallowmodel_range 100 "Distance by which the swallow model oscillates based on swallow progress"\r
\r
seta cl_healthsize_fov 0.2 "offset field of view by this amount based on size, to further induce the effect of being large or small"\r
vector PL_CROUCH_MAX = '16 16 25';\r
vector PL_PREY_VIEW_OFS = '0 0 25';\r
\r
+vector CONSUMABLE_VIEW_OFS = '0 0 15';\r
+\r
// Sajt - added these, just as constants. Not sure how you want them actually put in the game, but I just\r
// did this so at least they worked\r
//float GAME_FULLBRIGHT_PLAYERS = 64; /// makes the players model fullbright\r
Item_ScheduleRespawnIn(e, game_starttime - time + ITEM_RESPAWNTIME_INITIAL(e));\r
}\r
\r
+float Item_Consumable_Customizeentityforclient()\r
+{\r
+ if(cvar("g_vore_neighborprey_distance_item") && self.predator == other.predator && !(other.cvar_chase_active || other.classname == "observer"))\r
+ {\r
+ self.alpha = default_player_alpha; // allow seeing neighboring items\r
+ self.effects |= EF_NODEPTHTEST; // don't hide behind the stomach's own EF_NODEPTHTEST\r
+ }\r
+ else\r
+ self.alpha = -1; // hide item\r
+ return TRUE;\r
+}\r
+\r
void Item_Consumable_Spawn(entity e, entity pl)\r
{\r
entity item;\r
item = spawn();\r
item.owner = e;\r
item.classname = "consumable";\r
- setmodel(item, e.model);\r
item.movetype = MOVETYPE_FOLLOW;\r
item.solid = SOLID_NOT;\r
+ setmodel(item, e.model);\r
+ item.health = e.health;\r
+ item.max_health = e.max_health;\r
\r
item.predator = pl;\r
item.aiment = pl;\r
+ item.view_ofs_x = CONSUMABLE_VIEW_OFS_x + crandom() * cvar("g_vore_neighborprey_distance_item");\r
+ item.view_ofs_y = CONSUMABLE_VIEW_OFS_y + crandom() * cvar("g_vore_neighborprey_distance_item");\r
+ item.view_ofs_z = CONSUMABLE_VIEW_OFS_z;\r
+\r
+ item.customizeentityforclient = Item_Consumable_Customizeentityforclient;\r
}\r
\r
float Item_GiveTo(entity item, entity player)\r
// pred is the predator and head is the prey\r
\r
local entity head;\r
- local vector origin_apply;\r
\r
// In order to allow prey to see each other in the stomach, we must position each occupant differently,\r
// else all players overlap in the center. To do this, we use a random origin on all players in the same stomach.\r
{\r
if(head.predator == pred)\r
{\r
- origin_apply_x = PL_PREY_VIEW_OFS_x + crandom() * cvar("g_vore_neighborprey_distance");\r
- origin_apply_y = PL_PREY_VIEW_OFS_y + crandom() * cvar("g_vore_neighborprey_distance");\r
- origin_apply_z = PL_PREY_VIEW_OFS_z;\r
-\r
// since prey have their predators set as an aiment, view_ofs will specify the real origin of prey, not just the view offset\r
- head.view_ofs = origin_apply;\r
+ head.view_ofs_x = PL_PREY_VIEW_OFS_x + crandom() * cvar("g_vore_neighborprey_distance");\r
+ head.view_ofs_y = PL_PREY_VIEW_OFS_y + crandom() * cvar("g_vore_neighborprey_distance");\r
+ head.view_ofs_z = PL_PREY_VIEW_OFS_z;\r
}\r
}\r
}\r