Advertisement
Guest User

noclip

a guest
Oct 11th, 2013
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.91 KB | None | 0 0
  1. KeyboardState state; // When i toggle noclip it would just keep me hovering at the current Height
  2. if (a == Main.cUp)
  3. {
  4. if (terrmod.noClip)
  5. {
  6. Player player = this;
  7. double num9 = (double)this.position.X;
  8. double num10 = (double)this.position.Y;
  9. state = Keyboard.GetState();
  10. double num11 = state.IsKeyDown(Keys.LeftShift) ? 30.0 : 8.0;
  11. double num12 = num10 - num11;
  12. Vector2 vector2 = new Vector2((float)num9, (float)num12);
  13. player.position = vector2;
  14. }
  15. this.controlUp = true;
  16. }
  17. if (a == Main.cLeft)
  18. {
  19. if (terrmod.noClip)
  20. {
  21. Player player = this;
  22. double num9 = (double)this.position.X;
  23. state = Keyboard.GetState();
  24. double num10 = state.IsKeyDown(Keys.LeftShift) ? 30.0 : 8.0;
  25. Vector2 vector2 = new Vector2((float)(num9 - num10), this.position.Y);
  26. player.position = vector2;
  27. }
  28. this.controlLeft = true;
  29. }
  30. if (a == Main.cDown)
  31. {
  32. if (terrmod.noClip)
  33. {
  34. Player player = this;
  35. double num9 = (double)this.position.X;
  36. double num10 = (double)this.position.Y;
  37. state = Keyboard.GetState();
  38. double num11 = state.IsKeyDown(Keys.LeftShift) ? 30.0 : 8.0;
  39. double num12 = num10 + num11;
  40. Vector2 vector2 = new Vector2((float)num9, (float)num12);
  41. player.position = vector2;
  42. }
  43. this.controlDown = true;
  44. }
  45. if (a == Main.cRight)
  46. {
  47. if (terrmod.noClip)
  48. {
  49. Player player = this;
  50. double num9 = (double)this.position.X;
  51. state = Keyboard.GetState();
  52. double num10 = state.IsKeyDown(Keys.LeftShift) ? 30.0 : 8.0;
  53. Vector2 vector2 = new Vector2((float)(num9 + num10), this.position.Y);
  54. player.position = vector2;
  55. }
  56. this.controlRight = true;
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement