]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix crouching in 2D mode
authorMario <zacjardine@y7mail.com>
Thu, 6 Sep 2018 16:34:17 +0000 (02:34 +1000)
committerMario <zacjardine@y7mail.com>
Thu, 6 Sep 2018 16:34:17 +0000 (02:34 +1000)
qcsrc/common/physics/player.qc
qcsrc/common/viewloc.qc

index f6ab29715a298c07a7bc9c317d0a69d4d9636298..572bee349f205ca81caac2d23d0ff6da1d839696 100644 (file)
@@ -119,6 +119,8 @@ void PM_ClientMovement_UpdateStatus(entity this)
                }
        }
        bool do_crouch = PHYS_INPUT_BUTTON_CROUCH(this);
+       if(this.viewloc && !(this.viewloc.spawnflags & VIEWLOC_FREEMOVE) && PHYS_CS(this).movement.x < 0)
+               do_crouch = true;
        if (have_hook) {
                do_crouch = false;
        //} else if (this.waterlevel >= WATERLEVEL_SWIMMING) {
index f2dab7bfd22cd7c8620f3b69e7c10d9f37ece242..e1be43af0d41f9826993c9b9a7e1dceb247b9e16 100644 (file)
@@ -48,7 +48,7 @@ void viewloc_PlayerPhysics(entity this)
                        if(PHYS_CS(this).movement_x > 0) // right
                                this.angles_y = forward.y;
                }
-
+       #if 0
                //if(!PHYS_INPUT_BUTTON_CROUCH(this) && !IS_DUCKED(this))
                if(!(this.viewloc.spawnflags & VIEWLOC_FREEMOVE))
                {
@@ -65,6 +65,7 @@ void viewloc_PlayerPhysics(entity this)
                        //else { input_buttons &= ~16; this.flags &= ~FL_DUCKED; }
 #endif
                }
+       #endif
        }
 }