Changeset 10674 in orxonox.OLD for branches/vs-enhencements/src
- Timestamp:
- Jun 6, 2007, 11:10:08 PM (18 years ago)
- Location:
- branches/vs-enhencements/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/vs-enhencements/src/world_entities/space_ships/space_ship.cc
r10672 r10674 165 165 this->secWeaponMan.setSlotCount(6); 166 166 167 //this->weaponMan.createWeaponSlot(0, 3.270, 1.028, .155, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);168 //this->weaponMan.createWeaponSlot(1, 3.270, 1.028, -.155, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);169 //this->weaponMan.createWeaponSlot(2, 4.385, .063, .876, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);170 //this->weaponMan.createWeaponSlot(3, 4.385, -.063, -.876, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);171 //this->weaponMan.createWeaponSlot(4, 1.635, -.612, 2.691, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);172 //this->weaponMan.createWeaponSlot(5, 1.536, -.612, -2.691, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);173 //this->weaponMan.createWeaponSlot(6, 1.536, -.612, 3.254, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);174 //this->weaponMan.createWeaponSlot(7, 1.536, -.612, -3.254, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);167 this->weaponMan.createWeaponSlot(0, 3.270, 1.028, .155, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 168 this->weaponMan.createWeaponSlot(1, 3.270, 1.028, -.155, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 169 this->weaponMan.createWeaponSlot(2, 4.385, .063, .876, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 170 this->weaponMan.createWeaponSlot(3, 4.385, -.063, -.876, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 171 this->weaponMan.createWeaponSlot(4, 1.635, -.612, 2.691, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 172 this->weaponMan.createWeaponSlot(5, 1.536, -.612, -2.691, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 173 this->weaponMan.createWeaponSlot(6, 1.536, -.612, 3.254, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 174 this->weaponMan.createWeaponSlot(7, 1.536, -.612, -3.254, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 175 175 176 176 … … 213 213 this->bInit = false; 214 214 215 //loadEnergyShare(.3,.3,.4);216 //loadShield(80, 100, .2, 2);217 // loadHealth(100, 100,0);218 //loadElectronic(40, 50, .7, 3.0);215 loadEnergyShare(.3,.3,.4); 216 loadShield(80, 100, .2, 2); 217 loadHealth(100, 100); 218 loadElectronic(40, 50, .7, 3.0); 219 219 loadReactor(10); 220 220 loadWeapon(10); … … 444 444 { 445 445 446 if( !this->bInit)447 {448 // now get slots from the mount points449 std::map<int, MountPoint*>::iterator it = this->mountPointMap.begin();450 for( ;it != this->mountPointMap.end(); it++)451 {452 WeaponSlot* ws = dynamic_cast<WeaponSlot*>((*it).second->getMount());453 if( ws != NULL && ws->isA(WeaponSlot::staticClassID()))454 {455 int slot = ws->getWeaponSlot();456 // int side = ws->getWeaponSide(); //FIXME / REMOVE: is not used// HACK needed for some weapons (left/right)457 this->getWeaponManager().setSlotPosition(slot, (*it).second->getCenter());458 this->getWeaponManager().setSlotDirection(slot, ws->getRelDir());459 // PRINTF(0)("setting slot %i\n", slot);460 // (*it).second->getCenter().debug();461 }462 }463 this->bInit = true;464 }446 // if( !this->bInit) 447 // { 448 // // now get slots from the mount points 449 // std::map<int, MountPoint*>::iterator it = this->mountPointMap.begin(); 450 // for( ;it != this->mountPointMap.end(); it++) 451 // { 452 // WeaponSlot* ws = dynamic_cast<WeaponSlot*>((*it).second->getMount()); 453 // if( ws != NULL && ws->isA(WeaponSlot::staticClassID())) 454 // { 455 // int slot = ws->getWeaponSlot(); 456 // // int side = ws->getWeaponSide(); //FIXME / REMOVE: is not used// HACK needed for some weapons (left/right) 457 // this->getWeaponManager().setSlotPosition(slot, (*it).second->getCenter()); 458 // this->getWeaponManager().setSlotDirection(slot, ws->getRelDir()); 459 // // PRINTF(0)("setting slot %i\n", slot); 460 // // (*it).second->getCenter().debug(); 461 // } 462 // } 463 // this->bInit = true; 464 // } 465 465 466 466 // Playable::tick(time); -
branches/vs-enhencements/src/world_entities/world_entity.cc
r10670 r10674 130 130 131 131 // Delete the obbTree 132 if( this->obbTree != NULL)132 if( this->obbTree) 133 133 delete this->obbTree; 134 134 135 if (this->healthWidget != NULL)135 if (this->healthWidget) 136 136 delete this->healthWidget; 137 138 if(this->shieldWidget) 139 delete this->shieldWidget; 140 141 if( this->electronicWidget) 142 delete this->electronicWidget; 137 143 138 144 this->unsubscribeReactions(); … … 809 815 float retShield = this->shieldMax - this->shield; 810 816 this->shield = this->shieldMax; 811 this->updateShieldWidget();817 // this->updateShieldWidget(); 812 818 return retShield; 813 819 } 814 this->updateShieldWidget();820 // this->updateShieldWidget(); 815 821 return 0.0; 816 822 } … … 827 833 { 828 834 float retShield = -this->shield; 829 this->updateShieldWidget();835 // this->updateShieldWidget(); 830 836 this->bShieldActive = false; 831 837 return retShield; 832 838 } 833 this->updateShieldWidget();839 // this->updateShieldWidget(); 834 840 return 0.0; 835 841 } … … 863 869 { 864 870 this->shieldWidget = new OrxGui::GLGuiEnergyWidgetVertical(); 865 this->update HealthWidget();871 this->updateShieldWidget(); 866 872 } 867 873 else
Note: See TracChangeset
for help on using the changeset viewer.