Allow scaling prey down when the neighboring prey feature is enable. Don't enable...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 May 2011 22:56:17 +0000 (01:56 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 May 2011 22:56:17 +0000 (01:56 +0300)
data/defaultVT.cfg
data/qcsrc/server/cl_client.qc

index 3a56068a2e2e27f86862dec6b59c9bedde7e2cbd..575d34c74ab2034676f3ebd30d1a6ca7686c2a2e 100644 (file)
@@ -1565,6 +1565,7 @@ set g_vore_regurgitatecolor_release_fade 0.01 "how quickly the regurgitation col
 set g_vore_regurgitatecolor_digest "0.15 0.25 0" "the color players will have when digested, only works when g_vore_keepdeadprey is disabled"\r
 set g_vore_keepdeadprey 0.75 "If enabled, prey remains in the stomach after dying, else the predator throws up their dead body. 0 = disabled, 1 = ernabled, anything between = probability"\r
 set g_vore_neighborprey_distance 16 "Distance by which prey inside the same stomach are positioned away from each other. 0 disables seeing neighboring prey"\r
+set g_vore_neighborprey_scale 1 "When neighborprey is enabled, all prey is resized by this amount"\r
 \r
 set g_healthsize 100 "Players who are low on health shrink and become smaller, value specifies health at which the player has default size"\r
 set g_healthsize_movementfactor 0.5 "Amount by which player size affects jumping and running"\r
index e954308e523c636d7ef7e5437c5c73130e720f5e..33a001828160eefb37b70680632ff89071d3bff0 100644 (file)
@@ -2277,30 +2277,36 @@ float vercmp(string v1, string v2)
        return vercmp_recursive(v1, v2);\r
 }\r
 \r
-void ApplyHealthSize()\r
+void SetPlayerSize()\r
 {\r
-       // change player scale based on the amount of health we have\r
-\r
-       if not(cvar("g_healthsize"))\r
-               return;\r
+       if(cvar("g_healthsize"))\r
+       {\r
+               // 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
+               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
-               if(!self.stat_eaten)\r
-                       self.view_ofs = PL_CROUCH_VIEW_OFS * 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(!self.stat_eaten)\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
+                       if(!self.stat_eaten)\r
+                               self.view_ofs = PL_VIEW_OFS * self.scale;\r
+               }\r
        }\r
-       else\r
+\r
+       if(self.stat_eaten && cvar("g_vore_neighborprey_distance"))\r
        {\r
-               //setsize (self, PL_MIN * self.scale, PL_MAX * self.scale);\r
-               if(!self.stat_eaten)\r
-                       self.view_ofs = PL_VIEW_OFS * self.scale;\r
+               // resize prey\r
+               self.scale *= cvar("g_vore_neighborprey_scale");\r
        }\r
 }\r
 \r
@@ -2626,7 +2632,7 @@ void PlayerPreThink (void)
                        }\r
                }\r
 \r
-               ApplyHealthSize();\r
+               SetPlayerSize();\r
 \r
                FixPlayermodel();\r
 \r