Skip to content
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

Cherrypick Wizden Pr 29151 #1825

Merged
merged 2 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Content.Server/GameTicking/GameTicker.RoundFlow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ public void ShowRoundEndScoreboard(string text = "")
var listOfPlayerInfo = new List<RoundEndMessageEvent.RoundEndPlayerInfo>();
// Grab the great big book of all the Minds, we'll need them for this.
var allMinds = EntityQueryEnumerator<MindComponent>();
var pvsOverride = _configurationManager.GetCVar(CCVars.RoundEndPVSOverrides);
while (allMinds.MoveNext(out var mindId, out var mind))
{
// TODO don't list redundant observer roles?
Expand Down Expand Up @@ -402,7 +403,7 @@ public void ShowRoundEndScoreboard(string text = "")
else if (mind.CurrentEntity != null && TryName(mind.CurrentEntity.Value, out var icName))
playerIcName = icName;

if (TryGetEntity(mind.OriginalOwnedEntity, out var entity))
if (TryGetEntity(mind.OriginalOwnedEntity, out var entity) && pvsOverride)
{
_pvsOverride.AddGlobalOverride(GetNetEntity(entity.Value), recursive: true);
}
Expand Down
8 changes: 8 additions & 0 deletions Content.Shared/CCVar/CCVars.Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,14 @@ public static readonly CVarDef<bool>
public static readonly CVarDef<string> RoundEndSoundCollection =
CVarDef.Create("game.round_end_sound_collection", "RoundEnd", CVar.SERVERONLY);

/// <summary>
/// Whether or not to add every player as a global override to PVS at round end.
/// This will allow all players to see their clothing in the round screen player list screen,
/// but may cause lag during round end with very high player counts.
/// </summary>
public static readonly CVarDef<bool> RoundEndPVSOverrides =
CVarDef.Create("game.round_end_pvs_overrides", true, CVar.SERVERONLY);

/// <summary>
/// Set to true to enable the dynamic hostname system.
/// Automatically updates the hostname to include current map and preset.
Expand Down
Loading