miwarnec / uMMORPG

4 stars 0 forks source link

playersOnline not correctly updated #28

Closed wovencode closed 4 years ago

wovencode commented 4 years ago

Recommended Unity and most recent uMMORPG3d/2d version (although I think it also happens on uSurvival). Happens on blank projects.

Describe the bug Players are not correctly removed from the playersOnline dictionary as it seems. This leads to situations where players cannot log-in anymore.

To Reproduce No exact way to reproduce, it happens sporadically and seems to happen more frequently the more players are online.

Expected behavior Players should always be securely removed from the playersOnline dictionary, no matter if the client logs-out, quits, crashes, times-out or otherwise leaves the game.

Several other community members experienced this odd behaviour as well. I suspect there is a situation where the client does not log-out "properly" and therefore leaves a ghost in the playersOnline dictionary.

miwarnec commented 4 years ago

V1.183 removes player from onlinePlayers in OnDestroy now immediately no matter what. that should fix it.