]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/client.qc
Merge branch 'master' into Mario/crouch
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / client.qc
index 7a4f82fc5b2c33d317204992b5973e987dc9181d..918f38b2d6d8c931730dc59431b0d4abfa024410 100644 (file)
@@ -2246,43 +2246,6 @@ bool PlayerThink(entity this)
                return false;
        }
 
-       bool have_hook = false;
-       for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
-       {
-               .entity weaponentity = weaponentities[slot];
-               if(this.(weaponentity).hook.state)
-               {
-                       have_hook = true;
-                       break;
-               }
-       }
-       bool do_crouch = PHYS_INPUT_BUTTON_CROUCH(this);
-       if (have_hook) {
-               do_crouch = false;
-       //} else if (this.waterlevel >= WATERLEVEL_SWIMMING) {
-               //do_crouch = false;
-       } else if (this.vehicle) {
-               do_crouch = false;
-       } else if (STAT(FROZEN, this)) {
-               do_crouch = false;
-    }
-
-       if (do_crouch) {
-               if (!this.crouch) {
-                       this.crouch = true;
-                       this.view_ofs = STAT(PL_CROUCH_VIEW_OFS, this);
-                       setsize(this, STAT(PL_CROUCH_MIN, this), STAT(PL_CROUCH_MAX, this));
-                       // setanim(this, this.anim_duck, false, true, true); // this anim is BROKEN anyway
-               }
-       } else if (this.crouch) {
-        tracebox(this.origin, STAT(PL_MIN, this), STAT(PL_MAX, this), this.origin, false, this);
-        if (!trace_startsolid) {
-            this.crouch = false;
-            this.view_ofs = STAT(PL_VIEW_OFS, this);
-            setsize(this, STAT(PL_MIN, this), STAT(PL_MAX, this));
-        }
-       }
-
        FixPlayermodel(this);
 
        if (this.shootfromfixedorigin != autocvar_g_shootfromfixedorigin) {