]> git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Fix an issue with distributed digestion working in reverse
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 19 Nov 2011 15:00:00 +0000 (17:00 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 19 Nov 2011 15:00:00 +0000 (17:00 +0200)
data/qcsrc/server/t_items.qc
data/qcsrc/server/vore.qc
docs/Release notes.txt

index d351beeb85350d81d83bac27e4e74694791085b2..092b287d4db21a26b2dc97c474d535f470cef06f 100644 (file)
@@ -256,9 +256,8 @@ void Item_Consumable_Think()
 \r
                        damage_offset = 1;\r
                        if(cvar("g_balance_vore_digestion_distribute")) // apply distributed digestion damage\r
-                               damage_offset *= self.predator.stomach_load / self.predator.stomach_maxload;\r
-                       damage_offset = ceil(damage_offset);\r
-                       damage = cvar("g_balance_vore_digestion_damage_item") / damage_offset;\r
+                               damage_offset /= self.predator.stomach_load / self.predator.stomach_maxload;\r
+                       damage = ceil(cvar("g_balance_vore_digestion_damage_item") / damage_offset);\r
 \r
                        self.health -= damage;\r
                        self.predator.health += damage;\r
index d7f55b966172449953f215208f1484284e067fe7..c2f1ee3173e0bb11fed6262e29657b4a0fecdc18 100644 (file)
@@ -454,12 +454,11 @@ void Vore_Digest()
 \r
                damage_offset = 1;\r
                if(cvar("g_balance_vore_digestion_distribute")) // apply distributed digestion damage\r
-                       damage_offset *= self.predator.stomach_load / self.predator.stomach_maxload;\r
+                       damage_offset /= self.predator.stomach_load / self.predator.stomach_maxload;\r
                if(cvar("g_healthsize") && cvar("g_balance_vore_digestion_scalediff")) // apply player scale to digestion damage\r
                        damage_offset *= pow(self.scale / self.predator.scale, cvar("g_balance_vore_digestion_scalediff"));\r
-               damage_offset = ceil(damage_offset);\r
 \r
-               damage = cvar("g_balance_vore_digestion_damage") / damage_offset;\r
+               damage = ceil(cvar("g_balance_vore_digestion_damage") / damage_offset);\r
                if(cvar("g_balance_vore_digestion_damage_death") && self.deadflag != DEAD_NO) // amplify digestion damage for dead prey\r
                        damage *= cvar("g_balance_vore_digestion_damage_death");\r
 \r
index f4245ae2a3008ca134d0a6681bd14ab3fcfaabb2..666131da3d1b598711b4d93a8314f21362776060 100644 (file)
@@ -266,6 +266,8 @@ Bug fixes:
 \r
 - Prevent bots switching to weapons they don't own in order to reload them, causing weird animations.\r
 \r
+- Correct a bug that caused distributed digestion to work in reverse, and amplify instead of reducing.\r
+\r
 Features:\r
 \r
 - There is no longer a player swallow limit. Players have a stomach capacity (for predators) and a mass (for prey), both based on player scale. As long as your mass is not exceeded, you can keep swallowing players. This affects your weight and overall player capacity based on player size as well. eg: You might be able to eat only one large player, three tiny players, or two normal sized players at the same time. Stomach size will also reflect your capacity, not the player count, being bigger or smaller based on the prey inside and their size compared to yours. By default, a macro can swallow up to 15 mircos and a micro up to 1 macro.\r