Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2751 for code/branches/network


Ignore:
Timestamp:
Mar 6, 2009, 2:08:02 PM (16 years ago)
Author:
scheusso
Message:

(partially) fixed network issues with explosionchunk
the problem that remains: if a client ship gets destroyed, the
explosions remain and get periodically triggered (probably a timer
problem)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/orxonox/objects/worldentities/ExplosionChunk.cc

    r2662 r2751  
    4747        RegisterObject(ExplosionChunk);
    4848
    49         if (!this->getScene() || !Core::showsGraphics() || !this->getScene()->getSceneManager())
     49        if ( Core::showsGraphics() && ( !this->getScene() || !this->getScene()->getSceneManager() ) )
    5050            ThrowException(AbortLoading, "Can't create ExplosionChunk, no scene or no scene manager given.");
    5151
     
    5353        this->LOD_ = LODParticle::normal;
    5454
    55         try
     55        if ( Core::showsGraphics() )
    5656        {
    57             this->fire_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/fire4", this->LOD_);
    58             this->attachOgreObject(this->fire_->getParticleSystem());
    59             this->smoke_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/smoke7", this->LOD_);
    60             this->attachOgreObject(this->smoke_->getParticleSystem());
     57            try
     58            {
     59                this->fire_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/fire4", this->LOD_);
     60                this->attachOgreObject(this->fire_->getParticleSystem());
     61                this->smoke_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/smoke7", this->LOD_);
     62                this->attachOgreObject(this->smoke_->getParticleSystem());
     63            }
     64            catch (...)
     65            {
     66                COUT(1) << "Error: Couln't load particle effect in ExplosionChunk." << std::endl;
     67                this->fire_ = 0;
     68                this->smoke_ = 0;
     69            }
    6170        }
    62         catch (...)
     71        else
    6372        {
    64             COUT(1) << "Error: Couln't load particle effect in ExplosionChunk." << std::endl;
    6573            this->fire_ = 0;
    6674            this->smoke_ = 0;
Note: See TracChangeset for help on using the changeset viewer.