small fix localrecords
This commit is contained in:
parent
8cfe46e32f
commit
2f7db3cafd
@ -293,11 +293,13 @@ class LocalRecordsPlugin implements ManialinkPageAnswerListener, CallbackListene
|
||||
|
||||
//Generate the Records around a player and display below topRecords
|
||||
for ($i = $playerIndex - $recordsBeforeAfter; $i <= $playerIndex + $recordsBeforeAfter; $i++) {
|
||||
if(array_key_exists($i, $records)){ //If there are no records behind you
|
||||
$recordFrame = $this->generateRecordLineFrame($records[$i], $player);
|
||||
$recordFrame->setY($y);
|
||||
$listFrame->addChild($recordFrame);
|
||||
$y -= $lineHeight;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
$listFrame->addChild($this->generateRecordsFrame($records, $lines, $player));
|
||||
|
Loading…
Reference in New Issue
Block a user