diff --git a/Content.Server/GameTicking/GameTicker.RoundFlow.cs b/Content.Server/GameTicking/GameTicker.RoundFlow.cs index e022e5af645..888ddbcc1b7 100644 --- a/Content.Server/GameTicking/GameTicker.RoundFlow.cs +++ b/Content.Server/GameTicking/GameTicker.RoundFlow.cs @@ -372,6 +372,7 @@ public void ShowRoundEndScoreboard(string text = "") var listOfPlayerInfo = new List(); // Grab the great big book of all the Minds, we'll need them for this. var allMinds = EntityQueryEnumerator(); + var pvsOverride = _configurationManager.GetCVar(CCVars.RoundEndPVSOverrides); while (allMinds.MoveNext(out var mindId, out var mind)) { // TODO don't list redundant observer roles? @@ -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); } diff --git a/Content.Shared/CCVar/CCVars.Game.cs b/Content.Shared/CCVar/CCVars.Game.cs index fd45000bb03..efff7070473 100644 --- a/Content.Shared/CCVar/CCVars.Game.cs +++ b/Content.Shared/CCVar/CCVars.Game.cs @@ -386,6 +386,14 @@ public static readonly CVarDef public static readonly CVarDef RoundEndSoundCollection = CVarDef.Create("game.round_end_sound_collection", "RoundEnd", CVar.SERVERONLY); + /// + /// 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. + /// + public static readonly CVarDef RoundEndPVSOverrides = + CVarDef.Create("game.round_end_pvs_overrides", true, CVar.SERVERONLY); + /// /// Set to true to enable the dynamic hostname system. /// Automatically updates the hostname to include current map and preset.