From 37b0c52c0a7c81f8ab95bf83ca8f25432d353560 Mon Sep 17 00:00:00 2001 From: Beu Date: Fri, 4 Mar 2022 22:21:30 +0100 Subject: [PATCH] Change to fix XMLRPC Callbacks --- TM_SeedingTimeAttack_Online.Script.txt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/TM_SeedingTimeAttack_Online.Script.txt b/TM_SeedingTimeAttack_Online.Script.txt index e610bcd..eb51490 100644 --- a/TM_SeedingTimeAttack_Online.Script.txt +++ b/TM_SeedingTimeAttack_Online.Script.txt @@ -17,6 +17,7 @@ #Include "Libs/Nadeo/TMNext/TrackMania/Modes/TrophyRanking.Script.txt" as TrophyRanking #Include "Libs/Nadeo/TMNext/TrackMania/Menu/Constants.Script.txt" as MenuConsts #Include "Libs/Nadeo/ModeLibs/Common/Utils.Script.txt" as ModeUtils +#Include "Libs/Nadeo/CommonLibs/Common/Semver.Script.txt" as Semver // UI from Race #Include "ManiaApps/Nadeo/TMxSM/Race/UIModules/TimeGap_Server.Script.txt" as UIModules_TimeGap @@ -123,7 +124,7 @@ foreach (Event in PendingEvents) { StateMgr::InitializePlayer(Event.Player); CarRank::InitializePlayer(Event.Player); if (Event.Player != Null) { - Log::Log("[Match_Yield][PendingEvents] New player added: " ^ Event.Player.Name); + Log::Log("[Match_Yield][PendingEvents] New player added: " ^ Event.Player.User.Name); declare Boolean Match_CanForceTrophyRankUpdate for This; TrophyRanking::InitializeUser(Event.Player.User, Match_CanForceTrophyRankUpdate); if (Scores::GetPlayerMatchPoints(Event.Player.Score) == 0) { @@ -246,7 +247,7 @@ foreach (Event in PendingEvents) { Log::Log("[PlayLoop][PendingEvents] Event.Type: " ^ Event.Type); if (Event.Type == CSmModeEvent::EType::OnPlayerAdded) { if (Event.Player != Null) { - Log::Log("[PlayLoop][PendingEvents] New player added: " ^ Event.Player.Name); + Log::Log("[PlayLoop][PendingEvents] New player added: " ^ Event.Player.User.Name); UpdateCustomRanking(Event.Player); } } @@ -357,8 +358,13 @@ if (EndTime > 0 && Now >= EndTime) { } *** -***Match_EndMap*** +***Match_EndRound*** *** +if (Semver::Compare(XmlRpc::GetApiVersion(), ">=", "2.1.1")) { + Scores::XmlRpc_SendScores(Scores::C_Section_PreEndRound, ""); +} + +UpdateCustomRanking(Null); EndTime = -1; declare Integer WorstTime for This; @@ -376,6 +382,10 @@ CarRank::Update(CarRank::C_SortCriteria_BestRace); Race::StopSkipOutroAll(); Scores::EndRound(); +*** + +***Match_EndMap*** +*** if (MB_GetMapCount() >= S_MapsPerMatch) { Log::Log("[Match_EndMap] Stop Match");