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