Skip to content

Commit

Permalink
player count changes correctly on disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
benev0 committed Oct 21, 2024
1 parent 5a82df2 commit 0b829b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Robust.Server/Player/PlayerManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ internal void EndSession(NetUserId user)
if (!TryGetSessionById(user, out var session))
return;

RemoveSession(session.UserId);
SetStatus(session, SessionStatus.Disconnected);
SetAttachedEntity(session, null, out _, true);

Expand All @@ -112,7 +113,6 @@ internal void EndSession(NetUserId user)
viewSys.RemoveViewSubscriber(eye, session);
}

RemoveSession(session.UserId);
PlayerCountMetric.Set(PlayerCount);
Dirty();
}
Expand Down

0 comments on commit 0b829b2

Please sign in to comment.