Revert "Update submodule to 172.0.0 (#21222)" (#21225)

This commit is contained in:
metalgearsloth
2023-10-24 21:55:20 +11:00
committed by GitHub
parent 517aea8bc3
commit a2bbda43cc
249 changed files with 1049 additions and 967 deletions

View File

@@ -16,7 +16,6 @@ using Robust.Shared.Configuration;
using Robust.Shared.Enums;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Player;
using Robust.Shared.Threading;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
@@ -37,7 +36,7 @@ namespace Content.Server.Decals
[Dependency] private readonly MapSystem _mapSystem = default!;
private readonly Dictionary<NetEntity, HashSet<Vector2i>> _dirtyChunks = new();
private readonly Dictionary<ICommonSession, Dictionary<NetEntity, HashSet<Vector2i>>> _previousSentChunks = new();
private readonly Dictionary<IPlayerSession, Dictionary<NetEntity, HashSet<Vector2i>>> _previousSentChunks = new();
private static readonly Vector2 _boundsMinExpansion = new(0.01f, 0.01f);
private static readonly Vector2 _boundsMaxExpansion = new(1.01f, 1.01f);
@@ -198,7 +197,7 @@ namespace Content.Server.Decals
private void OnDecalPlacementRequest(RequestDecalPlacementEvent ev, EntitySessionEventArgs eventArgs)
{
if (eventArgs.SenderSession is not { } session)
if (eventArgs.SenderSession is not IPlayerSession session)
return;
// bad
@@ -227,7 +226,7 @@ namespace Content.Server.Decals
private void OnDecalRemovalRequest(RequestDecalRemovalEvent ev, EntitySessionEventArgs eventArgs)
{
if (eventArgs.SenderSession is not { } session)
if (eventArgs.SenderSession is not IPlayerSession session)
return;
// bad
@@ -428,7 +427,7 @@ namespace Content.Server.Decals
if (PvsEnabled)
{
var players = _playerManager.Sessions.Where(x => x.Status == SessionStatus.InGame).ToArray();
var players = _playerManager.ServerSessions.Where(x => x.Status == SessionStatus.InGame).ToArray();
var opts = new ParallelOptions { MaxDegreeOfParallelism = _parMan.ParallelProcessCount };
Parallel.ForEach(players, opts, UpdatePlayer);
}
@@ -436,7 +435,7 @@ namespace Content.Server.Decals
_dirtyChunks.Clear();
}
public void UpdatePlayer(ICommonSession player)
public void UpdatePlayer(IPlayerSession player)
{
var chunksInRange = _chunking.GetChunksForSession(player, ChunkSize, _chunkIndexPool, _chunkViewerPool);
var staleChunks = _chunkViewerPool.Get();
@@ -531,7 +530,7 @@ namespace Content.Server.Decals
}
private void SendChunkUpdates(
ICommonSession session,
IPlayerSession session,
Dictionary<NetEntity, HashSet<Vector2i>> updatedChunks,
Dictionary<NetEntity, HashSet<Vector2i>> staleChunks)
{