Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- KeyboardState state; // When i toggle noclip it would just keep me hovering at the current Height
- if (a == Main.cUp)
- {
- if (terrmod.noClip)
- {
- Player player = this;
- double num9 = (double)this.position.X;
- double num10 = (double)this.position.Y;
- state = Keyboard.GetState();
- double num11 = state.IsKeyDown(Keys.LeftShift) ? 30.0 : 8.0;
- double num12 = num10 - num11;
- Vector2 vector2 = new Vector2((float)num9, (float)num12);
- player.position = vector2;
- }
- this.controlUp = true;
- }
- if (a == Main.cLeft)
- {
- if (terrmod.noClip)
- {
- Player player = this;
- double num9 = (double)this.position.X;
- state = Keyboard.GetState();
- double num10 = state.IsKeyDown(Keys.LeftShift) ? 30.0 : 8.0;
- Vector2 vector2 = new Vector2((float)(num9 - num10), this.position.Y);
- player.position = vector2;
- }
- this.controlLeft = true;
- }
- if (a == Main.cDown)
- {
- if (terrmod.noClip)
- {
- Player player = this;
- double num9 = (double)this.position.X;
- double num10 = (double)this.position.Y;
- state = Keyboard.GetState();
- double num11 = state.IsKeyDown(Keys.LeftShift) ? 30.0 : 8.0;
- double num12 = num10 + num11;
- Vector2 vector2 = new Vector2((float)num9, (float)num12);
- player.position = vector2;
- }
- this.controlDown = true;
- }
- if (a == Main.cRight)
- {
- if (terrmod.noClip)
- {
- Player player = this;
- double num9 = (double)this.position.X;
- state = Keyboard.GetState();
- double num10 = state.IsKeyDown(Keys.LeftShift) ? 30.0 : 8.0;
- Vector2 vector2 = new Vector2((float)(num9 + num10), this.position.Y);
- player.position = vector2;
- }
- this.controlRight = true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement