Skip to content

Commit

Permalink
Revert Resolved Issue #4
Browse files Browse the repository at this point in the history
  • Loading branch information
Chikaosolu Amaechi committed Jul 17, 2023
1 parent 6fe04a0 commit 9414f07
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,17 @@
#define CRAFT_KEY_SIGN '`'
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
#define CRAFT_KEY_RUN GLFW_KEY_LEFT_CONTROL
>>>>>>> f8dd1648b873dd56a2e1f769594e6103784dc435

=======
#define CRAFT_KEY_RUN GLFW_KEY_LEFT_CONTROL
>>>>>>> parent of 15dbf4a (Revert 'Resolved Issue #4')
=======

>>>>>>> parent of 6ca5a52 (issue #4)
// advanced parameters
#define CREATE_CHUNK_RADIUS 10
#define RENDER_CHUNK_RADIUS 10
Expand Down
8 changes: 7 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2431,11 +2431,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;
<<<<<<< HEAD
if (glfwGetKey(g->window, CRAFT_KEY_FORWARD)) {
if(glfwGetKey(g->window, CRAFT_KEY_RUN)) isRunning = 1;
sz--;
Expand All @@ -2450,6 +2450,9 @@ void handle_movement(double dt) {
>>>>>>> f8dd1648b873dd56a2e1f769594e6103784dc435
=======
>>>>>>> parent of 15dbf4a (Revert 'Resolved Issue #4')
=======
if (glfwGetKey(g->window, CRAFT_KEY_FORWARD)) sz--;
>>>>>>> parent of 6ca5a52 (issue #4)
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 @@ -2474,12 +2477,15 @@ void handle_movement(double dt) {
float speed = g->flying ? 20 : 5;
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
float speed = g->flying ? g->flying_sprint_speed : 5; // flying gets modifiable speed
>>>>>>> f8dd1648b873dd56a2e1f769594e6103784dc435
=======
>>>>>>> parent of 15dbf4a (Revert 'Resolved Issue #4')
if(isRunning) speed*=1.5;
=======
>>>>>>> parent of 6ca5a52 (issue #4)
int estimate = roundf(sqrtf(
powf(vx * speed, 2) +
powf(vy * speed + ABS(dy) * 2, 2) +
Expand Down

0 comments on commit 9414f07

Please sign in to comment.