Merge branch 'master' into Mario/wepent_experimental
authorMario <mario@smbclan.net>
Wed, 21 Dec 2016 07:43:38 +0000 (17:43 +1000)
committerMario <mario@smbclan.net>
Wed, 21 Dec 2016 07:43:38 +0000 (17:43 +1000)
1  2 
qcsrc/common/physics/player.qc

@@@ -96,15 -96,8 +96,15 @@@ void PM_ClientMovement_UpdateStatus(ent
  
        // set crouched
        bool do_crouch = PHYS_INPUT_BUTTON_CROUCH(this);
 -      if(this.hook && !wasfreed(this.hook))
 -              do_crouch = false;
 +      for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
 +      {
 +              entity wep = viewmodels[slot];
 +              if(wep.hook && !wasfreed(wep.hook))
 +              {
 +                      do_crouch = false;
 +                      break; // don't bother checking the others
 +              }
 +      }
        if(this.waterlevel >= WATERLEVEL_SWIMMING)
                do_crouch = false;
        if(hud != HUD_NORMAL)
@@@ -615,12 -608,7 +615,12 @@@ void PM_check_hitground(entity this
      this.wasFlying = false;
      if (this.waterlevel >= WATERLEVEL_SWIMMING) return;
      if (time < this.ladder_time) return;
 -    if (this.hook) return;
 +    for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
 +    {
 +      .entity weaponentity = weaponentities[slot];
 +      if(this.(weaponentity).hook)
 +              return;
 +    }
      this.nextstep = time + 0.3 + random() * 0.1;
      trace_dphitq3surfaceflags = 0;
      tracebox(this.origin, this.mins, this.maxs, this.origin - '0 0 1', MOVE_NOMONSTERS, this);
@@@ -815,5 -803,10 +815,10 @@@ void CSQC_ClientMovement_PlayerMove_Fra
  
  #ifdef SVQC
        this.pm_frametime = frametime;
+ #elif defined(CSQC)
+       if((ITEMS_STAT(this) & IT_USING_JETPACK) && !IS_DEAD(this) && !intermission)
+               this.csqcmodel_modelflags |= MF_ROCKET;
+       else
+               this.csqcmodel_modelflags &= ~MF_ROCKET;
  #endif
  }