-
-
Notifications
You must be signed in to change notification settings - Fork 32
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 multiplayer quick start, adjust cut off text, and other minor fixes #121
Conversation
Previously, this used the e.isMetaDown() check which was failing as modern Windows keyboards do not have a meta key. Changing this to check the mouse button fixes right clicking players in a lobby's player list which now opens a context menu.
When the client encounters a fatal error, it sends a `error-debug` packet including the last received and sent packages. This can contain whole maps and easily exceed the current maximum of 250 bytes.
These are sent by clients when they encounter fatal errors and contain useful information for debugging. Clients also sent an `end` packet afterwards and that was also unhandled. This is now handled as a no-op.
This logs all outgoing packets.
Hey @PhilippvK, pinging you in case you haven't seen this PR. I have some other changes ready to publish but would like to get this PR in first. |
@StenAL When the PR was posted I was traveling and could not try out the changes myself. Sorry for the delay! In the meantime I was able to check the changes and think we can get this merged soon. |
server/src/main/java/org/moparforia/server/net/packethandlers/golf/ChatHandler.java
Outdated
Show resolved
Hide resolved
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.
The comments in the (original) codebase are hilarious… Thanks for cleaning things up.
I also think that the deobfuscation process is looking very good thanks to your efforts.
These are used by admins/sheriffs to do things like mute or ban people.
This currently just joins the multiplayer lobby which is an improvement over the previous behavior of deadlocking the client and forcing a restart.
These are handled server-side and assigned initialized as an anonymous user with names like "anon-xxxx".
Having two classes named `Conn` and `Connection` was a bit confusing. Now it's more clear that one is the app-agnostic socket-based connection while the other handles all networking for the golf game. Also, rename thriftLogs to metadataLogs as that's what they're used for.
This set of commits fixes many minor things:
old_quickjoin.webm
new_quickjoin.webm
Right clicking players in lobbies now opens a pop-up menu with some actions.
The server now handles
error-debug
,end
, andlobby command
packetserror-debug
is sent by the client when it crashes and includes an error message and the last commands sent/received. This is useful for debugging. It also necessitated increasing the maximum client package size to 2000 bytes since errors can be long.end
andlobby command
are no-opsVerbose server logging can be enabled with a flag to see outgoing packets. This is useful for debugging.
The username regex no longer prevents empty strings as usernames. These are handled by the server and users are assigned a name like "~anonym1111"
Some networking classes are renamed for better clarity
Some unused classes and meaningless JavaDocs have been removed