// change player scale based on the amount of health we have\r
\r
self.scale = bound(cvar("g_healthsize_min"), self.health, cvar("g_healthsize_max")) / cvar("g_healthsize");\r
- if(self.scale <= 0)\r
- self.scale = 0.00001; // 0 becomes 1 for scale, so do this to allow almost 0 scale\r
+ if(self.scale < 0.1)\r
+ self.scale = 0.1; // stuff breaks if scale is smaller than this\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
if(cvar("g_healthsize") && cvar("g_healthsize_weapon_scalefactor"))\r
{\r
self.weaponentity.scale = (1 + cvar("g_healthsize_weapon_scalefactor")) - cvar("g_healthsize_weapon_scalefactor") * self.owner.scale;\r
- if(self.weaponentity.scale <= 0)\r
- self.weaponentity.scale = 0.00001; // 0 becomes 1 for scale, so do this to allow almost 0 scale\r
+ if(self.weaponentity.scale < 0.1)\r
+ self.weaponentity.scale = 0.1; // stuff breaks if scale is smaller than this\r
self.weaponentity.origin_z = (1 - self.weaponentity.scale) * cvar("g_healthsize_weapon_scalefactor_pos");\r
}\r
};\r