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

@@ -32,10 +32,10 @@ public sealed partial class ReplaySpectatorSystem
public void SpectateEntity(EntityUid target)
{
if (_player.LocalSession == null)
if (_player.LocalPlayer == null)
return;
var old = _player.LocalSession.AttachedEntity;
var old = _player.LocalPlayer.ControlledEntity;
if (old == target)
{
@@ -44,7 +44,7 @@ public sealed partial class ReplaySpectatorSystem
return;
}
_player.SetAttachedEntity(_player.LocalSession, target);
_player.LocalPlayer.AttachEntity(target, EntityManager, _client);
EnsureComp<ReplaySpectatorComponent>(target);
_stateMan.RequestStateChange<ReplaySpectateEntityState>();
@@ -59,10 +59,10 @@ public sealed partial class ReplaySpectatorSystem
public TransformComponent SpawnSpectatorGhost(EntityCoordinates coords, bool gridAttach)
{
if (_player.LocalSession == null)
if (_player.LocalPlayer == null)
throw new InvalidOperationException();
var old = _player.LocalSession.AttachedEntity;
var old = _player.LocalPlayer.ControlledEntity;
var ent = Spawn("ReplayObserver", coords);
_eye.SetMaxZoom(ent, Vector2.One * 5);
@@ -73,7 +73,7 @@ public sealed partial class ReplaySpectatorSystem
if (gridAttach)
_transform.AttachToGridOrMap(ent);
_player.SetAttachedEntity(_player.LocalSession, ent);
_player.LocalPlayer.AttachEntity(ent, EntityManager, _client);
if (old != null)
{
@@ -93,7 +93,7 @@ public sealed partial class ReplaySpectatorSystem
{
if (args.Length == 0)
{
if (_player.LocalSession?.AttachedEntity is { } current)
if (_player.LocalPlayer?.ControlledEntity is { } current)
SpawnSpectatorGhost(new EntityCoordinates(current, default), true);
else
SpawnSpectatorGhost(default, true);