diff options
Diffstat (limited to 'internal/net/server.go')
| -rw-r--r-- | internal/net/server.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/internal/net/server.go b/internal/net/server.go index 5cf7310..6367419 100644 --- a/internal/net/server.go +++ b/internal/net/server.go @@ -66,6 +66,14 @@ type Session struct { PendingUndigDir string PendingUndigRoom int // Casino spectator preferences are session-local, owner-goroutine only. + CryptoActive bool + CryptoBusy bool + CryptoEpoch uint64 + CryptoCancel context.CancelFunc + CryptoSelected string + CryptoScreen string + CryptoShowHints bool + CryptoUnavailable bool PredictionActive bool PredictionEpoch uint64 PredictionCancel context.CancelFunc @@ -518,6 +526,17 @@ func (h *Hub) EnterRoom(s *Session, roomID int) { // room stops it, so leaving and returning does not silently resume it. s.CasinoWatchRoom = 0 s.CasinoWatchTable = "" + s.CryptoActive = false + s.CryptoEpoch++ + s.CryptoBusy = false + s.CryptoSelected = "" + s.CryptoScreen = "" + s.CryptoShowHints = false + s.CryptoUnavailable = false + if s.CryptoCancel != nil { + s.CryptoCancel() + s.CryptoCancel = nil + } s.PredictionActive = false if s.PredictionCancel != nil { s.PredictionCancel() |
