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

Add player list to MP server browser. #14571

Merged
merged 5 commits into from Dec 26, 2017

Conversation

Projects
None yet
3 participants
@pchote
Member

pchote commented Dec 25, 2017

This switches the game client over to the new master server protocol (OpenRA/OpenRAMasterServer#41, OpenRA/OpenRAMasterServer#42, OpenRA/OpenRAMasterServer#43, OpenRA/OpenRAMasterServer#44) and uses it to drive a new server player list.

screen shot 2017-12-24 at 15 23 24

The list is hidden for servers that do not yet use the new protocol. Factions are hidden for servers on other mods, since we don't have the artwork to display them.

This also unifies the way that game advertisements are handled between LAN and Online games.

Closes #13768
Closes #11646
Closes #14569

@pchote pchote added this to the Next release milestone Dec 25, 2017

@abcdefg30

Looks good to me otherwise.

{
lanGames.Add(new GameServer(game));
}
catch { }

This comment has been minimized.

@abcdefg30

abcdefg30 Dec 25, 2017

Member

What is going on here? Why do we suddenly try catch this and discard any error?

@abcdefg30

abcdefg30 Dec 25, 2017

Member

What is going on here? Why do we suddenly try catch this and discard any error?

This comment has been minimized.

@pchote

pchote Dec 25, 2017

Member

This fixes a crash/exploit where sending malformed game advertisements will kill any other clients on the LAN. I split this fix into its own commit to make it clearer.

@pchote

pchote Dec 25, 2017

Member

This fixes a crash/exploit where sending malformed game advertisements will kill any other clients on the LAN. I split this fix into its own commit to make it clearer.

var label = item.Get<LabelWidget>("NOFLAG_LABEL");
var font = Game.Renderer.Fonts[label.Font];
var name = WidgetUtils.TruncateText(o.Name, label.Bounds.Width, font);
label.GetText = () => name;

This comment has been minimized.

@abcdefg30

abcdefg30 Dec 25, 2017

Member

Any reason to not color the player name here as well?

@abcdefg30

abcdefg30 Dec 25, 2017

Member

Any reason to not color the player name here as well?

This comment has been minimized.

@pchote

pchote Dec 25, 2017

Member

Done.

@pchote

pchote Dec 25, 2017

Member

Done.

@reaperrr

Code is mostly out of my league, but result looks good and seems to work fine

@reaperrr reaperrr merged commit c73ce50 into OpenRA:bleed Dec 26, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@pchote pchote deleted the pchote:multiplayer-player-list branch Apr 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment