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
1 changed files with 8 additions and 4 deletions

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"
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
@ -383,7 +383,7 @@ foreach (Event in Race::GetPendingEvents()) {
declare netwrite Integer Net_RoyalRounds_CheckpointUI_CurrentNbSegments for Event.Player; declare netwrite Integer Net_RoyalRounds_CheckpointUI_CurrentNbSegments for Event.Player;
Net_RoyalRounds_CheckpointUI_CurrentNbSegments = CurrentSegment; Net_RoyalRounds_CheckpointUI_CurrentNbSegments = CurrentSegment;
if (CurrentSegment < S_SegmentsPerRound) { // TODO Try to keep CP diff a the bottom of the screen if (CurrentSegment < S_SegmentsPerRound) { // TODO Try to keep CP diff a the bottom of the screen
declare Boolean ModeRounds_CanSpawn for Event.Player.Score = Rounds_Settings_CanSpawnDefault; declare Boolean ModeRounds_CanSpawn for Event.Player.Score = Rounds_Settings_CanSpawnDefault;
ModeRounds_CanSpawn = True; ModeRounds_CanSpawn = True;
CurrentSegment = CurrentSegment + 1; CurrentSegment = CurrentSegment + 1;
@ -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();