diff --git a/application/core/Callbacks/TrackManiaCallbacks.php b/application/core/Callbacks/TrackManiaCallbacks.php index 0a9b9a88..3b44590f 100644 --- a/application/core/Callbacks/TrackManiaCallbacks.php +++ b/application/core/Callbacks/TrackManiaCallbacks.php @@ -88,7 +88,6 @@ class TrackManiaCallbacks implements CallbackListener { } $checkpointCallback = new RecordCallback(); - $checkpointCallback->name = $checkpointCallback::CHECKPOINT; $checkpointCallback->isLegacyCallback = true; $checkpointCallback->setPlayer($player); $checkpointCallback->time = (int)$data[2]; @@ -101,6 +100,12 @@ class TrackManiaCallbacks implements CallbackListener { $checkpointCallback->lapCheckpoint -= $checkpointCallback->lap * $currentMap->nbCheckpoints; } + if ($checkpointCallback->lapCheckpoint === 0) { + $checkpointCallback->name = $checkpointCallback::LAPFINISH; + } else { + $checkpointCallback->name = $checkpointCallback::CHECKPOINT; + } + $this->maniaControl->callbackManager->triggerCallback($checkpointCallback); }