]> git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Make the shrink dead prey cvar part of g_healthsize_* and dependent on it
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 2 Aug 2011 13:05:53 +0000 (16:05 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 2 Aug 2011 13:05:53 +0000 (16:05 +0300)
data/balanceVT.cfg
data/defaultVT.cfg
data/qcsrc/server/cl_client.qc

index f8f5f9278b3d12e848a14793d60fd59d24034191..e454f823e4d46ce7808bf44e2bec36a660acac75 100644 (file)
@@ -218,7 +218,6 @@ set g_balance_vore_digestion_vampire 0.2 "amount of health you gain from digesti
 set g_balance_vore_digestion_vampire_stable 150 "maximum amount of health you can gain from digestion (best kept equal or less than g_balance_health_rotstable)"\r
 set g_balance_vore_digestion_distribute 1 "if enabled, digestion is reduced by the amount of prey you have. eg: having 2 prey will reduce digestion strength by 2"\r
 set g_balance_vore_digestion_scalediff 0.5 "if enabled, digestion damage is affected by the size of the predator compared to the size of the prey by this amount"\r
-set g_balance_vore_digestion_shrinkdeadprey 0.5 "dead prey will be shrunken by this amount, the closer it gets to the digestion limit"\r
 set g_balance_vore_teamheal 1 "when enabled, having a team mate in your stomach will keep healing them by this amount"\r
 set g_balance_vore_teamheal_stable 150 "maximum amount of health you can gain from a teamheal (best kept equal or less than g_balance_health_rotstable)"
 set g_balance_vore_kick_damage 30 "amount of damage you can do during stomach kick"
index 6248ad48b1491cba61e8f485fc8307ee07c716dc..18ca153647addc6803f032998700c8a85cdcd7b4 100644 (file)
@@ -1611,6 +1611,7 @@ set g_healthsize_soundfactor 0.5 "The sounds players make are amplified or reduc
 set g_healthsize_exteriorweapon_scalefactor 1 "Amount by which player size resizes the exterior weapon model"\r
 set g_healthsize_weapon_scalefactor 1 "Amount by which player size resizes the view weapon model"\r
 set g_healthsize_weapon_scalefactor_pos 10 "Amount by which the view model is moved vertically based on player size"\r
+set g_healthsize_vore_shrinkdeadprey 0.5 "Dead prey will be shrunken by this amount, the closer it gets to the digestion limit"\r
 set g_healthsize_vore_pos 1 "Amount by which view height changes for prey, based on the size difference between them and their predator"\r
 set g_healthsize_min 50 "Player size may not drop below this amount of health"\r
 set g_healthsize_max 150 "Player size may not grow past this amount of health"\r
index 674cce3c46f40e2a5fc95ca380567b8f3a59faca..dc48db11bda55f5288ad1231d0a29f3f4e21385d 100644 (file)
@@ -2312,39 +2312,40 @@ float vercmp(string v1, string v2)
 \r
 void SetPlayerSize()\r
 {\r
+       if(!cvar("g_healthsize"))\r
+       {\r
+               self.scale = 0;\r
+               return;\r
+       }\r
        // don't scale dead players who aren't prey\r
        if(!self.stat_eaten && self.deadflag != DEAD_NO)\r
                return;\r
 \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
+       // change player scale based on the amount of health we have\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
-               }\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
+       // 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
-       if(cvar("g_balance_vore_digestion_shrinkdeadprey") && cvar("g_balance_vore_digestion_limit") < 0)\r
+       if(cvar("g_healthsize_vore_shrinkdeadprey") && cvar("g_balance_vore_digestion_limit") < 0)\r
        if(self.deadflag != DEAD_NO && self.stat_eaten)\r
        {\r
                // dead prey must shrink toward zero as they digest, until they reach digestion limit\r
-               self.scale *= 1 - bound(0, (self.health / cvar("g_balance_vore_digestion_limit")) * cvar("g_balance_vore_digestion_shrinkdeadprey"), 1);\r
+               self.scale *= 1 - bound(0, (self.health / cvar("g_balance_vore_digestion_limit")) * cvar("g_healthsize_vore_shrinkdeadprey"), 1);\r
        }\r
 \r
        if(self.scale < 0.1)\r