Changeset 10239 in orxonox.OLD for branches/mount_points/src/world_entities/mount_point.cc
- Timestamp:
- Jan 16, 2007, 10:52:55 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mount_points/src/world_entities/mount_point.cc
r10232 r10239 10 10 11 11 ### File Specific 12 main-programmer: Patrick Boenzli patrick@orxonox.net12 main-programmer: Patrick Boenzli, patrick@orxonox.net 13 13 co-programmer: 14 14 */ … … 27 27 28 28 ObjectListDefinition(MountPoint); 29 CREATE_FACTORY(MountPoint);30 29 31 30 … … 106 105 void MountPoint::loadParam(const TiXmlElement* root) 107 106 { 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"); 110 110 111 112 LoadParam(root, "OrxClass", this, WorldEntity, setOrxClass)113 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"); 114 114 } 115 115 … … 134 134 { 135 135 // create the object for this mount point 136 this->_mount= Factory::fabricate(orxClass);136 BaseObject* obj = Factory::fabricate(orxClass); 137 137 // 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 139 146 PRINTF(1)("Couldn't create %s for this mount point (%s)\n", orxClass.c_str(), this->_name.c_str()); 140 147 } … … 149 156 { 150 157 151 152 158 } 153 159 … … 158 164 void MountPoint::draw() const 159 165 { 160 161 166 } 162 167
Note: See TracChangeset
for help on using the changeset viewer.