]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/vore.qc
Cvars and code comments
[voretournament/voretournament.git] / data / qcsrc / server / vore.qc
index 2a5e7387c1097162b40b6c8d9ac235906bcbf8b4..464afe503b6966e736aa3a0640fadc8deaee8115 100644 (file)
@@ -335,6 +335,10 @@ void Vore_SwallowStep(entity e)
                return;\r
        }\r
 \r
+       // when the predator starts swallowing, play his grab sound\r
+       if(!self.swallow_progress_pred)\r
+               PlayerSound(self, playersound_grab, CHAN_PAIN, VOICETYPE_PLAYERSOUND);\r
+\r
        Vore_SwallowModel_Update(e, self);\r
 \r
        // increase the progress value until it reaches 1, then swallow the player\r
@@ -459,13 +463,14 @@ 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 /= (1 - (self.predator.stomach_load / self.predator.stomach_maxload) * bound(0, cvar("g_balance_vore_digestion_distribute"), 1));\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
 \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
+               if(self.deadflag != DEAD_NO)\r
+                       damage = cvar("g_balance_vore_digestion_damage_death") / damage_offset;\r
+               else\r
+                       damage = cvar("g_balance_vore_digestion_damage") / damage_offset;\r
 \r
                Damage(self, self.predator, self.predator, damage, DEATH_DIGESTION, self.origin, '0 0 0');\r
                if(cvar("g_balance_vore_digestion_vampire") && self.predator.health < cvar("g_balance_vore_digestion_vampire_stable"))\r
@@ -785,6 +790,7 @@ void Vore()
 \r
        // predator wishes to regurgitate his prey\r
        if(self.BUTTON_REGURGITATE && time > self.action_delay)\r
+       if(!self.regurgitate_prepare)\r
        {\r
                if(self.stomach_load)\r
                {\r
@@ -857,9 +863,8 @@ void Vore()
        // apply delayed regurgitating if it was scheduled\r
        if(self.predator.regurgitate_prepare && time > self.predator.regurgitate_prepare)\r
        {\r
-               self.predator.regurgitate_prepare = 0;\r
-               self.predator.complain_vore = time + complain_delay_time; // prevent complaining the next frame if this empties our stomach\r
                Vore_Regurgitate(self);\r
+               self.predator.complain_vore = time + complain_delay_time; // prevent complaining the next frame if this empties our stomach\r
        }\r
 \r
        // execute digesting and team healing\r