Changeset 10216 for code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc
- Timestamp:
- Jan 31, 2015, 6:03:17 PM (9 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc
r9667 r10216 342 342 /** 343 343 @brief 344 Looks for an attached Engine with a certain name. 345 @param name 346 The name of the engine to be returned. 347 @return 348 Pointer to the engine with the given name, or NULL if not found. 349 */ 350 Engine* SpaceShip::getEngineByName(const std::string& name) 351 { 352 for(size_t i = 0; i < this->engineList_.size(); ++i) 353 if(this->engineList_[i]->getName() == name) 354 return this->engineList_[i]; 355 356 orxout(internal_warning) << "Couldn't find Engine with name \"" << name << "\"." << endl; 357 return NULL; 358 } 359 360 /** 361 @brief 344 362 Remove and destroy all Engines of the SpaceShip. 345 363 */ … … 355 373 @param engine 356 374 A pointer to the Engine to be removed. 375 @note 376 Don't forget to reset the Engine's ship pointer after it was removed (or destroy the engine). 357 377 */ 358 378 void SpaceShip::removeEngine(Engine* engine)
Note: See TracChangeset
for help on using the changeset viewer.