From 20eda34372e3b82347f906d93430f6f7aba920ea Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sun, 17 Apr 2011 02:09:59 +0300 Subject: [PATCH] Play the swing animation on the weapon when stomach kicking. The weapon model now shows when in the stomach as well (if you still have your grabber), which I forgot to mention in the last commits. --- data/qcsrc/server/progs.src | 4 ++-- data/qcsrc/server/vore.qc | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/data/qcsrc/server/progs.src b/data/qcsrc/server/progs.src index 32bd4673..4755d45d 100644 --- a/data/qcsrc/server/progs.src +++ b/data/qcsrc/server/progs.src @@ -73,8 +73,6 @@ teamplay.qc cl_physics.qc -vore.qc - // tZork's libs verbstack.qc movelib.qc @@ -98,6 +96,8 @@ w_common.qc w_all.qc +vore.qc + t_items.qc cl_weapons.qc cl_impulse.qc diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 780a28c1..04767f83 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -12,11 +12,11 @@ entity Swallow_player_check() { // check if we can swallow a player instead of firing our weapon - vector w_shotorg, w_shotdir; - w_shotorg = self.origin + self.view_ofs; - w_shotdir = v_forward; + vector vore_w_shotorg, vore_w_shotdir; + vore_w_shotorg = self.origin + self.view_ofs; + vore_w_shotdir = v_forward; - WarpZone_traceline_antilag(self, w_shotorg, w_shotorg + w_shotdir * cvar("g_balance_vore_swallow_range"), FALSE, self, ANTILAG_LATENCY(self)); + WarpZone_traceline_antilag(self, vore_w_shotorg, vore_w_shotorg + vore_w_shotdir * cvar("g_balance_vore_swallow_range"), FALSE, self, ANTILAG_LATENCY(self)); if(trace_fraction < 1) if(trace_ent.classname == "player") return trace_ent; @@ -398,6 +398,12 @@ void Vore_StomachKick() sound(self.predator, CHAN_PROJECTILE, "weapons/stomachkick.wav", VOL_BASE, ATTN_NORM); self.predator.punchangle_x -= self.predator.cvar_cl_vore_kick_punchangle; + if(self.weapon) + { + // if we still have a weapon, play the swing animation for it + weapon_thinkf(WFRAME_FIRE2, time + cvar("g_balance_vore_kick_delay"), w_ready); // only intended to animate the gun, does not do any damage + } + if(random() < cvar("g_balance_vore_kick_escapeprobability")) Vore_Regurgitate(self); -- 2.39.2