WayPoint-Callback already takes a Structure

This commit is contained in:
Alexander Nell 2020-05-07 12:58:35 +02:00
parent 9a7952811a
commit 0db1636a38

View File

@ -102,11 +102,9 @@ class TrackManiaCallbacks implements CallbackListener {
/** /**
* Trigger the three different Types of Callbacks * Trigger the three different Types of Callbacks
* *
* @param $data * @param \ManiaControl\Callbacks\Structures\TrackMania\OnWayPointEventStructure $structure
*/ */
public function handleWayPointCallback($data) { public function handleWayPointCallback(OnWayPointEventStructure $structure) {
$structure = new OnWayPointEventStructure($this->maniaControl, $data);
if ($structure->getIsEndRace()) { if ($structure->getIsEndRace()) {
$this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::TM_ONFINISHLINE, $structure); $this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::TM_ONFINISHLINE, $structure);
} else if ($structure->getIsEndLap()) { } else if ($structure->getIsEndLap()) {