- Timestamp:
- Jun 21, 2007, 2:29:46 AM (17 years ago)
- Location:
- branches/presentation/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/lib/graphics/importer/static_model.cc
r10758 r10760 103 103 // go through all groups and check if they are mounts 104 104 std::vector<StaticModelData::Group>::iterator groupIt = this->data->getGroups().begin(); 105 for( ; groupIt != this->data->getGroups().end(); groupIt++)105 for( ; groupIt != this->data->getGroups().end();) 106 106 { 107 107 //PRINTF(0)("Found a MountPoint: %s\n", groupName.c_str()); … … 113 113 // check if the name has a "MP" prefix or else it won't work 114 114 if( groupName.find("MP.", 0) == std::string::npos){ 115 groupIt++; 115 116 continue; 116 117 } … … 125 126 PRINTF(4)("the face count of %s is wrong, perhaps you missnamed this object or used the wrong mount point object (got %i faces)\n", 126 127 groupName.c_str(), (*groupIt)._faces.size()); 128 groupIt++; 127 129 continue; 128 130 } … … 211 213 // printf("adding MP\n"); 212 214 this->addMountPoint( zAxis, yAxis, center, groupName); 213 215 // remove the group from the model list (mount points do not need to be drawn) 216 // std::vector<StaticModelData::Group>::iterator tmpIt = groupIt; 217 groupIt++; 218 // this->data->getGroups().erase(tmpIt); 214 219 } 215 220 } -
branches/presentation/src/world_entities/projectiles/hbolt.cc
r10758 r10760 182 182 // float matrix[4][4]; 183 183 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 184 glPushAttrib(GL_ENABLE_BIT); 185 glEnable( GL_ALPHA_TEST); 186 glAlphaFunc( GL_GEQUAL, .5); 184 187 this->halo->draw(); 188 glPopAttrib(); 185 189 186 190 Vector tmpRot = this->getAbsDir().getSpacialAxis(); -
branches/presentation/src/world_entities/space_ships/space_ship.cc
r10758 r10760 305 305 306 306 307 dynamic_cast<WorldEntity*>(this)->createHealthWidget();308 dynamic_cast<WorldEntity*>(this)->createShieldWidget();309 dynamic_cast<WorldEntity*>(this)->createElectronicWidget();307 this->createHealthWidget(); 308 this->createShieldWidget(); 309 this->createElectronicWidget(); 310 310 311 311 if ( this->hasPlayer() ){ … … 428 428 void SpaceShip::tick (float time) 429 429 { 430 431 printf("Ship Status: %f, %f\n", this->getHealth(), this->getShield()); 432 430 433 431 if(caminit) 434 432 { … … 1084 1082 void SpaceShip::hit( float damage, WorldEntity * killer ) 1085 1083 { 1086 printf("SS HIT: %f, %f \n", this->getHealth(), this->getShield());1084 PRINTF(4)("SS HIT: %f, %f \n", this->getHealth(), this->getShield()); 1087 1085 Playable::hit( damage, killer ); 1088 PRINTF(4)("SS HIT: %f \n", this->getHealth());1086 PRINTF(4)("SS HIT: %f, %f \n", this->getHealth(), this->getShield()); 1089 1087 } 1090 1088 -
branches/presentation/src/world_entities/world_entity.cc
r10758 r10760 272 272 { 273 273 PRINTF(4)("fetching OBJ file: %s\n", fileName.c_str()); 274 // creating the model and loading it 274 // creating the model and loading it OrxGui::GLGuiEnergyWidgetVertical* implantWidget; 275 275 StaticModel* model = new StaticModel(); 276 276 *model = ResourceOBJ(fileName, this->scaling); … … 831 831 float retShield = this->shieldMax - this->shield; 832 832 this->shield = this->shieldMax; 833 //this->updateShieldWidget();833 this->updateShieldWidget(); 834 834 return retShield; 835 835 } 836 //this->updateShieldWidget();836 this->updateShieldWidget(); 837 837 return 0.0; 838 838 } … … 849 849 { 850 850 float retShield = -this->shield; 851 //this->updateShieldWidget();851 this->updateShieldWidget(); 852 852 this->bShieldActive = false; 853 853 return retShield; 854 854 } 855 //this->updateShieldWidget();855 this->updateShieldWidget(); 856 856 return 0.0; 857 857 } … … 944 944 OrxGui::GLGuiWidget* WorldEntity::getImplantWidget() 945 945 { 946 this->createImplantWidget(); 946 if(this->implantWidget == NULL) 947 this->createImplantWidget(); 947 948 return this->implantWidget; 948 949 } … … 1083 1084 this->shieldWidget = new OrxGui::GLGuiEnergyWidgetVertical(); 1084 1085 this->shieldWidget->getBarWidget()->setChangedValueColor(Color(1,0,0,1)); 1085 //this->shieldWidget->setDisplayedName("Shield:");1086 //his->shieldWidget->setSize2D(100,20);1087 //this->shieldWidget->setAbsCoor2D(200,200);1086 // this->shieldWidget->setDisplayedName("Shield:"); 1087 // his->shieldWidget->setSize2D(100,20); 1088 // this->shieldWidget->setAbsCoor2D(200,200); 1088 1089 this->updateShieldWidget(); 1089 1090 // if (dynamic_cast<SpaceShip*>(this)->hasPlayer()) -
branches/presentation/src/world_entities/world_entity.h
r10737 r10760 272 272 float healthRegen; //!< Regeneration Rate of Health, mesured in units per second 273 273 OrxGui::GLGuiEnergyWidgetVertical* healthWidget; //!< The Slider (if wanted). 274 274 275 OrxGui::GLGuiEnergyWidgetVertical* implantWidget; 275 276
Note: See TracChangeset
for help on using the changeset viewer.