Changeset 626 for code/branches
- Timestamp:
- Dec 18, 2007, 8:58:22 PM (17 years ago)
- Location:
- code/branches/FICN/src/orxonox/objects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/objects/SpaceShip.cc
r623 r626 121 121 w->setPositionOfEmitter(1, Vector3(0,-10,10)); 122 122 123 emitterRate_ = w->getRate(); 124 123 125 Ogre::SceneNode* node1 = this->getNode()->createChildSceneNode(this->getName() + "particle1"); 124 126 node1->setInheritScale(false); … … 138 140 tt->setPositionOfEmitter(0, Vector3(-15,20,-1)); 139 141 tt->setPositionOfEmitter(1, Vector3(-15,-20,-1)); 142 tt->setVelocity(50); 140 143 141 144 Ogre::SceneNode* node2 = this->getNode()->createChildSceneNode(this->getName() + "particle2"); … … 271 274 if(moveForward_ <= 0) 272 275 { 273 accelerationForward_ = brakeForward_;276 accelerationForward_ = -brakeForward_; 274 277 if(speedForward_ > 0) 275 speedForward_ -= accelerationForward_*dt;278 speedForward_ += accelerationForward_*dt; 276 279 if(speedForward_ < 0) 277 280 speedForward_ = 0; … … 380 383 this->pitch(Degree(speedLoopRightLeft_*dt), Ogre::Node::TS_LOCAL); 381 384 385 if (accelerationForward_ > 25.0) 386 { 387 this->tt->setRate(emitterRate_); 388 } 389 else 390 { 391 this->tt->setRate(0); 392 } 393 382 394 } 383 395 -
code/branches/FICN/src/orxonox/objects/SpaceShip.h
r608 r626 78 78 float minMouseX; 79 79 bool moved; 80 81 int emitterRate_; 80 82 }; 81 83 }
Note: See TracChangeset
for help on using the changeset viewer.