small optimation, untested
This commit is contained in:
parent
f3be18510a
commit
273509adb5
@ -117,19 +117,17 @@ class PlayerManager implements CallbackListener {
|
|||||||
if($playerItem->playerId <= 0) {
|
if($playerItem->playerId <= 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$playerInfo = $this->maniaControl->client->getPlayerInfo($playerItem->login);
|
|
||||||
|
|
||||||
//TODO just a workaround due nadeos bad structure
|
|
||||||
$detailedPlayerInfo = $this->maniaControl->client->getDetailedPlayerInfo($playerItem->login);
|
$detailedPlayerInfo = $this->maniaControl->client->getDetailedPlayerInfo($playerItem->login);
|
||||||
$playerInfo->path = $detailedPlayerInfo->path;
|
$playerItem->path = $detailedPlayerInfo->path;
|
||||||
$playerInfo->language = $detailedPlayerInfo->language;
|
$playerItem->language = $detailedPlayerInfo->language;
|
||||||
$playerInfo->clientVersion = $detailedPlayerInfo->clientVersion;
|
$playerItem->clientVersion = $detailedPlayerInfo->clientVersion;
|
||||||
$playerInfo->iPAddress = $detailedPlayerInfo->iPAddress;
|
$playerItem->iPAddress = $detailedPlayerInfo->iPAddress;
|
||||||
$playerInfo->isSpectator = $detailedPlayerInfo->isSpectator;
|
$playerItem->isSpectator = $detailedPlayerInfo->isSpectator;
|
||||||
$playerInfo->avatar = $detailedPlayerInfo->avatar;
|
$playerItem->avatar = $detailedPlayerInfo->avatar;
|
||||||
$playerInfo->ladderStats = $detailedPlayerInfo->ladderStats;
|
$playerItem->ladderStats = $detailedPlayerInfo->ladderStats;
|
||||||
|
|
||||||
$player = new Player($playerInfo);
|
$player = new Player($playerItem);
|
||||||
$player->hasJoinedGame = true;
|
$player->hasJoinedGame = true;
|
||||||
$this->addPlayer($player);
|
$this->addPlayer($player);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user