]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Don't allow scale to be smaller than 0.1, since that breaks stuff
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 2 Aug 2011 10:51:39 +0000 (13:51 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 2 Aug 2011 10:51:39 +0000 (13:51 +0300)
data/qcsrc/server/cl_client.qc
data/qcsrc/server/cl_weaponsystem.qc

index 2b01ef0667d0b657ed9e9b3e7ead0f65cb6b7fc4..053529e67794457633a2bedc8cd0e01a421da064 100644 (file)
@@ -2317,8 +2317,8 @@ void SetPlayerSize()
                // 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
index 1434ac32ab42ab15a5c442233c4e3e3c9c6d235c..5672079495289314298b2f4c21dc7e18ca8b3231 100644 (file)
@@ -758,8 +758,8 @@ void CL_Weaponentity_Think()
        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