Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10248 in orxonox.OLD for branches/mount_points/src


Ignore:
Timestamp:
Jan 17, 2007, 11:34:02 AM (18 years ago)
Author:
patrick
Message:

mount point loading is working

Location:
branches/mount_points/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/mount_points/src/story_entities/game_world.cc

    r10228 r10248  
    9090  this->showBV = false;
    9191  this->showBVLevel = 3;
     92  this->showMPV = false;
    9293
    9394  this->dataXML = NULL;
  • branches/mount_points/src/world_entities/mount_point.cc

    r10247 r10248  
    146146  BaseObject* obj = Factory::fabricate(orxClass);
    147147  // check if the object is created correctly
    148   if( this->_mount != NULL)
     148  if( obj != NULL)
    149149  {
    150150    if( obj->isA( WorldEntity::staticClassID()))
    151151    {
     152      // cast down the object to WE
    152153      this->_mount = dynamic_cast<WorldEntity*>(obj);
     154
     155      // now set the position, direction and reparent it to this node
     156      this->_mount->setAbsCoor( this->getAbsCoor());
     157      this->_mount->setAbsDir( this->getAbsDir());
     158      this->_mount->setParent( this);
     159
     160      this->_mount->toList( (OM_LIST)(this->getOMListNumber()+1));
    153161    }
    154162  }
  • branches/mount_points/src/world_entities/world_entity.cc

    r10243 r10248  
    294294  for( ; it != mpList.end(); it++)
    295295  {
     296    // create the mount points world entity
    296297    MountPoint* mp = new MountPoint( (*it).up, (*it).forward, (*it).center, (*it).name);
     298    // parent it to this WE
     299    mp->setParent( this);
     300    // now add to the right group
     301    mp->toList( (OM_LIST)(this->getOMListNumber()+1));
    297302    // now get the number and add the mount point to the slot
    298303    std::string nrStr = (*it).name.substr(3, 2);
Note: See TracChangeset for help on using the changeset viewer.