diff options
| author | historia <[not public]> | 2026-09-18 01:50:17 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-18 01:50:17 -0400 |
| commit | 87d08f0151e643951769e323995f1c5ed89ee200 (patch) | |
| tree | dc42a0b30ebb5a00dd7ba505cc4eaa44f4f308bc /internal/game/cmd_quit.go | |
| parent | 32a3c59cebf2a16277e54d715a67adfdbe00b456 (diff) | |
| download | thehouseoficarus-87d08f0151e643951769e323995f1c5ed89ee200.tar.gz | |
fix: harden economy recovery, shutdown concurrency, world validation, and inventory-loss paths
Diffstat (limited to 'internal/game/cmd_quit.go')
| -rw-r--r-- | internal/game/cmd_quit.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/game/cmd_quit.go b/internal/game/cmd_quit.go index d6e3313..f8075c1 100644 --- a/internal/game/cmd_quit.go +++ b/internal/game/cmd_quit.go @@ -89,7 +89,11 @@ func (g *Game) beginQuitCountdown(sess *net.Session) { if g.Hub != nil { g.Hub.LeaveRoom(sess) } - sess.Player = nil + if g.Hub != nil { + g.Hub.SetSessionPlayer(sess, nil) + } else { + sess.Player = nil + } sess.SetState(net.StateMenu) g.showMenu(sess) return false |
