Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void Movement_Noclip (InputState input, ModelState modelState, float fTickRate)
- {
- base.TargetMovement = Vector3.zero;
- if (!ProgressBarUI.IsOpen ()) {
- if (input.IsDown (BUTTON.FORWARD)) {
- base.TargetMovement += this.Owner.eyes.BodyForward ();
- }
- if (input.IsDown (BUTTON.BACKWARD)) {
- base.TargetMovement -= this.Owner.eyes.BodyForward ();
- }
- if (input.IsDown (BUTTON.LEFT)) {
- base.TargetMovement -= this.Owner.eyes.BodyRight ();
- }
- if (input.IsDown (BUTTON.RIGHT)) {
- base.TargetMovement += this.Owner.eyes.BodyRight ();
- }
- if (input.IsDown (BUTTON.JUMP)) {
- base.TargetMovement += Vector3.up;
- }
- }
- float d = 10;
- if (input.IsDown (BUTTON.DUCK)) {
- d = 2;
- }
- if (input.IsDown (BUTTON.SPRINT)) {
- d = 50;
- }
- if (base.TargetMovement != Vector3.zero) {
- base.TargetMovement = base.TargetMovement.normalized * d;
- }
- modelState.flying = true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement