Added API to allow getting player latency

This commit is contained in:
Dylan K. Taylor
2017-11-06 14:33:27 +00:00
parent 6ece799998
commit fd0b07a0aa
4 changed files with 36 additions and 3 deletions

View File

@ -237,6 +237,12 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
return null;
}
public function updatePing(string $identifier, int $pingMS){
if(isset($this->players[$identifier])){
$this->players[$identifier]->updatePing($pingMS);
}
}
private function getPacket($buffer){
$pid = ord($buffer{0});
if(($data = PacketPool::getPacketById($pid)) === null){