fix live game list and swap animations

This commit is contained in:
jwinterm
2026-02-18 20:57:01 -05:00
parent 22b27b8b35
commit 727304996a
2 changed files with 3 additions and 6 deletions
+2 -2
View File
@@ -92,8 +92,8 @@ var WaitingScreenAnimator = {
// Check if we're in "Awaiting payment" mode - use treasure hunt animation
const isAwaitingPayment = typeof Game !== 'undefined' && Game._awaitingPayment;
if (isAwaitingPayment) {
// Use the treasure hunt animation for payment waiting
if (!isAwaitingPayment) {
// Use the treasure hunt animation for queue waiting (the longer wait)
this.drawPaymentAnimation(screenWidth, screenHeight, drawCenteredTextFn);
return;
}
+1 -4
View File
@@ -396,10 +396,7 @@ class SpectatorManager {
// Add pending games to the response
gameListData.pendingGames = pendingGames;
// Only broadcast if there are active or pending games
if (gameListData.pagination.totalGames === 0 && pendingGames.length === 0) return;
// Broadcast to a "lobby" room - users join this room when not in game
// Always broadcast, even when empty — clients need to clear their lists
this.io.to('lobby').emit('active_games', gameListData);
}