Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 25, 2013, 9:08:42 PM (11 years ago)
Author:
landauf
Message:

merged core6 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/modules/weapons/projectiles/Rocket.cc

    r9016 r9667  
    5151namespace orxonox
    5252{
    53     CreateFactory(Rocket);
     53    RegisterClass(Rocket);
    5454
    5555    /**
     
    5757        Constructor. Registers the object and initializes some default values.
    5858    */
    59     Rocket::Rocket(BaseObject* creator)
    60         : ControllableEntity(creator)
     59    Rocket::Rocket(Context* context)
     60        : ControllableEntity(context)
    6161        , BasicProjectile()
    62         , RadarViewable(creator, static_cast<WorldEntity*>(this))
     62        , RadarViewable(this, static_cast<WorldEntity*>(this))
    6363    {
    6464        RegisterObject(Rocket);// Register the Rocket class to the core
     
    7373
    7474            // Create rocket model
    75             Model* model = new Model(this);
     75            Model* model = new Model(this->getContext());
    7676            model->setMeshSource("rocket.mesh");
    7777            model->scale(0.7f);
     
    7979
    8080            // Add effects.
    81             ParticleEmitter* fire = new ParticleEmitter(this);
     81            ParticleEmitter* fire = new ParticleEmitter(this->getContext());
    8282            this->attach(fire);
    8383            fire->setOrientation(this->getOrientation());
     
    8989
    9090            // Add collision shape
    91             ConeCollisionShape* collisionShape = new ConeCollisionShape(this);
     91            ConeCollisionShape* collisionShape = new ConeCollisionShape(this->getContext());
    9292            collisionShape->setRadius(3);
    9393            collisionShape->setHeight(500);
     
    9797
    9898            // Add sound
    99             this->defSndWpnEngine_ = new WorldSound(this);
     99            this->defSndWpnEngine_ = new WorldSound(this->getContext());
    100100            this->defSndWpnEngine_->setLooping(true);
    101101            this->defSndWpnEngine_->setSource("sounds/Rocket_engine.ogg");
     
    103103            this->attach(defSndWpnEngine_);
    104104
    105             this->defSndWpnLaunch_ = new WorldSound(this);
     105            this->defSndWpnLaunch_ = new WorldSound(this->getContext());
    106106            this->defSndWpnLaunch_->setLooping(false);
    107107            this->defSndWpnLaunch_->setSource("sounds/Rocket_launch.ogg");
     
    116116
    117117        // Add camera
    118         CameraPosition* camPosition = new CameraPosition(this);
     118        CameraPosition* camPosition = new CameraPosition(this->getContext());
    119119        camPosition->setPosition(0,4,15);
    120120        camPosition->setAllowMouseLook(true);
     
    226226        if(this->getShooter())
    227227        {
    228             effect1 = new ParticleSpawner(this->getShooter()->getCreator());
    229             effect2 = new ParticleSpawner(this->getShooter()->getCreator());
     228            effect1 = new ParticleSpawner(this->getShooter()->getContext());
     229            effect2 = new ParticleSpawner(this->getShooter()->getContext());
    230230        }
    231231        else
    232232        {
    233             effect1 = new ParticleSpawner(static_cast<BaseObject*>(this->getScene().get()));
    234             effect2 = new ParticleSpawner(static_cast<BaseObject*>(this->getScene().get()));
     233            effect1 = new ParticleSpawner(this->getContext());
     234            effect2 = new ParticleSpawner(this->getContext());
    235235        }
    236236
Note: See TracChangeset for help on using the changeset viewer.