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