Compare commits

..

No commits in common. "04b4137078b87bdcbbf17db42dd9639ba1b8d1d7" and "1962e99ddff1c6bc39d20de6fd51bac98df9c894" have entirely different histories.

View File

@ -204,7 +204,7 @@ foreach (Event in RacePendingEvents) {
Scores::UpdatePlayerBestRaceIfBetter(Event.Player);
Scores::UpdatePlayerBestLapIfBetter(Event.Player);
Scores::UpdatePlayerPrevRace(Event.Player);
ComputeLatestRaceScores(False);
ComputeLatestRaceScores();
Race::SortScores(Race::C_Sort_TotalPoints);
// Start the countdown if it's the first player to finish
@ -263,18 +263,16 @@ if (Round_ForceEndRound || Round_SkipPauseRound || Round_Skipped) {
} else {
Map_ValidRoundsNb += 1;
// Get the last round points
ComputeLatestRaceScores(True);
ComputeLatestRaceScores();
Race::SortScores(Race::C_Sort_TotalPoints);
UIManager.UIAll.UISequence = CUIConfig::EUISequence::EndRound;
MB_Sleep(S_ChatTime * 1000 / 3);
UIManager.UIAll.ScoreTableVisibility = CUIConfig::EVisibility::ForcedVisible;
MB_Sleep(S_ChatTime * 1000 / 3);
UIManager.UIAll.UISequence = CUIConfig::EUISequence::EndRound;
MB_Sleep(3000);
// Add them to the total scores
ComputeScores();
UIModules_ScoresTable::SetCustomPoints([]);
Race::SortScores(Race::C_Sort_TotalPoints);
MB_Sleep(S_ChatTime * 1000 / 3);
UIModules_BigMessage::SetMessage("");
MB_Sleep(3000);
UIManager.UIAll.ScoreTableVisibility = CUIConfig::EVisibility::Normal;
UIManager.UIAll.UISequence = CUIConfig::EUISequence::Playing;
@ -394,7 +392,7 @@ Text FormatPlayerName(Text _Name) {
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
/// Compute the latest race scores
Void ComputeLatestRaceScores(Boolean _DisplayMessages) {
Void ComputeLatestRaceScores() {
Race::SortScores(Race::C_Sort_PrevRaceTime);
// Points distributed between all players
@ -425,7 +423,7 @@ Void ComputeLatestRaceScores(Boolean _DisplayMessages) {
foreach (Delta => CustomScores in ScoresPerAbsoluteDelta) {
// Attribute less points if they have the same time
if (_DisplayMessages && CustomScores.count > 1) {
if (CustomScores.count > 1) {
I += CustomScores.count - 1;
declare Text Names;
foreach (Key => Score in CustomScores) {
@ -450,11 +448,7 @@ Void ComputeLatestRaceScores(Boolean _DisplayMessages) {
if (Delta == 0 && CustomScores.count == 1) {
Points += S_BonusForPerfect;
if (_DisplayMessages) {
UIManager.UIAll.SendChat("$ff3" ^ FormatPlayerName(Score.User.Name) ^ " did the perfect time");
UIModules_BigMessage::SetMessage(FormatPlayerName(Score.User.Name) ^ " did the perfect time");
ModeUtils::PlaySound(CUIConfig::EUISound::TieBreakPoint, 0);
}
}
Scores::SetPlayerRoundPoints(Score, Points);
}