fix StartTime & end round when no one play

This commit is contained in:
Beu 2022-01-24 14:49:04 +01:00
parent 17911e9ab6
commit 4a0b9e4394
1 changed files with 20 additions and 0 deletions

View File

@ -226,6 +226,12 @@ Map_MapsPerMatch = S_MapsPerMatch;
UpdateScoresTableFooterAndTimeLimit(StartTime, S_TimeLimit, S_MapsPerMatch);
***
***Match_StartRound***
***
StartTime = Now + Race::C_SpawnDuration;
UpdateScoresTableFooterAndTimeLimit(StartTime, S_TimeLimit, S_MapsPerMatch);
***
***Match_InitPlayLoop***
***
Round_Skipped = False;
@ -328,6 +334,20 @@ if (Net_ScriptEnvironment != S_ScriptEnvironment) {
}
***
***Rounds_CheckStopRound***
***
// If time limit is reached
if (EndTime > 0 && Now >= EndTime) {
MB_StopRound();
Round_Skipped = False;
}
// If forced end round or round skipped after pause
if (Round_ForceEndRound || Round_SkipPauseRound) {
MB_StopRound();
Round_Skipped = False;
}
***
***Match_EndRound***
***
Race::StopSkipOutroAll();