Changeset 7217 in orxonox.OLD for branches/std
- Timestamp:
- Mar 12, 2006, 2:16:24 PM (19 years ago)
- Location:
- branches/std/src/world_entities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/std/src/world_entities/creatures/md2_creature.cc
r7193 r7217 255 255 this->shiftCoor (move); 256 256 257 if( this->bJump )257 if( this->bJump && likely(this->getModel(0) != NULL)) 258 258 { 259 259 ((MD2Model*)this->getModel(0))->setAnim(JUMP); 260 260 } 261 else if( this->bFire )261 else if( this->bFire && likely(this->getModel(0) != NULL)) 262 262 { 263 263 if( ((MD2Model*)this->getModel(0))->getAnim() != ATTACK) ((MD2Model*)this->getModel(0))->setAnim(ATTACK); 264 264 } 265 else if( fabs(move.len()) > 0.0f )265 else if( fabs(move.len()) > 0.0f && likely(this->getModel(0) != NULL)) 266 266 { 267 267 if( ((MD2Model*)this->getModel(0))->getAnim() != RUN) ((MD2Model*)this->getModel(0))->setAnim(RUN); 268 268 } 269 else 269 else if (likely(this->getModel(0) != NULL)) 270 270 { 271 271 if( ((MD2Model*)this->getModel(0))->getAnim() != STAND) ((MD2Model*)this->getModel(0))->setAnim(STAND); -
branches/std/src/world_entities/terrain.cc
r7216 r7217 177 177 void Terrain::loadVegetation(const std::string& vegetationFile) 178 178 { 179 PRINTF( 0)("loadVegetation: %s\n", vegetationFile.c_str());179 PRINTF(4)("loadVegetation: %s\n", vegetationFile.c_str()); 180 180 if (this->vegetation) 181 181 ResourceManager::getInstance()->unload(this->vegetation, RP_LEVEL); -
branches/std/src/world_entities/weapons/aiming_turret.cc
r7193 r7217 168 168 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 169 169 170 this->getModel()->draw(); 170 if (this->getModel()) 171 this->getModel()->draw(); 171 172 glPopMatrix(); 172 173 } -
branches/std/src/world_entities/world_entity.cc
r7216 r7217 118 118 * @param fileName the name of the model to load 119 119 * @param scaling the Scaling of the model 120 * 121 * @todo fix this, so it only has one loadModel-Function. 122 */ 120 */ 123 121 void WorldEntity::loadModel(const std::string& fileName, float scaling, unsigned int modelNumber) 124 122 { … … 152 150 if (loadedModel != NULL) 153 151 this->setModel(dynamic_cast<Model*>(loadedModel), modelNumber); 152 else 153 PRINTF(1)("OBJ-File %s not found.\n", fileName.c_str()); 154 154 155 155 if( modelNumber == 0)
Note: See TracChangeset
for help on using the changeset viewer.