fix display of the SmallScoresTable Module + improve timings

This commit is contained in:
Beu 2024-04-05 15:29:11 +02:00
parent bade6e62c0
commit 4b2f911c2c

View File

@ -4,7 +4,7 @@
#Extends "Modes/Nadeo/Trackmania/Base/TrackmaniaRoundsBase.Script.txt" #Extends "Modes/Nadeo/Trackmania/Base/TrackmaniaRoundsBase.Script.txt"
#Const CompatibleMapTypes "TrackMania\\TM_Royal,TM_Royal" #Const CompatibleMapTypes "TrackMania\\TM_Royal,TM_Royal"
#Const Version "2023-10-16" #Const Version "2024-04-05"
#Const ScriptName "Modes/TrackMania/TM_RoyalRounds_Online.Script.txt" #Const ScriptName "Modes/TrackMania/TM_RoyalRounds_Online.Script.txt"
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
@ -506,7 +506,8 @@ if (Round_ForceEndRound || Round_SkipPauseRound) {
*** ***
Race::StopSkipOutroAll(); Race::StopSkipOutroAll();
EndTime = -1; EndTime = -1;
StateMgr::ForcePlayersStates([StateMgr::C_State_Waiting]); // Keep Playing State to keep SmallScoresTable visible
StateMgr::ForcePlayersStates([StateMgr::C_State_Playing]);
if (Semver::Compare(XmlRpc::GetApiVersion(), ">=", "2.1.1")) { if (Semver::Compare(XmlRpc::GetApiVersion(), ">=", "2.1.1")) {
Scores::XmlRpc_SendScores(Scores::C_Section_PreEndRound, ""); Scores::XmlRpc_SendScores(Scores::C_Section_PreEndRound, "");
@ -527,9 +528,11 @@ if (Round_ForceEndRound || Round_SkipPauseRound || Round_Skipped) {
// Get the last round points // Get the last round points
UpdateCustomRanking(Null); UpdateCustomRanking(Null);
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(3000);
Race::SortScores(Race::C_Sort_TotalPoints);
UIManager.UIAll.ScoreTableVisibility = CUIConfig::EVisibility::ForcedVisible;
MB_Sleep(3000);
// Add them to the total scores // Add them to the total scores
ComputeScores(); ComputeScores();
Race::SortScores(Race::C_Sort_TotalPoints); Race::SortScores(Race::C_Sort_TotalPoints);
@ -542,6 +545,7 @@ if (Round_ForceEndRound || Round_SkipPauseRound || Round_Skipped) {
MB_StopMap(); MB_StopMap();
} }
} }
StateMgr::ForcePlayersStates([StateMgr::C_State_Waiting]);
CustomTimes.clear(); CustomTimes.clear();
CurrentRanking.clear(); CurrentRanking.clear();
UIModules_SmallScoresTable::ResetCustomTimes(); UIModules_SmallScoresTable::ResetCustomTimes();