]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/vore.qc
Play the swing animation on the weapon when stomach kicking. The weapon model now...
[voretournament/voretournament.git] / data / qcsrc / server / vore.qc
index 780a28c153e968b6c5e8ddc1d639588f78e399e0..04767f836d14587394a9dddf07fd02b26c2bf357 100644 (file)
@@ -12,11 +12,11 @@ entity Swallow_player_check()
 {\r
        // check if we can swallow a player instead of firing our weapon\r
 \r
-       vector w_shotorg, w_shotdir;\r
-       w_shotorg = self.origin + self.view_ofs;\r
-       w_shotdir = v_forward;\r
+       vector vore_w_shotorg, vore_w_shotdir;\r
+       vore_w_shotorg = self.origin + self.view_ofs;\r
+       vore_w_shotdir = v_forward;\r
 \r
-       WarpZone_traceline_antilag(self, w_shotorg, w_shotorg + w_shotdir * cvar("g_balance_vore_swallow_range"), FALSE, self, ANTILAG_LATENCY(self));\r
+       WarpZone_traceline_antilag(self, vore_w_shotorg, vore_w_shotorg + vore_w_shotdir * cvar("g_balance_vore_swallow_range"), FALSE, self, ANTILAG_LATENCY(self));\r
        if(trace_fraction < 1)\r
        if(trace_ent.classname == "player")\r
                return trace_ent;\r
@@ -398,6 +398,12 @@ void Vore_StomachKick()
                sound(self.predator, CHAN_PROJECTILE, "weapons/stomachkick.wav", VOL_BASE, ATTN_NORM);\r
                self.predator.punchangle_x -= self.predator.cvar_cl_vore_kick_punchangle;\r
 \r
+               if(self.weapon)\r
+               {\r
+                       // if we still have a weapon, play the swing animation for it\r
+                       weapon_thinkf(WFRAME_FIRE2, time + cvar("g_balance_vore_kick_delay"), w_ready); // only intended to animate the gun, does not do any damage\r
+               }\r
+\r
                if(random() < cvar("g_balance_vore_kick_escapeprobability"))\r
                        Vore_Regurgitate(self);\r
 \r