Changeset 6005 in orxonox.OLD for trunk/src/world_entities/world_entity.cc
- Timestamp:
- Dec 10, 2005, 12:21:31 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/world_entity.cc
r6004 r6005 65 65 66 66 // Delete the model (unregister it with the ResourceManager) 67 this->setModel(NULL); 67 for (unsigned int i = 0; i < this->models.size(); i++) 68 this->setModel(NULL, i); 68 69 } 69 70 … … 94 95 { 95 96 if (fileName != NULL) 96 { 97 { 98 // search for the special character # in the LoadParam 99 if (strchr(fileName, '#') != NULL) 100 { 101 PRINTF(4)("Found # in %s... searching for LOD's\n", fileName); 102 char* lodFile = new char[strlen(fileName)+1]; 103 strcpy(lodFile, fileName); 104 char* depth = strchr(lodFile, '#'); 105 for (unsigned int i = 0; i < 5; i++) 106 { 107 *depth = 48+(int)i; 108 printf("-------%s\n", lodFile); 109 if (ResourceManager::isInDataDir(lodFile)) 110 this->loadModel(lodFile, scaling, i); 111 } 112 return; 113 } 114 97 115 PRINTF(4)("fetching %s\n", fileName); 98 116 if (scaling == 1.0) … … 228 246 */ 229 247 void WorldEntity::draw() const 248 { 249 this->drawLODsafe(); 250 } 251 252 void WorldEntity::drawLODsafe() const 230 253 { 231 254 if (!this->models.empty())
Note: See TracChangeset
for help on using the changeset viewer.