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

Add very basic bot interface #32

Merged
merged 1 commit into from
Jul 27, 2022
Merged

Add very basic bot interface #32

merged 1 commit into from
Jul 27, 2022

Conversation

grepsedawk
Copy link
Collaborator

No description provided.

@grepsedawk grepsedawk merged commit 42d6d7b into main Jul 27, 2022
@grepsedawk grepsedawk deleted the bot-interface branch July 27, 2022 00:47
@@ -65,9 +65,9 @@ class Rosegold::Clientbound::PlayerPositionAndLook < Rosegold::Clientbound::Pack

Log.debug { "Position reset: #{player.feet} #{player.look} dismount=#{dismount_vehicle} flags=#{relative_flags}" }

client.start_physics
client.physics.start
Copy link
Collaborator

Choose a reason for hiding this comment

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

You're starting a new tick loop for every received PlayerPositionAndLook packet. The server sends this packet every time the client moves incorrectly. This will cause the client to sand way too many movement packets. I suggest going back to a nilable Client#physics that indicates when movement is possible.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ooh, good catch ~~ I'll make a fix for that by tracking state, but from a types perspective it works out a ton better to leave client.physics as a solid, non-nilable type otherwise we're dealing with physics.try &.method everywhere

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.

2 participants