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