Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 16, 2007, 10:52:55 PM (17 years ago)
Author:
patrick
Message:

found a bug in the object information resources file. fixed

File:
1 edited

Legend:

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

    r10232 r10239  
    1010
    1111   ### File Specific
    12    main-programmer: Patrick Boenzli patrick@orxonox.net
     12   main-programmer: Patrick Boenzli, patrick@orxonox.net
    1313   co-programmer:
    1414*/
     
    2727
    2828ObjectListDefinition(MountPoint);
    29 CREATE_FACTORY(MountPoint);
    3029
    3130
     
    106105void MountPoint::loadParam(const TiXmlElement* root)
    107106{
    108    LoadParam(root, "description", this, WorldEntity, setDescription)
    109     .describe("Sets this mount point a description");
     107  // first check for the description
     108  LoadParam(root, "Description", this, MountPoint, setDescription)
     109  .describe("Sets this mount point a description");
    110110
    111 
    112    LoadParam(root, "OrxClass", this, WorldEntity, setOrxClass)
    113     .describe("Sets the class this mount points should host");
     111  // now check for the orx class to create
     112  LoadParam(root, "OrxClass", this, MountPoint, setOrxClass)
     113  .describe("Sets the class this mount points should host");
    114114}
    115115
     
    134134{
    135135  // create the object for this mount point
    136   this->_mount = Factory::fabricate(orxClass);
     136  BaseObject* obj = Factory::fabricate(orxClass);
    137137  // check if the object is created correctly
    138   if( this->_mount == NULL)
     138  if( this->_mount != NULL)
     139  {
     140    if( obj->isA( WorldEntity::staticClassID()))
     141    {
     142      this->_mount = dynamic_cast<WorldEntity*>(obj);
     143    }
     144  }
     145  else
    139146    PRINTF(1)("Couldn't create %s for this mount point (%s)\n", orxClass.c_str(), this->_name.c_str());
    140147}
     
    149156{
    150157
    151 
    152158}
    153159
     
    158164void MountPoint::draw() const
    159165{
    160 
    161166}
    162167
Note: See TracChangeset for help on using the changeset viewer.