server: 0021-restart-clock-stops-at-start
Fix for 0012: START stops the lobby clock (it shares the duel timer), so a reservation window still open after a rules restart no longer ends the duel at once on time limit up. Replayed from Tools/YGOLegacy/patches/0021-restart-clock-stops-at-start.patch in the Unity repo. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
27c35b81bd
commit
b7c5cb2467
2 files changed
+10
No files matched your search
@@ -1107,6 +1107,11 @@ void SingleDuel::StartDuel(DuelPlayer* dp) {
|
||||
if(restart_phase != 0) // YGOL rules restart: frozen until Commit or Abort
|
||||
return;
|
||||
ygol_started = true; // YGOL rules restart: no Prepare after the first accepted START
|
||||
// YGOL restart clock: the lobby tick shares the duel timer; a reservation window still open at START
|
||||
// would tick into the duel and end it at once on "time limit up" (an untimed duel has a limit of 0)
|
||||
if(has_restart_plan)
|
||||
ExpireReservations();
|
||||
NetServer::StopDuelTimer();
|
||||
for(auto& state : seat_state)
|
||||
state = CTOS_SeatState{}; // YGOL seat state: nobody is picking once the duel starts
|
||||
#ifndef YGOPRO_SERVER_MODE
|
||||
|
||||
@@ -1089,6 +1089,11 @@ void TagDuel::StartDuel(DuelPlayer* dp) {
|
||||
if(restart_phase != 0) // YGOL rules restart: frozen until Commit or Abort
|
||||
return;
|
||||
ygol_started = true; // YGOL rules restart: no Prepare after the first accepted START
|
||||
// YGOL restart clock: the lobby tick shares the duel timer; a reservation window still open at START
|
||||
// would tick into the duel and end it at once on "time limit up" (an untimed duel has a limit of 0)
|
||||
if(has_restart_plan)
|
||||
ExpireReservations();
|
||||
NetServer::StopDuelTimer();
|
||||
for(auto& state : seat_state)
|
||||
state = CTOS_SeatState{}; // YGOL seat state: nobody is picking once the duel starts
|
||||
#ifndef YGOPRO_SERVER_MODE
|
||||
|
||||
Reference in new issue
Block a user