From dec90303b973fc03fa48a1cc083b284efacc5d23 Mon Sep 17 00:00:00 2001 From: Beu Date: Mon, 16 Oct 2023 23:54:26 +0200 Subject: [PATCH] compute latest race scores before the callback --- TM_ReverseCup.Script.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/TM_ReverseCup.Script.txt b/TM_ReverseCup.Script.txt index dfd4f8f..c86ab1e 100644 --- a/TM_ReverseCup.Script.txt +++ b/TM_ReverseCup.Script.txt @@ -440,6 +440,9 @@ StateMgr::ForcePlayersStates([CupCommon_Const::C_State_Waiting]); CarRank::Update(CarRank::C_SortCriteria_CurrentRace); UpdateLiveRaceUI(); +// Compute round points before the callback +ComputeLatestRaceScores(Round_NbPlayersInThisRound); + if (Semver::Compare(XmlRpc::GetApiVersion(), ">=", "2.1.1")) { Scores::XmlRpc_SendScores(Scores::C_Section_PreEndRound, ""); } @@ -457,8 +460,6 @@ if (Round_ForceEndRound || Round_SkipPauseRound || Round_Skipped) { DisplayCustomPoints(); MB_Sleep(3000); } else { - // Get the last round points - ComputeLatestRaceScores(Round_NbPlayersInThisRound); +++Cup_EndRound_BeforeScoresUpdate+++ Race::SortScores(Race::C_Sort_TotalPoints); UIManager.UIAll.ScoreTableVisibility = CUIConfig::EVisibility::ForcedVisible;