Keep player status on disconnect (#10624)

This commit is contained in:
wrexbe
2022-08-15 17:09:35 -07:00
committed by GitHub
parent b8f81d5653
commit 845ef758b3
2 changed files with 6 additions and 5 deletions

View File

@@ -0,0 +1,6 @@
namespace Content.IntegrationTests.Tests.Lobby;
public class ServerReloginTest
{
}

View File

@@ -86,8 +86,6 @@ namespace Content.Server.GameTicking
case SessionStatus.Disconnected:
{
_playerGameStatuses.Remove(session.UserId);
_chatManager.SendAdminAnnouncement(Loc.GetString("player-leave-message", ("name", args.Session.Name)));
_userDb.ClientDisconnected(session);
@@ -121,9 +119,6 @@ namespace Content.Server.GameTicking
{
_chatManager.DispatchServerMessage(session, Loc.GetString("game-ticker-player-join-game-message"));
if (!_playerGameStatuses.ContainsKey(session.UserId))
_playerGameStatuses.Remove(session.UserId);
_playerGameStatuses[session.UserId] = PlayerGameStatus.JoinedGame;
RaiseNetworkEvent(new TickerJoinGameEvent(), session.ConnectedClient);