From fdaa53220c353f49fbf02af5ced4eee781b98eda Mon Sep 17 00:00:00 2001 From: jonthekiller Date: Tue, 4 Aug 2020 23:05:12 +0200 Subject: [PATCH] Disable callbacks for TM2020 --- core/Callbacks/LibXmlRpcCallbacks.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/core/Callbacks/LibXmlRpcCallbacks.php b/core/Callbacks/LibXmlRpcCallbacks.php index 26c16e59..2a83720f 100644 --- a/core/Callbacks/LibXmlRpcCallbacks.php +++ b/core/Callbacks/LibXmlRpcCallbacks.php @@ -60,14 +60,20 @@ class LibXmlRpcCallbacks implements CallbackListener { //No use for this Implementation right now (as the MapManager Callback should be used break; case 'Maniaplanet.StartMap_End': //Use the MapManager Callback -// $jsonData = json_decode($data[0]); -// $this->maniaControl->getMapManager()->handleScriptBeginMap($jsonData->map->uid, $jsonData->restarted); + // Disable only on TM2020 + if ($this->maniaControl->getServer()->titleId != "Trackmania") { + $jsonData = json_decode($data[0]); + $this->maniaControl->getMapManager()->handleScriptBeginMap($jsonData->map->uid, $jsonData->restarted); + } break; case 'Maniaplanet.EndMap_Start': //no need for this implementation, callback handled by Map Manager break; case 'Maniaplanet.EndMap_End': //Use the MapManager Callback -// $this->maniaControl->getMapManager()->handleScriptEndMap(); //Verify if better here or at EndMap_End + // Disable only on TM2020 + if ($this->maniaControl->getServer()->titleId != "Trackmania") { + $this->maniaControl->getMapManager()->handleScriptEndMap(); //Verify if better here or at EndMap_End + } break; }