Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for BarManager updates with multiple bosses.
Currently, "boss" state is updated as follows: - If the "boss" state is blank, mark all players as not-boss. - If the "boss" state is a username, mark that player as boss. (Other players are left as-is). That works well when there is only a single boss, but it quickly breaks down when more than one boss is present. For example, if a lobby has 2 bosses, a newly-joining player will only see a crown for a single boss. The cleanest fix for this behavior is to have BarManager send all bosses to clients, rather than just the most-recent boss. This is a better match for how bosses are tracked by SPADS, but it requires an update to both BYAR-Chobby and BarManager. This patch implements the BYAR-Chobby side of the above change. With this change, the "boss" state is updated as follows: - If the boss state is blank, mark all *bosses* as not-boss - If the boss state is one or more usernames (comma-separated), mark those players as boss and unmark any other bosses as not-boss. This does introduce a small cosmetic issue for multi-boss lobbies running the current BarManager code; specifically, only one boss will have a crown at any single point in time. Since multi-boss lobbies are relatively rare, and this issue will no longer occur once BarManager has been updated, this should not have a significant impact to players.
- Loading branch information