X-Git-Url: http://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=blobdiff_plain;f=data%2Fqcsrc%2Fserver%2Fvore.qc;h=04767f836d14587394a9dddf07fd02b26c2bf357;hp=780a28c153e968b6c5e8ddc1d639588f78e399e0;hb=20eda34372e3b82347f906d93430f6f7aba920ea;hpb=9fcd3eefc7494e10202b3816d96e3be76a746d1a 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);