Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 10, 2008, 12:05:03 AM (17 years ago)
Author:
landauf
Message:

merged revisions 2111-2170 from objecthierarchy branch back to trunk.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.cc

    r2087 r2171  
    6262        this->greetingFlare_ = new BillboardSet();
    6363        this->greetingFlare_->setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0, 1.0, 0.8), Vector3(0, 20, 0), 1);
    64         this->getNode()->attachObject(this->greetingFlare_->getBillboardSet());
     64        if (this->greetingFlare_->getBillboardSet())
     65            this->getNode()->attachObject(this->greetingFlare_->getBillboardSet());
    6566        this->greetingFlare_->setVisible(false);
    6667        this->bGreetingFlareVisible_ = false;
     
    7677            if (this->greetingFlare_)
    7778            {
    78                 this->getNode()->detachObject(this->greetingFlare_->getBillboardSet());
     79                if (this->greetingFlare_->getBillboardSet())
     80                    this->getNode()->detachObject(this->greetingFlare_->getBillboardSet());
    7981                delete this->greetingFlare_;
    8082            }
     
    8486    void Spectator::registerVariables()
    8587    {
    86         REGISTERDATA(this->bGreetingFlareVisible_, network::direction::toclient, new network::NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));
    87         REGISTERDATA(this->bGreeting_,             network::direction::toserver, new network::NetworkCallback<Spectator>(this, &Spectator::changedGreeting));
    88         REGISTERDATA(this->hudmode_,               network::direction::toclient);
     88        REGISTERDATA(this->bGreetingFlareVisible_, direction::toclient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));
     89        REGISTERDATA(this->bGreeting_,             direction::toserver, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting));
     90        REGISTERDATA(this->hudmode_,               direction::toclient);
    8991    }
    9092
     
    129131        ControllableEntity::setPlayer(player);
    130132
    131 //        this->setObjectMode(network::direction::toclient);
     133//        this->setObjectMode(direction::toclient);
    132134    }
    133135
     
    203205                {
    204206                    if (this->getGametype()->isStartCountdownRunning())
    205                         this->hudmode_ = 2 + 10*ceil(this->getGametype()->getStartCountdown());
     207                        this->hudmode_ = 2 + 10*(int)ceil(this->getGametype()->getStartCountdown());
    206208                    else
    207209                        this->hudmode_ = 3;
Note: See TracChangeset for help on using the changeset viewer.