Backport some arch comp net changes (#4408)

Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
This commit is contained in:
metalgearsloth
2023-09-17 11:03:11 +10:00
committed by GitHub
parent 196028b619
commit 1ea7071ffb
14 changed files with 195 additions and 169 deletions

View File

@@ -139,9 +139,6 @@ namespace Robust.Server.GameObjects
{
_networkManager.RegisterNetMessage<MsgEntity>(HandleEntityNetworkMessage);
// For syncing component deletions.
ComponentRemoved += OnComponentRemoved;
_playerManager.PlayerStatusChanged += OnPlayerStatusChanged;
_configurationManager.OnValueChanged(CVars.NetLogLateMsg, b => _logLateMsgs = b, true);
@@ -168,15 +165,6 @@ namespace Robust.Server.GameObjects
return _lastProcessedSequencesCmd[session];
}
private void OnComponentRemoved(RemovedComponentEventArgs e)
{
if (e.Terminating || !e.BaseArgs.Component.NetSyncEnabled)
return;
if (TryGetComponent(e.BaseArgs.Owner, out MetaDataComponent? meta))
meta.LastComponentRemoved = _gameTiming.CurTick;
}
/// <inheritdoc />
public void SendSystemNetworkMessage(EntityEventArgs message, bool recordReplay = true)
{