-
Notifications
You must be signed in to change notification settings - Fork 24
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 cursor smoothing for 3 and more players #230
Conversation
@@ -76,7 +76,7 @@ ExecutionLevelManager levelManager | |||
// TODO: Cursor update may be ignored if MouseMoved isn't triggered after the rate period. | |||
// TODO: Will be changed later (probably with current / last sent positions check). | |||
InterfaceToolEvents.MouseMoved += position => throttle10Hz.Run<UpdateCursorPosition>( | |||
() => client.Send(new UpdateCursorPosition(client.Player, position)) | |||
() => client.Send(new UpdateCursorPosition(new UpdateCursorPositionEvent(client.Player, position))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would avoid doing any kind of logic in subscriptions like here (getting client.Player and creating event wrapper).
Perhaps even passing a client.Player is redundant and might be calculated automatically upon command recieve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the player identity, kinda yeah, but we don't have sender tracking in the server relay, I could implement it, but is it really necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get what's concerning in making events or using some logic in subs, could you elaborate pls?🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get what's concerning in making events or using some logic in subs, could you elaborate pls?🤔
Turned out it will be changed, but I still have this question.
Also an event dispatcher is introduced (will be extensively used later).