This commit is contained in:
ShadowCommander
2023-06-18 11:33:19 -07:00
committed by GitHub
parent 8a943fb374
commit dd7032a860
85 changed files with 1432 additions and 711 deletions

View File

@@ -19,6 +19,7 @@ using Robust.Shared.Utility;
using System.Linq;
using Content.Shared.Database;
using Robust.Shared.Asynchronous;
using PlayerData = Content.Server.Players.PlayerData;
namespace Content.Server.GameTicking
{
@@ -315,12 +316,12 @@ namespace Content.Server.GameTicking
var connected = false;
var observer = mind.AllRoles.Any(role => role is ObserverRole);
// Continuing
if (_playerManager.TryGetSessionById(userId, out var ply))
if (userId != null && _playerManager.ValidSessionId(userId.Value))
{
connected = true;
}
PlayerData? contentPlayerData = null;
if (_playerManager.TryGetPlayerData(userId, out var playerData))
if (userId != null && _playerManager.TryGetPlayerData(userId.Value, out var playerData))
{
contentPlayerData = playerData.ContentData();
}