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

Specify max_slides must be greater than 0 #101776

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Ratstail91
Copy link

This is a change to the docs, highlighting a potential gotcha that wasted a few hours of my time. Hopefully, this helps someone else.

@Ratstail91 Ratstail91 requested a review from a team as a code owner January 18, 2025 21:39
@AThousandShips AThousandShips changed the title Specified max_slides must be greater than 0 Specify max_slides must be greater than 0 Jan 19, 2025
@Chaosus Chaosus added this to the 4.4 milestone Jan 19, 2025
@@ -166,7 +166,7 @@
If [code]false[/code], the body will slide on floor's slopes when [member velocity] applies a downward force.
</member>
<member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="4">
Maximum number of times the body can change direction before it stops when calling [method move_and_slide].
Maximum number of times the body can change direction before it stops when calling [method move_and_slide]. Must be > 0.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Maximum number of times the body can change direction before it stops when calling [method move_and_slide]. Must be > 0.
Maximum number of times the body can change direction before it stops when calling [method move_and_slide]. Must be greater than zero.

For both

Copy link
Author

Choose a reason for hiding this comment

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

Your wording is better, I'll update the PR soon, as I'm away from my machine ATM.

@AThousandShips
Copy link
Member

Note that setting the value to anything less than 1 triggers an error, so this isn't invisible

@Ratstail91
Copy link
Author

Note that setting the value to anything less than 1 triggers an error, so this isn't invisible

True, but more visibility can't hurt, as I missed it at first.

@Calinou
Copy link
Member

Calinou commented Jan 25, 2025

Remember to squash commits together into a single commit: https://docs.godotengine.org/en/stable/contributing/workflow/pr_workflow.html#the-interactive-rebase

@Ratstail91
Copy link
Author

Ratstail91 commented Jan 25, 2025

@Calinou Sorry, do I do that locally, or is it done on GitHub?

Sorry, this is my first PR to a big project, so I'm not sure - I feel a bit raw doing all this for such a small tweak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants