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

Read the first map packet to confirm that login is complete instead of sleeping for 100ms #11

Open
divinity76 opened this issue Mar 6, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@divinity76
Copy link
Collaborator

divinity76 commented Mar 6, 2019

sometimes you want the login to be really fast if logging in with multiple characters at the same time, hence the

            // if we don't sleep a little after logging in, nothing will work, talking, walking, etc won't respond for the first
            // few milliseconds or so. (???)
            usleep(100 * 1000);

part in Tibia_client_internal::login() should probably be optional (but on by default, because in MOST situations, it's a good thing) for example, that usleep makes the class unsuitable for making magebombs

  • that said, an even better solution than the usleep would be to read the first map packet to confirm that login is complete. then the login speed wouldn't be "100 milliseconds", it would be the speed of the server and your bandwidth (as it probably should be)
@Znote
Copy link
Owner

Znote commented Mar 7, 2019

Yeah, for now I think #6 should be fixed first. Once we get map packet parsing going we can wait for first map packet instead of sleeping.

@Znote Znote changed the title the login 100ms sleep should be optional Read the first map packet to confirm that login is complete instead of sleeping for 100ms Mar 7, 2019
@Znote Znote added the enhancement New feature or request label Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants