Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 26, 2008, 12:59:48 AM (16 years ago)
Author:
scheusso
Message:

Fix in Projectiles (network fix)
different improvements in synchronisable and gamestates

File:
1 edited

Legend:

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

    r1747 r1834  
    4242        RegisterObject(ParticleProjectile);
    4343
     44        this->particles_ = new ParticleInterface("Orxonox/shot2", LODParticle::normal);
     45        this->particles_->addToSceneNode(this->getNode());
     46        this->particles_->setKeepParticlesInLocalSpace(true);
    4447        if (this->owner_)
    4548        {
    46             this->particles_ = new ParticleInterface("Orxonox/shot2", LODParticle::normal);
    47             this->particles_->addToSceneNode(this->getNode());
    48             this->particles_->getAllEmitters()->setDirection(-this->owner_->getInitialDir());
    49             this->particles_->setKeepParticlesInLocalSpace(true);
    5049        }
    51         else
    52         {
    53             this->particles_ = 0;
    54         }
     50//        else
     51//        {
     52//            this->particles_ = 0;
     53//        }
    5554
    5655        this->setConfigValues();
     
    7372        this->particles_->setEnabled(this->isVisible());
    7473    }
     74   
     75    bool ParticleProjectile::create(){
     76      if(!Projectile::create())
     77        return false;
     78      this->particles_->getAllEmitters()->setDirection(-this->getOrientation()*Vector3(1,0,0));
     79      return true;
     80    }
    7581}
Note: See TracChangeset for help on using the changeset viewer.