Multiplayer: Created anti-griefing "PeerOptions UI" (mute chat, mute/hide actors etc...) #3215
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.
This adds a popup menu to the multiplayer user list, allowing you to take actions against misbehaving players. Fixes #3196
PeerOptions are flags used only locally on client to filter and control incoming traffic.
PEEROPT_MUTE_CHAT
//!< CHAT and PRIVCHAT messages will not be allowed through. Existing chat messages will be purged.PEEROPT_MUTE_ACTORS
//!< Spawn actors muted and immediatelly mute existing actors.PEEROPT_HIDE_ACTORS
//!< Spawn actors hidden and immediatelly hide existing actors.At the moment, these flags are only kept as long as you're connected to one server. The game does not remember them across sessions yet.
This introduces new messages:
✉️
MSG_SIM_(UN)MUTE_NET_ACTOR_REQUESTED
- for consistency with existing(UN)HIDE_NET_ACTOR_REQUESTED
✉️
MSG_NET_(ADD/REMOVE)_PEEROPTIONS_REQUESTED
- records the flag + does all necessary updates to existing actors.✉️
MSG_GUI_SHOW_MESSAGEBOX_REQUESTED
- shows the messagebox (if not already visible) and optionally sets it's text (discarding whatever was there previously).The flags are set via extended MultiplayerClientList UI which now has a [<] button at every nickname, opening a popup menu.
It works just locally in the game, it doesn't need a rornet update.