From 745f930f0cdfdf4b7c5bca0b14486e0fa21b62a9 Mon Sep 17 00:00:00 2001 From: kremsy Date: Tue, 25 Feb 2014 12:08:18 +0100 Subject: [PATCH] small dedi fix --- application/plugins/Dedimania/Dedimania.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/application/plugins/Dedimania/Dedimania.php b/application/plugins/Dedimania/Dedimania.php index c209b01e..fdfea53a 100644 --- a/application/plugins/Dedimania/Dedimania.php +++ b/application/plugins/Dedimania/Dedimania.php @@ -277,11 +277,11 @@ class Dedimania implements CallbackListener, TimerListener, Plugin { continue; } array_push($times, array('Login' => $record->login, 'Best' => $record->best, 'Checks' => $record->checkpoints)); - if(!isset($replays['VReplay'])){ - $replays['VReplay'] = $record->vReplay; + if (!isset($replays['VReplay'])) { + $replays['VReplay'] = $record->vReplay; } if (!isset($replays['Top1GReplay'])) { - $replays['Top1GReplay'] = $record->top1GReplay; + $replays['Top1GReplay'] = $record->top1GReplay; } if (!isset($replays['VReplayChecks'])) { $replays['VReplayChecks'] = ''; @@ -555,6 +555,10 @@ class Dedimania implements CallbackListener, TimerListener, Plugin { // Loop through existing records foreach($this->dedimaniaData->records as $key => &$record) { /** @var RecordData $record */ + if ($record->rank > $maxRank) { + // Max rank reached + return false; + } if ($record->login === $newRecord->login) { // Old record of the same player if ($record->best <= $newRecord->best) {