small fix
This commit is contained in:
parent
557dd7b9a6
commit
27aac6842e
@ -131,7 +131,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
$playerFrame->setY($y);
|
$playerFrame->setY($y);
|
||||||
|
|
||||||
//Team Emblem
|
//Team Emblem
|
||||||
if($listPlayer->teamId != -1){ //Show Players Team
|
if($listPlayer->teamId >= 0){ //Player is in a Team
|
||||||
$redQuad = new Quad_Emblems(); //TODO rename quads
|
$redQuad = new Quad_Emblems(); //TODO rename quads
|
||||||
$playerFrame->add($redQuad);
|
$playerFrame->add($redQuad);
|
||||||
$redQuad->setX($x + 10);
|
$redQuad->setX($x + 10);
|
||||||
@ -141,9 +141,8 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
switch($listPlayer->teamId){
|
switch($listPlayer->teamId){
|
||||||
case 0: $redQuad->setSubStyle($redQuad::SUBSTYLE_1); break;
|
case 0: $redQuad->setSubStyle($redQuad::SUBSTYLE_1); break;
|
||||||
case 1: $redQuad->setSubStyle($redQuad::SUBSTYLE_2); break;
|
case 1: $redQuad->setSubStyle($redQuad::SUBSTYLE_2); break;
|
||||||
//case 2: $redQuad->setSubStyle($redQuad::SUBSTYLE_2); break;
|
|
||||||
}
|
}
|
||||||
}else{ //player is in spec
|
}else if($listPlayer->isSpectator){ //Player is in Spectator Mode
|
||||||
$neutralQuad = new Quad_BgRaceScore2();
|
$neutralQuad = new Quad_BgRaceScore2();
|
||||||
$playerFrame->add($neutralQuad);
|
$playerFrame->add($neutralQuad);
|
||||||
$neutralQuad->setX($x + 10);
|
$neutralQuad->setX($x + 10);
|
||||||
|
@ -159,11 +159,11 @@ class PlayerManager implements CallbackListener {
|
|||||||
* @param array $callback
|
* @param array $callback
|
||||||
*/
|
*/
|
||||||
public function playerInfoChanged(array $callback){
|
public function playerInfoChanged(array $callback){
|
||||||
//TODO update other info
|
//TODO something on playerjoin not working here (maybe because it get called before player join
|
||||||
//TODO something on playerjoin not working here
|
|
||||||
$player = $this->getPlayer($callback[1][0]['Login']);
|
$player = $this->getPlayer($callback[1][0]['Login']);
|
||||||
$player->teamId = $callback[1][0]["TeamId"];
|
$player->teamId = $callback[1][0]["TeamId"];
|
||||||
//var_dump($callback);
|
$player->isSpectator = $callback[1][0]["SpectatorStatus"];
|
||||||
|
$player->ladderRank = $callback[1][0]["LadderRanking"];
|
||||||
|
|
||||||
// Trigger own callback
|
// Trigger own callback
|
||||||
$this->maniaControl->callbackManager->triggerCallback(self::CB_PLAYERINFOCHANGED, array(self::CB_PLAYERINFOCHANGED));
|
$this->maniaControl->callbackManager->triggerCallback(self::CB_PLAYERINFOCHANGED, array(self::CB_PLAYERINFOCHANGED));
|
||||||
|
Loading…
Reference in New Issue
Block a user