small improvements

This commit is contained in:
Beu 2021-08-23 15:24:01 +02:00
parent db5169bff3
commit 61f30c26dc

View File

@ -433,7 +433,6 @@ foreach (Event in RacePendingEvents) {
ModeRounds_CanSpawn = True; ModeRounds_CanSpawn = True;
} else { } else {
Scores::UpdatePlayerBestRaceIfBetter(Event.Player); Scores::UpdatePlayerBestRaceIfBetter(Event.Player);
Scores::UpdatePlayerBestLapIfBetter(Event.Player);
Scores::UpdatePlayerPrevRace(Event.Player); Scores::UpdatePlayerPrevRace(Event.Player);
ComputeLatestRaceScores(); ComputeLatestRaceScores();
Race::SortScores(Race::C_Sort_TotalPoints); Race::SortScores(Race::C_Sort_TotalPoints);
@ -483,7 +482,6 @@ if (Players.count > 0 && PlayersNbAlive <= 0) { //< Check for unspawned players
MB_StopRound(); MB_StopRound();
Round_Skipped = False; Round_Skipped = False;
} }
} }
// Server info change // Server info change
@ -564,9 +562,9 @@ Scores::SetPlayerWinner(Scores::GetBestPlayer(Scores::C_Sort_MatchPoints));
* @param _RoundsPerMap The number of round per map * @param _RoundsPerMap The number of round per map
* @param _MapsPerMatch The number of maps per match * @param _MapsPerMatch The number of maps per match
* @param _ValidRoundsNb Number of valid rounds played * @param _ValidRoundsNb Number of valid rounds played
* @param _SegmentsPerRound The number of segment per round
*/ */
Void UpdateScoresTableFooter(Integer _PointsLimit, Integer _RoundsPerMap, Integer _MapsPerMatch, Integer _ValidRoundsNb, Integer _SegmentsPerRound) { Void UpdateScoresTableFooter(Integer _PointsLimit, Integer _RoundsPerMap, Integer _MapsPerMatch, Integer _ValidRoundsNb, Integer _SegmentsPerRound) {
log("UpdateScoresTableFooter");
declare Text[] Parts; declare Text[] Parts;
declare Text Message = ""; declare Text Message = "";
if (_PointsLimit > 0) { if (_PointsLimit > 0) {
@ -613,12 +611,7 @@ Integer GetFinishTimeout(Integer _FinishTimeout) {
if (_FinishTimeout >= 0) { if (_FinishTimeout >= 0) {
FinishTimeout = _FinishTimeout * 1000; FinishTimeout = _FinishTimeout * 1000;
} else { } else {
FinishTimeout = 5000; FinishTimeout = 5000 + Map.TMObjective_AuthorTime / 6;
if (Map.TMObjective_IsLapRace && Race::GetLapsNb() > 0 && Map.TMObjective_NbLaps > 0) {
FinishTimeout += ((Map.TMObjective_AuthorTime / Map.TMObjective_NbLaps) * Race::GetLapsNb()) / 6;
} else {
FinishTimeout += Map.TMObjective_AuthorTime / 6;
}
} }
return Now + FinishTimeout; return Now + FinishTimeout;