Advertisement
Guest User

Untitled

a guest
Mar 16th, 2017
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.92 KB | None | 0 0
  1.     private void Movement_Noclip (InputState input, ModelState modelState, float fTickRate)
  2.     {
  3.         base.TargetMovement = Vector3.zero;
  4.         if (!ProgressBarUI.IsOpen ()) {
  5.             if (input.IsDown (BUTTON.FORWARD)) {
  6.                 base.TargetMovement += this.Owner.eyes.BodyForward ();
  7.             }
  8.             if (input.IsDown (BUTTON.BACKWARD)) {
  9.                 base.TargetMovement -= this.Owner.eyes.BodyForward ();
  10.             }
  11.             if (input.IsDown (BUTTON.LEFT)) {
  12.                 base.TargetMovement -= this.Owner.eyes.BodyRight ();
  13.             }
  14.             if (input.IsDown (BUTTON.RIGHT)) {
  15.                 base.TargetMovement += this.Owner.eyes.BodyRight ();
  16.             }
  17.             if (input.IsDown (BUTTON.JUMP)) {
  18.                 base.TargetMovement += Vector3.up;
  19.             }
  20.         }
  21.         float d = 10;
  22.         if (input.IsDown (BUTTON.DUCK)) {
  23.             d = 2;
  24.         }
  25.         if (input.IsDown (BUTTON.SPRINT)) {
  26.             d = 50;
  27.         }
  28.         if (base.TargetMovement != Vector3.zero) {
  29.             base.TargetMovement = base.TargetMovement.normalized * d;
  30.         }
  31.         modelState.flying = true;
  32.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement