Merge remote-tracking branch 'origin/fruitiex/disable-shootanim'
authorRudolf Polzer <divverent@alientrap.org>
Sat, 14 May 2011 12:33:46 +0000 (14:33 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 14 May 2011 12:33:46 +0000 (14:33 +0200)
1  2 
qcsrc/server/cl_weapons.qc
qcsrc/server/cl_weaponsystem.qc

@@@ -197,7 -197,6 +197,7 @@@ string W_ThrowNewWeapon(entity own, flo
                self = oldself;
                if(startitem_failed)
                        return string_null;
 +              wep.glowmod = own.weaponentity_glowmod;
                wep.think = thrown_wep_think;
                wep.nextthink = time + 0.5;
                return "";
                        }
                        s = substring(s, 5, -1);
                }
 +              wep.glowmod = own.weaponentity_glowmod;
                wep.think = thrown_wep_think;
                wep.nextthink = time + 0.5;
                return s;
@@@ -284,8 -282,6 +284,8 @@@ void W_ThrowWeapon(vector velo, vector 
        w = self.weapon;
        if (w == 0)
                return; // just in case
 +      if(self.weapon_forbidchange)
 +              return;
        if(MUTATOR_CALLHOOK(ForbidThrowCurrentWeapon))
                return;
        if(!autocvar_g_weapon_throwable)
@@@ -348,7 -344,7 +348,7 @@@ void W_WeaponFrame(
        {
                if (self.weaponentity.state == WS_CLEAR)
                {
-                       setanim(self, self.anim_draw, FALSE, TRUE, TRUE);
+                       //setanim(self, self.anim_draw, FALSE, TRUE, TRUE);
                        self.weaponentity.state = WS_RAISE;
                        weapon_action(self.switchweapon, WR_SETUP);
  
                        v_forward = fo;
                        v_right = ri;
                        v_up = up;
 -                      self.weaponentity_glowmod = '0 0 0'; // reset glowmod, weapon think function only *might* set it
                        weapon_action(self.weapon, WR_THINK);
                }
                if (time + self.weapon_frametime * 0.5 >= self.weapon_nextthink)
@@@ -34,10 -34,6 +34,10 @@@ float W_WeaponRateFactor(
  
  void W_SwitchWeapon_Force(entity e, float w)
  {
 +      // don't switch to another weapon if we're not allowed to
 +      if(e.weapon_forbidchange)
 +              return;
 +
        e.cnt = e.switchweapon;
        e.switchweapon = w;
        e.selectweapon = w;
@@@ -1257,18 -1253,18 +1257,21 @@@ void weapon_thinkf(float fr, float t, v
        self.weapon_think = func;
        //dprint("next ", ftos(self.weapon_nextthink), "\n");
  
+     // The shoot animation looks TERRIBLE without animation blending! Yay for moonwalking while shooting!
+     /*
        if (restartanim)
        if (t)
        if (!self.crouch) // shoot anim stands up, this looks bad
        {
                local vector anim;
 -              anim = self.anim_shoot;
 +              if(self.weapon == WEP_SHOTGUN && self.BUTTON_ATCK2)
 +                      anim = self.anim_melee;
 +              else
 +                      anim = self.anim_shoot;
                anim_z = anim_y / (t + sys_frametime);
                setanim(self, anim, FALSE, TRUE, TRUE);
        }
+     */
  };
  
  void weapon_boblayer1(float spd, vector org)