set g_healthsize_exteriorweapon_scalefactor 1 "Amount by which player size resizes the exterior weapon model"\r
set g_healthsize_weapon_scalefactor 1 "Amount by which player size resizes the view weapon model"\r
set g_healthsize_weapon_scalefactor_pos 10 "Amount by which the view model is moved vertically based on player size"\r
+set g_healthsize_vore_pos 4 "Amount by which view height changes for prey, based on the size difference between them and their predator"\r
set g_healthsize_min 50 "Player size may not drop below this amount of health"\r
set g_healthsize_max 150 "Player size may not grow past this amount of health"\r
\r
if not(cvar("g_healthsize"))\r
return;\r
\r
- self.scale = bound(cvar("g_healthsize_min"), self.health, cvar("g_healthsize_max")) / cvar("g_healthsize");\r
+ self.scale = bound(cvar("g_healthsize_min"), self.health, cvar("g_healthsize_max")) / cvar("g_healthsize");\r
\r
// The following code sets the bounding box to match the player's size.\r
// It is currently disabled because of issues with engine movement prediction (cl_movement).\r
vector PL_CROUCH_VIEW_OFS = '0 0 15';\r
vector PL_CROUCH_MIN = '-16 -16 -24';\r
vector PL_CROUCH_MAX = '16 16 25';\r
-vector PL_PREY_VIEW_OFS = '0 0 15';\r
+vector PL_PREY_VIEW_OFS = '0 0 35';\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
else\r
self.cameraeffect_current = self.cameraeffect_target;\r
\r
+ self.view_ofs_x = PL_PREY_VIEW_OFS_x;\r
+ self.view_ofs_y = PL_PREY_VIEW_OFS_y;\r
self.view_ofs_z = PL_PREY_VIEW_OFS_z / self.cameraeffect_current;\r
- if(self.predator.scale)\r
- self.view_ofs_z *= self.predator.scale;\r
- else if(self.fakepredator.scale)\r
- self.view_ofs_z *= self.fakepredator.scale;\r
+\r
+ float prey_height;\r
+ if(self.fakeprey)\r
+ prey_height = (self.scale - self.fakepredator.scale) * cvar("g_healthsize_vore_pos");\r
+ else\r
+ prey_height = (self.scale - self.predator.scale) * cvar("g_healthsize_vore_pos");\r
+ self.view_ofs_z += prey_height;\r
}\r
\r
.float gurgle_oldstomachload;\r