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

Fix move_camera method #167

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

OSRS-B0b
Copy link

@OSRS-B0b OSRS-B0b commented May 14, 2023

Issue: When calling move_camera and passing vertical=0 or horizontal=0 the camera will still move slightly in that direction

Steps to reproduce: run this code in an OSRSBot main_loop method

while True:
    time.sleep(1)
    self.move_camera(vertical=10)

Root cause: Even though the direction is passed as 0, move_camera still presses the key down and then up - it just sleeps for 0 seconds.

Solution: Don't call keypress when one direction = 0. (There is already logic that handles the case when both are 0.)

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.

None yet

1 participant