From: Samual Lenks Date: Mon, 23 Jul 2012 19:43:26 +0000 (-0400) Subject: Fix melee X-Git-Tag: xonotic-v0.8.0~152^2~408^2~47 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2ff1b127191eec2043458705e22a54b81a33885c;p=xonotic%2Fxonotic-data.pk3dir.git Fix melee --- diff --git a/qcsrc/server/w_laser.qc b/qcsrc/server/w_laser.qc index 1e067647b..1a2b2e8de 100644 --- a/qcsrc/server/w_laser.qc +++ b/qcsrc/server/w_laser.qc @@ -403,7 +403,7 @@ float w_laser(float req) case 1: // normal projectile secondary { - if(weapon_prepareattack(0, autocvar_g_balance_laser_secondary_refire)) + if(weapon_prepareattack(1, autocvar_g_balance_laser_secondary_refire)) { W_DecreaseAmmo(ammo_none, 1, TRUE); W_Laser_Attack(TRUE); @@ -415,12 +415,12 @@ float w_laser(float req) case 2: // melee attack secondary { - if (self.clip_load >= 0) // we are not currently reloading if (!self.crouch) // we are not currently crouching; this fixes an exploit where your melee anim is not visible, and besides wouldn't make much sense if (weapon_prepareattack(1, autocvar_g_balance_laser_secondary_refire)) { // attempt forcing playback of the anim by switching to another anim (that we never play) here... - weapon_thinkf(WFRAME_FIRE1, 0, W_Laser_Melee); + W_Laser_Melee(); + weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_laser_secondary_animtime, w_ready); } } }