Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolved issue #4 #22

Merged
merged 3 commits into from
Jul 11, 2023
Merged

Resolved issue #4 #22

merged 3 commits into from
Jul 11, 2023

Conversation

camaechi
Copy link

CTRL + W to run faster

@camaechi camaechi self-assigned this Jun 20, 2023
@camaechi camaechi changed the title resolved issue #4 Resolved issue #4 Jun 20, 2023
Copy link
Collaborator

@TonePoems TonePoems left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will also need to have tests eventually

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)) sz--;
if (glfwGetKey(g->window, CRAFT_KEY_BACKWARD)) sz++;
if (glfwGetKey(g->window, CRAFT_KEY_FORWARD)) {
if(glfwGetKey(g->window, CRAFT_KEY_RUN)) isRunning = 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest including this under the existing CRAFT_KEY_FORWARD if statement as it is duplicated code

src/main.c Outdated
@@ -2439,6 +2444,7 @@ void handle_movement(double dt) {
}
}
float speed = g->flying ? 20 : 5;
if(isRunning) speed*=4;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought a multiplier of 1.5 felt better when I tested it. Reminded me of minecrafts sprint; *4 seems like with speed boosts. But of course that is just preference

@TonePoems
Copy link
Collaborator

Oh this should also be added to the readme section on controls

Chikaosolu Amaechi added 2 commits June 20, 2023 22:11
Requested changes have been made.
The controls section in README.md has been updated.
@dburd08
Copy link
Collaborator

dburd08 commented Jun 21, 2023

capturing comments from team discord:
need tests of some kind, we have another story this sprint for setting up a test suite.
Do we want to apply the speed multiplier in all directions of movement or only in the 'forward' direction

@camaechi camaechi merged commit 13c1239 into master Jul 11, 2023
@camaechi camaechi linked an issue Jul 17, 2023 that may be closed by this pull request
camaechi pushed a commit that referenced this pull request Jul 21, 2023
This reverts commit 13c1239, reversing
changes made to 582d420.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sprinting mode for walking
3 participants