if not(cvar("g_healthsize"))\r
return;\r
\r
- self.scale = self.health / 100; // ranges between 0 and 100\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
- // The engine expects the bounding box to be default size, and changing it will cause glitches.\r
- // This code may be enabled once the engine has the ability to use different bbox sizes for movement prediction.\r
- if(self.crouch)\r
+ if(self.predator.classname == "player" || self.fakeprey)\r
{\r
- //setsize (self, PL_CROUCH_MIN * self.scale, PL_CROUCH_MAX * self.scale);\r
- self.view_ofs = PL_CROUCH_VIEW_OFS * self.scale;\r
+ self.view_ofs = PL_CROUCH_VIEW_OFS * self.predator.scale;\r
+ self.scale = 0;\r
}\r
else\r
{\r
- //setsize (self, PL_MIN * self.scale, PL_MAX * self.scale);\r
- self.view_ofs = PL_VIEW_OFS * self.scale;\r
+ self.scale = self.health / 100; // ranges between 0 and 100\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
+ // The engine expects the bounding box to be default size, and changing it will cause glitches.\r
+ // This code may be enabled once the engine has the ability to use different bbox sizes for movement prediction.\r
+ if(self.crouch)\r
+ {\r
+ //setsize (self, PL_CROUCH_MIN * self.scale, PL_CROUCH_MAX * self.scale);\r
+ self.view_ofs = PL_CROUCH_VIEW_OFS * self.scale;\r
+ }\r
+ else\r
+ {\r
+ //setsize (self, PL_MIN * self.scale, PL_MAX * self.scale);\r
+ self.view_ofs = PL_VIEW_OFS * self.scale;\r
+ }\r
}\r
}\r
\r