Do update health-based scale for prey, just not the view offset
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 2 May 2011 20:35:28 +0000 (23:35 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 2 May 2011 20:35:28 +0000 (23:35 +0300)
data/qcsrc/server/cl_client.qc

index 25c9eb6ecdf4c42103f3c7a4e932e0ccc48bee00..7bab869432e0e17ba68ac7743e31fc78e88e0918 100644 (file)
@@ -2253,24 +2253,23 @@ void ApplyHealthSize()
        if not(cvar("g_healthsize"))\r
                return;\r
 \r
-       if not(self.predator.classname == "player" || self.fakeprey)\r
-       {\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
-               // 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
+       // 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
+               if not(self.predator.classname == "player" || self.fakeprey)\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
+       }\r
+       else\r
+       {\r
+               //setsize (self, PL_MIN * self.scale, PL_MAX * self.scale);\r
+               if not(self.predator.classname == "player" || self.fakeprey)\r
                        self.view_ofs = PL_VIEW_OFS * self.scale;\r
-               }\r
        }\r
 }\r
 \r