Changeset 8592 in orxonox.OLD for branches/bsp_model/src/lib/graphics
- Timestamp:
- Jun 19, 2006, 11:28:27 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc
r8591 r8592 79 79 void MD3Model::autoAssemblePlayerModel(std::string filename, float scaling) 80 80 { 81 // loading the config file 81 82 std::string cfgName(filename + "/animation.cfg"); 82 83 this->config = (MD3AnimationCfg*)ResourceManager::getInstance()->load(cfgName, MD3_CONFIG, RP_GAME); 83 84 84 85 //first load the torso 86 std::string name(filename + "/upper.md3"); 87 this->md3Data = (MD3Data*)ResourceManager::getInstance()->load(name, MD3, RP_GAME, name, scaling); 88 89 85 //first load the torso or the upper part 86 std::string nameUpper(filename + "/upper.md3"); 87 if( (this->md3Data = (MD3Data*)ResourceManager::getInstance()->load(nameUpper, MD3, RP_GAME, nameUpper, scaling)) == NULL) 88 { 89 std::string nameTorso(filename + "/torso.md3"); 90 this->md3Data = (MD3Data*)ResourceManager::getInstance()->load(nameTorso, MD3, RP_GAME, nameTorso, scaling); 91 } 92 93 if( this->md3Data == NULL) 94 { 95 PRINTF(1)("Problems loading the MD3Model. Abording\n"); 96 return; 97 } 90 98 91 99 // load lower 100 std::string nameLower(filename + "/lower.md3"); 101 MD3Data* lower = (MD3Data*)ResourceManager::getInstance()->load(nameLower, MD3, RP_GAME, nameLower, scaling); 102 if( lower != NULL) 103 { 104 PRINTF(0)("Loaded the %s model\n", nameLower.c_str()); 105 // this->md3Data->addLinkedModel(0, lower); 106 } 107 108 109 // load head 110 std::string nameHead(filename + "/head.md3"); 111 MD3Data* head = (MD3Data*)ResourceManager::getInstance()->load(nameHead, MD3, RP_GAME, nameLower, scaling); 112 if( lower != NULL) 113 { 114 PRINTF(0)("Loaded the %s model\n", nameHead.c_str()); 115 // this->md3Data->addLinkedModel(0, head); 116 } 117 118 92 119 93 120
Note: See TracChangeset
for help on using the changeset viewer.