diff --git a/TM_RoyalRounds_Online.Script.txt b/TM_RoyalRounds_Online.Script.txt index 1a933a2..0e0b1b8 100644 --- a/TM_RoyalRounds_Online.Script.txt +++ b/TM_RoyalRounds_Online.Script.txt @@ -113,9 +113,7 @@ if (C_HudModulePath != "") Hud_Load(C_HudModulePath); ClientManiaAppUrl = C_ManiaAppUrl; Race::SortScores(Race::C_Sort_TotalPoints); UIModules_ScoresTable::SetScoreMode(UIModules_ScoresTable::C_Mode_Points); -UIModules_Checkpoint::SetVisibilityTimeDiff(False); -UIModules_Checkpoint::SetRankMode(UIModules_Checkpoint::C_RankMode_CurrentRace); -UIModules_Checkpoint::SetAutoUISequenceFinish(False); +UIModules_Checkpoint::SetVisibleFor(UIModules_Checkpoint::C_Target_None); UIModules_TimeGap::SetTimeGapMode(UIModules_TimeGap::C_TimeGapMode_Hidden); UIModules_PauseMenu_Online::SetHelp(Description); // Hide SM Overlay @@ -123,6 +121,8 @@ UIManager.UIAll.OverlayHideSpectatorControllers = True; UIManager.UIAll.OverlayHideSpectatorInfos = True; UIManager.UIAll.OverlayHideChrono = True; UIManager.UIAll.OverlayHideCountdown = True; + +SetML(); *** ***Match_Yield*** @@ -327,20 +327,28 @@ foreach (Event in RacePendingEvents) { if (!CurrentRanking.existskey(CurrentSegment)) CurrentRanking[CurrentSegment] = Integer[Text]; CurrentRanking[CurrentSegment][Event.Player.User.WebServicesUserId] = Event.Player.StartTime - StartTime + Event.RaceTime; + // Update Ranking of the current players + declare Integer Rank = 1; + declare Integer I = 1; + Rank = CurrentRanking[CurrentSegment].count; + while (CurrentRanking.existskey(CurrentSegment + I)) { + Rank = Rank + CurrentRanking[CurrentSegment + I].count; + I = I + 1; + } + Event.Player.Dossard_Number = TL::FormatInteger(ML::Clamp(Rank, 0, 99), 2); + + // Send Rank to Checkpoint UI + declare UI <=> UIManager.GetUI(Event.Player); + if (UI != Null) { + declare netwrite Integer Net_RoyalRounds_CheckpointUI_Rank for UI; + Net_RoyalRounds_CheckpointUI_Rank = Rank; + declare netwrite Integer Net_RoyalRounds_CheckpointUI_Update for UI; + Net_RoyalRounds_CheckpointUI_Update += 1; + } + if (CurrentSegment < S_SegmentsPerRound) { // TODO Try to keep CP diff a the bottom of the screen declare ModeRounds_CanSpawn for Event.Player.Score = Rounds_Settings_CanSpawnDefault; ModeRounds_CanSpawn = True; - - // Update Ranking of the current players - declare Integer Rank = 1; - declare Integer I = 1; - Rank = CurrentRanking[CurrentSegment].count; - while (CurrentRanking.existskey(CurrentSegment + I)) { - Rank = Rank + CurrentRanking[CurrentSegment + I].count; - I = I + 1; - } - Event.Player.Dossard_Number = TL::FormatInteger(ML::Clamp(Rank, 0, 99), 2); - CurrentSegment = CurrentSegment + 1; Race::StopSkipScoresTable(Event.Player); } else { @@ -711,4 +719,69 @@ Boolean MapIsOver(Boolean _UseTieBreak, Integer _PointsLimit, Integer _ValidRoun // In all other cases continue to play return False; +} + +/** + * Set the UI + */ + Void SetML() { + declare TotalWidth = 44.5; + + declare Text MLText = """ + + + +