From b1712df916e02a05d1a52147ae4d5fde062b2168 Mon Sep 17 00:00:00 2001 From: jonthekiller Date: Sat, 1 Aug 2020 16:32:44 +0200 Subject: [PATCH] Remove stuntscore in TM2020 Stuntscore doesn't exist in TM2020 --- core/Callbacks/Structures/TrackMania/OnScoresStructure.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/Callbacks/Structures/TrackMania/OnScoresStructure.php b/core/Callbacks/Structures/TrackMania/OnScoresStructure.php index 3918930f..52c1a9b0 100644 --- a/core/Callbacks/Structures/TrackMania/OnScoresStructure.php +++ b/core/Callbacks/Structures/TrackMania/OnScoresStructure.php @@ -37,10 +37,13 @@ class OnScoresStructure extends CommonScoresStructure { $playerScore->setRoundPoints($jsonPlayer->roundpoints); $playerScore->setBestRaceTime($jsonPlayer->bestracetime); $playerScore->setBestLapTime($jsonPlayer->bestlaptime); - $playerScore->setStuntScore($jsonPlayer->stuntsscore); $playerScore->setBestRaceCheckpoints($jsonPlayer->bestracecheckpoints); $playerScore->setBestLapCheckpoints($jsonPlayer->bestlapcheckpoints); + // removed in TM2020 + if (property_exists($jsonPlayer, 'stuntsscore')) { + $playerScore->setStuntScore($jsonPlayer->stuntsscore); + } // removed in TM2020 if (property_exists($jsonPlayer, 'bestracerespawns')) { $playerScore->setBestRaceRespawns($jsonPlayer->bestracerespawns); @@ -71,4 +74,4 @@ class OnScoresStructure extends CommonScoresStructure { } } } -} \ No newline at end of file +}