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

onClientCursorMove returns 65k on X or Y axis if moving the cursor too fast. #256

Closed
Pirulax opened this issue Jul 24, 2018 · 7 comments
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Pirulax
Copy link
Contributor

Pirulax commented Jul 24, 2018

Describe the bug
So, if you move ur mouse too fast on an axis(X or Y) it sometimes returns(depends on the speed you are moving ur mouse with) it returns 65k (between 65500 and 65600) for some reason.

To Reproduce
Steps to reproduce the behavior:

  1. Add an event handler on onClientCursorMove:
    addEventHandler("onClientCursorMove", root, function(_, _, cx, cy) if (cx>65000) or (cy>65000) then print(cx, cy) end end)
  2. Move ur mouse like a total idiot
  3. Here u go

Expected behavior
It should return a normal value

Screenshots
no pls

MTA Client (please complete the following information):

  • Multi Theft Auto v1.5.5-release-12411
  • Running in Wine? Nein

MTA Server (please complete the following information):

  • OS: Microsoft Windows [Version 10.0.17134.112]
  • Version: Multi Theft Auto v1.5.5-release-12411

Additional context
I ran my game in windowed mode, maybe that causes the problem, because my cursor goes out from the screen.

@qaisjp
Copy link
Contributor

qaisjp commented Jul 25, 2018

Neither @patrikjuvonen or myself can reproduce this.

Please can you download this file and test to see if the problem has been fixed?

@patrikjuvonen perhaps push a change ignoring out of boundary coords and send him a link so he can compare and see which would be best? ref #259 (comment)

@Pirulax in the meantime can you perhaps try and figure out a more reliable way to reproduce this issue? more details like what resolution you are running windowed mode in, the kind of windowed mode, how many monitors you have, or anything else you think might be relevant? perhaps what might be relevant is the kind of mouse and if it is a high dpi one.

@patrikjuvonen
Copy link
Contributor

patrikjuvonen commented Jul 25, 2018

I have now pushed a second commit at #259 that ignores out of bounds coordinates instead of clamping them. Let us know which one seems better.

@qaisjp
Copy link
Contributor

qaisjp commented Jul 25, 2018

thanks @patrikjuvonen. @Pirulax you can get the second copy ("ignore-outofbounds-coords") from this link when the build server is done. The file will be called "InstallFiles.zip"

(p.s. I accidentally edited the wrong comment... sorry 😛)

@Pirulax
Copy link
Contributor Author

Pirulax commented Jul 25, 2018

Hihi, I was running MTA in 1280x720 in windowed mode, but my monitor's native resolution is 1920x1080.
I made a little if statement which ignored high numbers, it worked just fine.
Is there still need of testing the build?

@qaisjp
Copy link
Contributor

qaisjp commented Jul 25, 2018

@Pirulax do you have multiple monitors?

@qaisjp qaisjp closed this as completed in a505115 Jul 25, 2018
@qaisjp
Copy link
Contributor

qaisjp commented Jul 25, 2018

Can you try this build ( https://ci.appveyor.com/project/multitheftauto/mtasa-blue/build/ci-1493/artifacts ) when it appears? This might fix it.

@patrikjuvonen
Copy link
Contributor

patrikjuvonen commented Aug 5, 2018

For future reference that commit (87879d47db30ffb34a021d5ff8771b1661f759c9) fixed the issue.

@patrikjuvonen patrikjuvonen added bug Something isn't working and removed feedback Further information is requested labels Aug 5, 2018
@patrikjuvonen patrikjuvonen added this to To do in release/v1.5.6 via automation Aug 5, 2018
@patrikjuvonen patrikjuvonen added this to the 1.5.6 milestone Aug 5, 2018
@patrikjuvonen patrikjuvonen moved this from To do to Done in release/v1.5.6 Aug 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development

No branches or pull requests

3 participants