lap finish instead of usual checkpoint callback
This commit is contained in:
parent
cf345dfdc3
commit
2ea6233774
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user