Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 15, 2008, 10:43:22 PM (16 years ago)
Author:
scheusso
Message:

fix for dedicated server

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/orxonox/objects/worldentities/pawns/Spectator.cc

    r2459 r2473  
    6363        this->setDestroyWhenPlayerLeft(true);
    6464
    65         this->greetingFlare_ = new BillboardSet();
    66         this->greetingFlare_->setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0, 1.0, 0.8), Vector3(0, 20, 0), 1);
    67         if (this->greetingFlare_->getBillboardSet())
    68             this->attachOgreObject(this->greetingFlare_->getBillboardSet());
    69         this->greetingFlare_->setVisible(false);
     65        if ( Core::showsGraphics() )
     66        {
     67            this->greetingFlare_ = new BillboardSet();
     68            this->greetingFlare_->setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0, 1.0, 0.8), Vector3(0, 20, 0), 1);
     69            if (this->greetingFlare_->getBillboardSet())
     70                this->attachOgreObject(this->greetingFlare_->getBillboardSet());
     71            this->greetingFlare_->setVisible(false);
     72        }
    7073        this->bGreetingFlareVisible_ = false;
    7174        this->bGreeting_ = false;
     
    102105    void Spectator::changedFlareVisibility()
    103106    {
    104         this->greetingFlare_->setVisible(this->bGreetingFlareVisible_);
     107        if ( this->greetingFlare_ )             
     108            this->greetingFlare_->setVisible(this->bGreetingFlareVisible_);
    105109    }
    106110
Note: See TracChangeset for help on using the changeset viewer.