Implements better tracking for the existing lobby context packets to hopefully address the invisible people in hub areas like WDT.
The client seemingly keeps track of various player contexts keyed to their CharacterId, updating and occasionally discarding them based on game actions and packets from the server. Without the correct context, characters will not be displayed in shared areas; I'm assuming the client simply disregards any data it doesn't have a context entry for. Of course, because the client is dumb and insane, it often chooses to discard or spuriously update contexts such that they need to regularly be resent. This would be fine, except context packets are relatively large and must be sent to potentially everybody in WDT, and they must all send one back in return.
HubManager attempts to mimic some of the client's internal logic about these context packets such that they have to be sent as rarely as possible. This is done by both keeping track of all clients in shared zones, as well as each Character object keeping track of the contexts that have been provided it in Character.LastSeenLobby.
Addresses the following issues:
Characters being invisible to other players while in WDT, often one-sidedly.
"Phantom" characters standing around WDT because the last context the client has for them has them standing there.
[!WARNING]
This may be too packet heavy for good performance. Clients regularly entering and leaving WDT can cause a lot of contexts needing to be refreshed. To mitigate need for a rollback, a feature flag has been implemented. See GameLogicSetting.NaiveLobbyContextHandling to turn this feature on. It is off by default, in which case the previous behavior is used.
Implements better tracking for the existing lobby context packets to hopefully address the invisible people in hub areas like WDT.
The client seemingly keeps track of various player contexts keyed to their
CharacterId
, updating and occasionally discarding them based on game actions and packets from the server. Without the correct context, characters will not be displayed in shared areas; I'm assuming the client simply disregards any data it doesn't have a context entry for. Of course, because the client is dumb and insane, it often chooses to discard or spuriously update contexts such that they need to regularly be resent. This would be fine, except context packets are relatively large and must be sent to potentially everybody in WDT, and they must all send one back in return.HubManager
attempts to mimic some of the client's internal logic about these context packets such that they have to be sent as rarely as possible. This is done by both keeping track of all clients in shared zones, as well as eachCharacter
object keeping track of the contexts that have been provided it inCharacter.LastSeenLobby
.Addresses the following issues:
Checklist:
develop
branch