Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 27, 2007, 5:06:55 AM (17 years ago)
Author:
landauf
Message:

put all SetConfigValue macro calls into the setConfigValues function (this is needed to allow changes of the config values at runtime)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/objects/Projectile.cc

    r670 r697  
    3939        RegisterObject(Projectile);
    4040
     41        this->setConfigValues();
     42
    4143        this->owner_ = owner;
    42 
    43         SetConfigValue(lifetime_, 10.0);
    44         SetConfigValue(speed_, 2000.0);
    4544
    4645        this->billboard_.setBillboardSet("Examples/Flare", ColourValue(1.0, 1.0, 0.5), 1);
     
    6463    }
    6564
     65    void Projectile::setConfigValues()
     66    {
     67        SetConfigValue(lifetime_, 10.0);
     68        SetConfigValue(speed_, 2000.0);
     69    }
     70
    6671    void Projectile::tick(float dt)
    6772    {
     
    7782                if (this->getPosition().squaredDistance(it->getPosition()) <= (radius*radius))
    7883                {
    79                     Explosion* explosion = new Explosion(this);
     84                    new Explosion(this);
    8085                    delete this;
    8186                    return;
Note: See TracChangeset for help on using the changeset viewer.