Play the swing animation on the weapon when stomach kicking. The weapon model now...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 16 Apr 2011 23:09:59 +0000 (02:09 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 16 Apr 2011 23:09:59 +0000 (02:09 +0300)
data/qcsrc/server/progs.src
data/qcsrc/server/vore.qc

index 32bd467..4755d45 100644 (file)
@@ -73,8 +73,6 @@ teamplay.qc
 \r
 cl_physics.qc\r
 \r
-vore.qc\r
-\r
 // tZork's libs\r
 verbstack.qc\r
 movelib.qc\r
@@ -98,6 +96,8 @@ w_common.qc
 \r
 w_all.qc\r
 \r
+vore.qc\r
+\r
 t_items.qc\r
 cl_weapons.qc\r
 cl_impulse.qc\r
index 780a28c..04767f8 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