|
@@ 139-145 (lines=7) @@
|
| 136 |
|
* @param int $position |
| 137 |
|
* @param int $oldPosition |
| 138 |
|
*/ |
| 139 |
|
public function onLocalRecordsBetterPosition(Record $record, Record $oldRecord, $records, $position, $oldPosition) |
| 140 |
|
{ |
| 141 |
|
if ($position == 1) { |
| 142 |
|
$this->updater->setLocalRecord($record->getCheckpoints()); |
| 143 |
|
$this->updater->update($this->allPlayers); |
| 144 |
|
} |
| 145 |
|
} |
| 146 |
|
|
| 147 |
|
/** |
| 148 |
|
* Called when a player finishes map with better time but keeps same position. |
|
@@ 155-161 (lines=7) @@
|
| 152 |
|
* @param Record[] $records |
| 153 |
|
* @param $position |
| 154 |
|
*/ |
| 155 |
|
public function onLocalRecordsSamePosition(Record $record, Record $oldRecord, $records, $position) |
| 156 |
|
{ |
| 157 |
|
if ($position == 1) { |
| 158 |
|
$this->updater->setLocalRecord($record->getCheckpoints()); |
| 159 |
|
$this->updater->update($this->allPlayers); |
| 160 |
|
} |
| 161 |
|
} |
| 162 |
|
|
| 163 |
|
|
| 164 |
|
/** |