Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 10, 2007, 11:41:08 AM (18 years ago)
Author:
patrick
Message:

fixed the bug, the resources were overwriting my model infos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/mount_points/src/world_entities/world_entity.cc

    r10201 r10202  
    209209      {
    210210        this->setModel(model, modelNumber);
    211         PRINTF(0)("model number: %i\n", modelNumber);
    212211
    213212        if( modelNumber == 0)
     
    217216          // now get the object information file for this model, if any
    218217          std::string oifName = fileName.substr(0, fileName.length() - 4) + ".oif";
    219           this->loadMountPoints( oifName);
     218          this->loadMountPoints( model, oifName);
    220219        }
    221220      }
     
    275274 * @param fileName the name of the file
    276275 */
    277 void WorldEntity::loadMountPoints(const std::string& fileName)
     276void WorldEntity::loadMountPoints( Model* model, const std::string& fileName)
    278277{
    279278  PRINTF(0)("loading the oif File: %s\n", fileName.c_str());
     
    281280
    282281  // first get all mount points from the model
    283   std::list<mountPointSkeleton> mpList = this->getModel()->getMountPoints();
     282  const std::list<mountPointSkeleton> mpList = model->getMountPoints();
    284283  // for each skeleton create a mounting point world entity
    285284  std::list<mountPointSkeleton>::const_iterator it = mpList.begin();
    286285
    287   PRINTF(0)("->>>> size: %i\n", mpList.size());
    288 
    289286  for( ; it != mpList.end(); it++)
    290287  {
    291288    MountPoint* mp = new MountPoint( (*it).up, (*it).forward, (*it).center, (*it).name);
    292289
    293     std::string nrStr = (*it).name.substr(1, 2);
     290    std::string nrStr = (*it).name.substr(3, 2);
    294291
    295292    PRINTF(0)("got mp nr: %s\n", nrStr.c_str());
Note: See TracChangeset for help on using the changeset viewer.