Changeset 6172 in orxonox.OLD for branches/christmas_branche/src/world_entities
- Timestamp:
- Dec 20, 2005, 1:56:59 AM (19 years ago)
- Location:
- branches/christmas_branche/src/world_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/christmas_branche/src/world_entities/creatures/md2_creature.cc
r6171 r6172 113 113 PRINTF(4)("SPACESHIP INIT\n"); 114 114 115 //EventHandler::getInstance()->grabEvents(true);115 EventHandler::getInstance()->grabEvents(true); 116 116 117 117 bUp = bDown = bLeft = bRight = bAscend = bDescend = bRollL = bRollR = false; … … 253 253 254 254 if( likely(this->models[0] != NULL)) 255 ((MD2Model*)this->models[0])->tick(time); 255 ((MD2Model*)this->models[0])->tick(time); 256 257 256 258 257 259 -
branches/christmas_branche/src/world_entities/space_ships/space_ship.cc
r6169 r6172 112 112 PRINTF(4)("SPACESHIP INIT\n"); 113 113 114 EventHandler::getInstance()->grabEvents(true);114 // EventHandler::getInstance()->grabEvents(true); 115 115 116 116 bUp = bDown = bLeft = bRight = bAscend = bDescend = bRollL = bRollR = false; -
branches/christmas_branche/src/world_entities/world_entity.cc
r6169 r6172 105 105 if (fileName != NULL) 106 106 { 107 107 // search for the special character # in the LoadParam 108 108 if (strchr(fileName, '#') != NULL) 109 { 110 PRINTF(4)("Found # in %s... searching for LOD's\n", fileName); 111 char* lodFile = new char[strlen(fileName)+1]; 112 strcpy(lodFile, fileName); 113 char* depth = strchr(lodFile, '#'); 114 for (unsigned int i = 0; i < 5; i++) 109 115 { 110 PRINTF(4)("Found # in %s... searching for LOD's\n", fileName); 111 char* lodFile = new char[strlen(fileName)+1]; 112 strcpy(lodFile, fileName); 113 char* depth = strchr(lodFile, '#'); 114 for (unsigned int i = 0; i < 5; i++) 115 { 116 *depth = 48+(int)i; 117 printf("-------%s\n", lodFile); 118 if (ResourceManager::isInDataDir(lodFile)) 119 this->loadModel(lodFile, scaling, i); 120 } 121 this->supportsLOD = true; 122 return; 116 *depth = 48+(int)i; 117 printf("-------%s\n", lodFile); 118 if (ResourceManager::isInDataDir(lodFile)) 119 this->loadModel(lodFile, scaling, i); 123 120 } 124 125 if( strchr(fileName, '.obj') != NULL) 126 { 127 PRINTF(4)("fetching OBJ file: %s\n", fileName); 128 if (scaling == 1.0) 129 this->setModel((Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN), modelNumber); 130 else 131 this->setModel((Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN, &scaling), modelNumber); 132 133 if( modelNumber == 0) 134 this->buildObbTree(4); 135 } 136 else if( strchr(fileName, '.md2') != NULL) 137 { 138 PRINTF(4)("fetching MD2 file: %s\n", fileName); 121 this->supportsLOD = true; 122 return; 123 } 124 125 if(strstr(fileName, ".obj")) 126 { 127 PRINTF(4)("fetching OBJ file: %s\n", fileName); 128 if (scaling == 1.0) 129 this->setModel((Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN), modelNumber); 130 else 131 this->setModel((Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN, &scaling), modelNumber); 132 133 if( modelNumber == 0) 134 this->buildObbTree(4); 135 } 136 else if(strstr(fileName, ".md2")) 137 { 138 PRINTF(0)("fetching MD2 file: %s\n", fileName); 139 139 // MD2Model* m = (MD2Model*)ResourceManager::getInstance()->load(fileName, MD2, RP_CAMPAIGN); 140 MD2Model* m = new MD2Model(fileName, "/home/boenzlip/orxonox/data/maps/santa_claus.pcx"); 141 m->debug(); 140 MD2Model* m = new MD2Model(fileName, "/home/boenzlip/orxonox/data/maps/santa_claus.pcx"); 141 m->debug(); 142 this->supportsLOD = false; 142 143 //this->setModel((Model*)ResourceManager::getInstance()->load(fileName, MD2, RP_CAMPAIGN), 0); 143 144 144 this->setModel((Model*)m, 0); 145 } 145 146 } 146 147 else
Note: See TracChangeset
for help on using the changeset viewer.