small dedi fix
This commit is contained in:
parent
798053dd14
commit
745f930f0c
@ -277,7 +277,7 @@ class Dedimania implements CallbackListener, TimerListener, Plugin {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
array_push($times, array('Login' => $record->login, 'Best' => $record->best, 'Checks' => $record->checkpoints));
|
array_push($times, array('Login' => $record->login, 'Best' => $record->best, 'Checks' => $record->checkpoints));
|
||||||
if(!isset($replays['VReplay'])){
|
if (!isset($replays['VReplay'])) {
|
||||||
$replays['VReplay'] = $record->vReplay;
|
$replays['VReplay'] = $record->vReplay;
|
||||||
}
|
}
|
||||||
if (!isset($replays['Top1GReplay'])) {
|
if (!isset($replays['Top1GReplay'])) {
|
||||||
@ -555,6 +555,10 @@ class Dedimania implements CallbackListener, TimerListener, Plugin {
|
|||||||
// Loop through existing records
|
// Loop through existing records
|
||||||
foreach($this->dedimaniaData->records as $key => &$record) {
|
foreach($this->dedimaniaData->records as $key => &$record) {
|
||||||
/** @var RecordData $record */
|
/** @var RecordData $record */
|
||||||
|
if ($record->rank > $maxRank) {
|
||||||
|
// Max rank reached
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if ($record->login === $newRecord->login) {
|
if ($record->login === $newRecord->login) {
|
||||||
// Old record of the same player
|
// Old record of the same player
|
||||||
if ($record->best <= $newRecord->best) {
|
if ($record->best <= $newRecord->best) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user