// 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
\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
// create or update the lasertarget entity\r
\r
// if we are a micro or macro, size the weapon model accordingly\r
- if(self.owner.scale && cvar("g_healthsize_weapon_scalefactor"))\r
- if(self.model != "")\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
self.weaponentity.origin_z = (1 - self.weaponentity.scale) * cvar("g_healthsize_weapon_scalefactor_pos");\r
}\r
};\r