Skip to content

Conversation

@wtfseanscool
Copy link

Features:

  • Interactive invite buttons in scoreboard for each player
  • Auto-join functionality for TEAM_FLOCK players (join empty team + lock + invite)
  • Normal invite functionality for players already on teams
  • Mouse cursor support in scoreboard for button interaction
  • Visual feedback (checkmarks, cooldowns, disabled states)
  • State tracking and cooldown management
  • Automatic cleanup when players leave/join

Files modified:

  • src/game/client/components/scoreboard.h: Added invite button methods and member variables
  • src/game/client/components/scoreboard.cpp: Added full invite button implementation

Automates the tedious process of joining team, locking it, and inviting players (especially those with special characters in name).

Checklist

  • Tested the change ingame
  • Provided screenshots if it is a visual change
  • Tested in combination with possibly related configuration options
  • Written a unit test (especially base/) or added coverage to integration test
  • Considered possible null pointers and out of bounds array indexing
  • Changed no physics that affect existing maps
  • Tested the change with ASan+UBSan or valgrind's memcheck (optional)

Features:
- Interactive invite buttons in scoreboard for each player
- Auto-join functionality for TEAM_FLOCK players (join empty team + lock + invite)
- Normal invite functionality for players already on teams
- Mouse cursor support in scoreboard for button interaction
- Visual feedback (checkmarks, cooldowns, disabled states)
- State tracking and cooldown management
- Automatic cleanup when players leave/join

Files modified:
- src/game/client/components/scoreboard.h: Added invite button methods and member variables
- src/game/client/components/scoreboard.cpp: Added full invite button implementation
@wtfseanscool
Copy link
Author

When invite hasn't been sent yet:

image

After pressing invite button:

image

After they join the team:

image

@wtfseanscool wtfseanscool changed the title Add team invite button feature (on scoreboard) feat: Add team invite button (to scoreboard) Sep 10, 2025
Made the following changes:

- When in an active run, AND not frozen, hide the invite buttons (alternative can disable, doesnt matter), and restore regular mouse interaction when the scoreboard is open

Bugs fixed:
- No longer shows when we are in spectator / in super

- Added server join cooldown to handle internal delay after join / map switch
Copy link
Collaborator

@SollyBunny SollyBunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty intrusive and I haven't yet touched scoreboard like storma has done since I don't know what upstream will be doing.
If anything is done I would liek it to be easily expandable (to add warlist/friend/mod abilities to it)
As for the feature itself I'm undecided, /mc;team -1;lock combats the delay for making a new team and locking and can be bound

#include <game/client/ui.h>
#include <game/localization.h>

#include "SDL_mouse.h"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Components shouldn't interact with SDL directly

{
Input()->MouseModeRelative();
m_MouseModeWasAbsolute = false;
}
Copy link
Collaborator

@SollyBunny SollyBunny Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for keeping track of m_MouseModeWasAbsolute

@SollyBunny SollyBunny force-pushed the master branch 2 times, most recently from 39265a2 to 0796368 Compare September 14, 2025 21:05
@wtfseanscool
Copy link
Author

I agree, the implementation was quite poor here, and too intrusive.

After more testing, I've switched to holding ALT to unlock the cursor (not just opening the scoreboard), and it can only be activated before passing the start line. I've also added another button to accept team invites.

The last quirk is people joining / leaving as you go to invite, causing you to invite the wrong player. The scoreboard would likely need to be frozen while it's open (or free cursor is enabled).

@SollyBunny SollyBunny force-pushed the master branch 2 times, most recently from 1e549e3 to 0c27c3e Compare October 10, 2025 18:21
@SollyBunny SollyBunny force-pushed the master branch 4 times, most recently from d306b83 to 689e1d8 Compare October 23, 2025 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants