Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
okay bit of a doozy with this one. right now it just works by sending a socket.emit to the server if the user presses h on the keyboard.
the big issue i ran into was i thought that the user was getting an update of client info on that regular 'userPositions' emit from server.js, but (as the name suggests), in index.js and yorb.js it only deals with the positions. So i had to rework where the clients object was getting updated in yorb.js and index.js, so that a new hat message would update existing users but also be there for when new users joined.
I can go back and see if there's a better way of doing this as most of it was bushwhacking until i got it to work, i'm sure i could redesign it now that i know more about it. i also wonder if we can just update all the relevant info from that one userPositions message (i.e. keep a global client list as opposed to unique otherclient lists per user), or if that would be too slow.
also i tried removing the extra commits and ended up making it worse haha... my bad, i'll figure it out.