Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 3, 2014, 3:14:19 PM (12 years ago)
Author:
landauf
Message:

removed duplicate code. there is no need for a second constructor. if at all, use a factory method.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/worldentities/BigExplosion.cc

    r9946 r9949  
    7878    }
    7979
    80     BigExplosion::BigExplosion(Context* context, Vector3 initVelocity) : MobileEntity(context)
    81     {
    82         RegisterObject(BigExplosion);
    83         this->setVelocity(initVelocity);
    84 
    85         if ( GameMode::showsGraphics() && ( !this->getScene() || !this->getScene()->getSceneManager() ) )
    86             ThrowException(AbortLoading, "Can't create BigExplosion, no scene or no scene manager given.");
    87 
    88         this->bStop_ = false;
    89         this->LOD_ = LODParticle::Normal;
    90 
    91         if ( GameMode::showsGraphics() )
    92         {
    93             try
    94             {
    95                 this->init();
    96             }
    97             catch (const std::exception& ex)
    98             {
    99                 orxout(internal_error) << "Couldn't load particle effect in BigExplosion: " << ex.what() << endl;
    100                 this->initZero();
    101             }
    102         }
    103         else
    104         {
    105             this->initZero();
    106         }
    107 
    108         if (GameMode::isMaster())
    109         {
    110             this->destroyTimer_.setTimer(rnd(2, 4), false, createExecutor(createFunctor(&BigExplosion::stop, this)));
    111         }
    112 
    113         this->registerVariables();
    114     }
    115 
    11680    void BigExplosion::init()
    11781    {
Note: See TracChangeset for help on using the changeset viewer.