Changeset 1907 for code/trunk/src/orxonox/objects/Projectile.cc
- Timestamp:
- Oct 12, 2008, 7:40:47 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/Projectile.cc
r1824 r1907 41 41 #include "ParticleSpawner.h" 42 42 #include "Model.h" 43 #include "Settings.h" 43 44 44 45 namespace orxonox … … 56 57 this->setStatic(false); 57 58 this->translate(Vector3(55, 0, 0), Ogre::Node::TS_LOCAL); 58 59 59 60 if (this->owner_) 60 61 { 62 this->setOrientation(this->owner_->getOrientation()); 61 63 this->setPosition(this->owner_->getPosition()); 62 this->setOrientation(this->owner_->getOrientation());63 64 this->setVelocity(this->owner_->getInitialDir() * this->speed_); 64 65 } 65 66 66 this->destroyTimer_.setTimer(this->lifetime_, false, this, createExecutor(createFunctor(&Projectile::destroyObject))); 67 if(!orxonox::Settings::isClient()) //only if not on client 68 this->destroyTimer_.setTimer(this->lifetime_, false, this, createExecutor(createFunctor(&Projectile::destroyObject))); 67 69 } 68 70 … … 122 124 delete this; 123 125 } 126 127 bool Projectile::create(){ 128 return WorldEntity::create(); 129 } 124 130 }
Note: See TracChangeset
for help on using the changeset viewer.