You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RT:SharedPlayerManager:PlayerStatusChanged is invoked before RT:SharedPlayerManager:RemoveSession is called
From RT-Server:PlayerManager:
/// <summary>/// Ends a clients session, and disconnects them./// </summary>internalvoidEndSession(NetUserIduser){if(!TryGetSessionById(user,outvarsession))return;SetStatus(session,SessionStatus.Disconnected);// invokes PlayerStatusChangedSetAttachedEntity(session,null,out_,true);varviewSys=EntManager.System<ViewSubscriberSystem>();foreach(vareyeinsession.ViewSubscriptions.ToArray()){viewSys.RemoveViewSubscriber(eye,session);}RemoveSession(session.UserId);// session is removed causing change in variable usedPlayerCountMetric.Set(PlayerCount);// not relevantDirty();}
PlayerStatusChanged is the event (CS) which formats and updates the serverInfo message by calling the function UpdateInfoText() which fires the networked event (RT) TickerLobbyInfoEvent to clients.
the content of server info (player count) is defined by InternalSessions which is altered by SharedPlayerManager:RemoveSession which as seen here is updated after the player count is used thus lagging the count by 1.
Description
When a player leaves the server, the player count gets updated to the value from before the player disconnected.
Reproduction
Screenshots
2024-10-20.12-08-47.mp4
Additional context
The text was updated successfully, but these errors were encountered: