Update player session removal

This commit is contained in:
Melledy
2025-12-07 23:52:23 -08:00
parent f542ea7cb4
commit 1b0b6873b9
2 changed files with 24 additions and 29 deletions

View File

@@ -60,10 +60,12 @@ public class GameSession {
var player = this.player;
this.player = null;
// Remove session from player
player.removeSession();
// Remove session reference from player ONLY if their session wasn't replaced yet
if (player.getSession() == this) {
player.setSession(null);
}
// Set remove flag
// Set session removal flag
this.remove = true;
}