rs-peer / issues

1 stars 0 forks source link

Game.isLoggedIn() returns false when Game.getState() returns Game.LOADING_REGION #399

Closed kerowak closed 5 years ago

kerowak commented 5 years ago

When moving between regions, Game.isLoggedIn() returns false.

I have a number of threads running which rely on the world being loaded, so I'd like to handle login/logout events to start/stop these threads.

I couldn't implement GameStateListener for some reason, and was implementing my own version of the listener when I discovered this issue.

My cheap mitigation for this is to check Game.getState() instead of Game.isLoggedIn() and ignore the case that state == Game.LOADING_REGION for the purposes of throwing login/logout events.

kerowak commented 5 years ago

2.0 addressed this issue and it looks like the fix works. Closing.