]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/vore.qc
Tilted view when receiving stomach kicks
[voretournament/voretournament.git] / data / qcsrc / server / vore.qc
index 30dcec81c016b58f58073a376c16800b4b3ead21..e5452e6a739c3775376955e8438afe1241da7d68 100644 (file)
@@ -388,6 +388,7 @@ void Vore_StomachKick()
                damage = ceil(random() * (cvar("g_balance_vore_kick_damage_max") - cvar("g_balance_vore_kick_damage_min")) + cvar("g_balance_vore_kick_damage_min"));\r
                Damage(self.predator, self, self, damage, DEATH_STOMACHKICK, self.predator.origin, v_forward * cvar("g_balance_vore_kick_force"));\r
                sound(self.predator, CHAN_PROJECTILE, "weapons/stomachkick.ogg", VOL_BASE, ATTN_NORM);\r
+               self.predator.punchangle_x -= self.predator.cvar_cl_vore_kick_punchangle;\r
 \r
                if(random() < cvar("g_balance_vore_kick_escapeprobability"))\r
                        Vore_Regurgitate(self);\r
@@ -414,19 +415,36 @@ void Vore_AutoTaunt()
 {\r
        // triggers ambient vore taunts, for both pred and prey\r
 \r
+       float taunt_time;\r
+\r
        // predator taunts\r
        if(self.stomach_load && !Stomach_TeamMates_check(self))\r
        {\r
-               // taunt_soundtime is set to 0 after the taunt has played, so this indicates a new start\r
-               if(!self.taunt_soundtime)\r
+               if(!self.taunt_soundtime) // taunt_soundtime becomes 0 once the taunt has played\r
                {\r
-                       SetAutoTaunt(self, time, TRUE, TAUNTTYPE_VOREPRED);\r
+                       taunt_time = random() * (cvar("sv_vore_autotaunt_repeat_max") - cvar("sv_vore_autotaunt_repeat_min")) + cvar("sv_vore_autotaunt_repeat_min");\r
+                       SetAutoTaunt(self, time + taunt_time, TAUNTTYPE_VOREPRED);\r
                }\r
        }\r
        else if(self.taunt_soundtype == TAUNTTYPE_VOREPRED)\r
        {\r
-               // we have a predator taunt scheduled, but we're no longer a predator, so remove it\r
-               SetAutoTaunt(self, 0, FALSE, 0);\r
+               // we have a predator taunt scheduled, but are no longer a (suitable) predator, so remove it\r
+               SetAutoTaunt(self, 0, 0);\r
+       }\r
+\r
+       // prey taunts\r
+       if(self.predator.classname == "player" && !(teams_matter && self.team == self.predator.team))\r
+       {\r
+               if(!self.taunt_soundtime) // taunt_soundtime becomes 0 once the taunt has played\r
+               {\r
+                       taunt_time = random() * (cvar("sv_vore_autotaunt_repeat_max") - cvar("sv_vore_autotaunt_repeat_min")) + cvar("sv_vore_autotaunt_repeat_min");\r
+                       SetAutoTaunt(self, time + taunt_time, TAUNTTYPE_VOREPREY);\r
+               }\r
+       }\r
+       else if(self.taunt_soundtype == TAUNTTYPE_VOREPREY)\r
+       {\r
+               // we have a prey taunt scheduled, but are no longer a (suitable) prey, so remove it\r
+               SetAutoTaunt(self, 0, 0);\r
        }\r
 }\r
 \r
@@ -517,9 +535,18 @@ void Vore()
        prey = Swallow_player_check();\r
 \r
        // attempt to swallow our new prey if we pressed the attack button, and there's any in range\r
-       if(self.BUTTON_ATCK)\r
+       self.stat_canswallow = 0;\r
        if(Swallow_condition_check(prey))\r
-               Vore_Swallow(prey);\r
+       {\r
+               // canswallow stat, used by the HUD\r
+               if(teams_matter && prey.team == self.team)\r
+                       self.stat_canswallow = 2;\r
+               else\r
+                       self.stat_canswallow = 1;\r
+\r
+               if(self.BUTTON_ATCK)\r
+                       Vore_Swallow(prey);\r
+       }\r
 \r
        // toggle digestion, if the player has someone in their stomach\r
        if(self.BUTTON_DIGEST && cvar("g_vore_digestion"))\r