From 6976ca04b8babe24502387b16aae45d874b12863 Mon Sep 17 00:00:00 2001 From: Kot <1192090+koteq@users.noreply.github.com> Date: Sat, 13 Jan 2024 02:28:18 +0400 Subject: [PATCH] Disable PVS budged for the full update It helps preventing weird intermediate states when a client observes themselves in a void with all the alert notifications going wild. However it introduces a spike on CPU and networking. --- Robust.Server/GameStates/PvsSystem.cs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Robust.Server/GameStates/PvsSystem.cs b/Robust.Server/GameStates/PvsSystem.cs index 6baa2341b..14292cc02 100644 --- a/Robust.Server/GameStates/PvsSystem.cs +++ b/Robust.Server/GameStates/PvsSystem.cs @@ -294,15 +294,19 @@ internal sealed partial class PvsSystem : EntitySystem // After processing the entity's viewers, we set actual, budget limits. // ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract - if (session.Channel != null) + if (!session.RequestedFull) { - session.Budget.NewLimit= _netConfigManager.GetClientCVar(session.Channel, CVars.NetPVSEntityBudget); - session.Budget.EnterLimit = _netConfigManager.GetClientCVar(session.Channel, CVars.NetPVSEntityEnterBudget); - } - else - { - session.Budget.NewLimit= CVars.NetPVSEntityBudget.DefaultValue; - session.Budget.EnterLimit = CVars.NetPVSEntityEnterBudget.DefaultValue; + if (session.Channel != null) + { + session.Budget.NewLimit = _netConfigManager.GetClientCVar(session.Channel, CVars.NetPVSEntityBudget); + session.Budget.EnterLimit = + _netConfigManager.GetClientCVar(session.Channel, CVars.NetPVSEntityEnterBudget); + } + else + { + session.Budget.NewLimit = CVars.NetPVSEntityBudget.DefaultValue; + session.Budget.EnterLimit = CVars.NetPVSEntityEnterBudget.DefaultValue; + } } // Process all PVS overrides.