Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

mount point loading is working

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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  }
Note: See TracChangeset for help on using the changeset viewer.