Changeset 4239 in orxonox.OLD for orxonox/branches/levelLoader/src/world_entities/world_entity.cc
- Timestamp:
- May 20, 2005, 2:44:10 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/levelLoader/src/world_entities/world_entity.cc
r4233 r4239 23 23 #include "vector.h" 24 24 25 #include "load_param.h"26 27 25 using namespace std; 28 26 … … 43 41 WorldEntity::WorldEntity(TiXmlElement* root) 44 42 { 43 this->setClassName ("WorldEntity"); 45 44 // Name Setup 46 char* temp; 47 const char* string; 48 string = grabParameter( root, "name"); 49 if( string == NULL) 50 { 51 PRINTF(2)("WorldEntity is missing a proper 'name'\n"); 52 this->setName("unknown"); 53 } 54 else 55 { 56 LoadParam<WorldEntity> (string, this, &WorldEntity::setName); 57 } 45 LoadParam<WorldEntity>(root, "name", this, &WorldEntity::setName); 58 46 // Model Loading 59 47 this->model = NULL; 60 string = grabParameter( root, "model"); 61 if( string != NULL) 62 LoadParam<WorldEntity>(string, this, &WorldEntity::loadModel); 63 else 64 { 65 PRINTF(2)("WorldEntity is missing a proper 'model'\n"); 66 this->model = NULL; 67 } 68 if( this->model == NULL) 69 { 70 PRINTF(2)("WorldEntity model '%s' could not be loaded\n", string); 71 } 48 LoadParam<WorldEntity>(root, "model", this, &WorldEntity::loadModel); 49 72 50 this->bDraw = true; 73 51 }
Note: See TracChangeset
for help on using the changeset viewer.