div by zero fix
This commit is contained in:
parent
121ba2ed9b
commit
26c9024537
@ -130,7 +130,7 @@ class EndurancePlugin implements CallbackListener, Plugin {
|
|||||||
*/
|
*/
|
||||||
public function callback_Checkpoint(array $callback) {
|
public function callback_Checkpoint(array $callback) {
|
||||||
$callbackData = json_decode($callback[1]);
|
$callbackData = json_decode($callback[1]);
|
||||||
if ($callbackData->Checkpoint % $this->currentMap->nbCheckpoints != 0) {
|
if (!$this->currentMap->nbCheckpoints || $callbackData->Checkpoint % $this->currentMap->nbCheckpoints != 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$player = $this->maniaControl->playerManager->getPlayer($callbackData->Login);
|
$player = $this->maniaControl->playerManager->getPlayer($callbackData->Login);
|
||||||
|
Loading…
Reference in New Issue
Block a user