Changeset 10184 in orxonox.OLD for branches/mount_points/src/world_entities/world_entity.cc
- Timestamp:
- Jan 6, 2007, 5:03:27 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mount_points/src/world_entities/world_entity.cc
r10147 r10184 207 207 { 208 208 this->setModel(model, modelNumber); 209 if( modelNumber == 0 /* FIXME && !this->isA(CL_WEAPON) */)209 if( modelNumber == 0) 210 210 this->buildObbTree(obbTreeDepth); 211 212 // now get the object information file for this model, if any 213 std::string oifName = fileName.substr(0, fileName.length() - 4) + ".oif"; 214 this->loadMountPoints( oifName); 211 215 } 212 216 else 213 217 delete model; 214 215 // now get the object information file for this model, if any216 std::string oifName = fileName.substr(0, fileName.length() - 4) + ".oif";217 this->loadObjectInformationFile( oifName);218 218 } 219 219 /// LOADING AN MD2-model … … 269 269 * @param fileName the name of the file 270 270 */ 271 void WorldEntity::load ObjectInformationFile(const std::string& fileName)271 void WorldEntity::loadMountPoints(const std::string& fileName) 272 272 { 273 273 PRINTF(4)("loading the oif File: %s\n", fileName.c_str()); 274 274 275 // first get all mount points from the model 276 std::list<mountPointSkeleton> mpList = this->models[0]->getMountPoints(); 277 278 // for each skeleton create a mounting point world entity 279 std::list<mountPointSkeleton>::const_iterator it = mpList.begin(); 280 for( ; it != mpList.end(); it++) 281 { 282 MountPoint* mp = new MountPoint((*it).up, (*it).forward, (*it).center, (*it).name); 283 284 this->mountPoints.push_back(mp); 285 } 286 287 // now load the object information file 275 288 this->oiFile = new ObjectInformationFile(fileName); 289 290 291 276 292 } 277 293
Note: See TracChangeset
for help on using the changeset viewer.