coding & phpdoc improvements continued

This commit is contained in:
Steffen Schröder
2014-05-27 22:44:22 +02:00
parent 9e016cc770
commit c284feb843
12 changed files with 23 additions and 40 deletions

View File

@ -306,25 +306,13 @@ class WidgetPlugin implements CallbackListener, TimerListener, Plugin {
$backgroundQuad->setSize($width, $height);
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
$maxPlayers = $this->maniaControl->client->getMaxPlayers();
$maxSpectators = $this->maniaControl->client->getMaxSpectators();
$serverName = $this->maniaControl->client->getServerName();
$players = $this->maniaControl->playerManager->getPlayers();
$playerCount = 0;
$spectatorCount = 0;
/**
* @var Player $player
*/
foreach ($players as $player) {
if ($player->isSpectator) {
$spectatorCount++;
} else {
$playerCount++;
}
}
$playerCount = $this->maniaControl->playerManager->getPlayerCount(true);
$maxPlayers = $this->maniaControl->client->getMaxPlayers();
$spectatorCount = $this->maniaControl->playerManager->getSpectatorCount();
$maxSpectators = $this->maniaControl->client->getMaxSpectators();
$label = new Label_Text();
$frame->add($label);