Skip to content

Commit

Permalink
Revert "Merge pull request #22 from WSUCEG-7140/#4"
Browse files Browse the repository at this point in the history
This reverts commit 13c1239, reversing
changes made to 582d420.
  • Loading branch information
Chikaosolu Amaechi committed Jul 21, 2023
1 parent 13c1239 commit c33841d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ python server.py [HOST [PORT]]
### Controls
- WASD to move forward, left, backward, right.
- Ctrl + W to sprint.
- Space to jump.
- Left Click to destroy a block.
- Right Click or Cmd + Left Click to create a block.
Expand Down
2 changes: 1 addition & 1 deletion src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#define CRAFT_KEY_CHAT 't'
#define CRAFT_KEY_COMMAND '/'
#define CRAFT_KEY_SIGN '`'
#define CRAFT_KEY_RUN GLFW_KEY_LEFT_CONTROL

// advanced parameters
#define CREATE_CHUNK_RADIUS 10
#define RENDER_CHUNK_RADIUS 10
Expand Down
7 changes: 1 addition & 6 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2413,15 +2413,11 @@ void handle_movement(double dt) {
State *s = &g->players->state;
int sz = 0;
int sx = 0;
int isRunning = 0;
if (!g->typing) {
float m = dt * 1.0;
g->ortho = glfwGetKey(g->window, CRAFT_KEY_ORTHO) ? 64 : 0;
g->fov = glfwGetKey(g->window, CRAFT_KEY_ZOOM) ? 15 : 65;
if (glfwGetKey(g->window, CRAFT_KEY_FORWARD)) {
if(glfwGetKey(g->window, CRAFT_KEY_RUN)) isRunning = 1;
sz--;
}
if (glfwGetKey(g->window, CRAFT_KEY_FORWARD)) sz--;
if (glfwGetKey(g->window, CRAFT_KEY_BACKWARD)) sz++;
if (glfwGetKey(g->window, CRAFT_KEY_LEFT)) sx--;
if (glfwGetKey(g->window, CRAFT_KEY_RIGHT)) sx++;
Expand All @@ -2443,7 +2439,6 @@ void handle_movement(double dt) {
}
}
float speed = g->flying ? 20 : 5;
if(isRunning) speed*=1.5;
int estimate = roundf(sqrtf(
powf(vx * speed, 2) +
powf(vy * speed + ABS(dy) * 2, 2) +
Expand Down

0 comments on commit c33841d

Please sign in to comment.