File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -414,8 +414,10 @@ export default class Game {
414414 const tag = this . players [ player . id ] . tag ;
415415
416416 // For ranked duels: if someone leaves during "getready" (countdown before first round),
417- // cancel the game without ELO penalties - no actual gameplay has happened yet
418- const isPreGameLeave = this . public && this . duel && this . state === 'getready' ;
417+ // cancel the game without ELO penalties - no actual gameplay has happened yet.
418+ // curRound is set to 1 at start() and incremented after each round, so curRound <= 1
419+ // ensures we only treat it as pregame during the initial countdown, not between rounds.
420+ const isPreGameLeave = this . public && this . duel && this . state === 'getready' && this . curRound <= 1 ;
419421 // Track disconnection for ranked duels (only if actual gameplay has started)
420422 if ( this . public && this . duel && ! isPreGameLeave ) {
421423 this . disconnectedPlayer = tag ;
You can’t perform that action at this time.
0 commit comments