Changeset 10671 in orxonox.OLD for branches/vs-enhencements
- Timestamp:
- Jun 5, 2007, 5:52:48 PM (18 years ago)
- Location:
- branches/vs-enhencements/src/world_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/vs-enhencements/src/world_entities/space_ships/space_ship.cc
r10670 r10671 21 21 22 22 #include "util/loading/resource_manager.h" 23 24 #include "world_entities/weapons/weapon_manager.h" 23 25 24 26 #include "weapons/test_gun.h" … … 64 66 #include "tools/cameraman.h" 65 67 68 #include "tools/mount_point.h" 69 #include "weapons/weapon_slot.h" 66 70 67 71 #include "util/loading/load_param.h" … … 161 165 this->secWeaponMan.setSlotCount(6); 162 166 163 this->weaponMan.createWeaponSlot(0, 3.270, 1.028, .155, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);164 this->weaponMan.createWeaponSlot(1, 3.270, 1.028, -.155, 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); 165 169 this->weaponMan.createWeaponSlot(2, 4.385, .063, .876, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 166 170 this->weaponMan.createWeaponSlot(3, 4.385, -.063, -.876, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); … … 171 175 172 176 173 this->weaponMan.addWeaponToSlot(0, 0, "RFCannon");174 this->weaponMan.addWeaponToSlot(0, 1, "RFCannon");175 this->weaponMan.addWeaponToSlot(0, 2, "RFCannon");176 this->weaponMan.addWeaponToSlot(0, 3, "RFCannon");177 this->weaponMan.addWeaponToSlot(1, 0, "RFCannon");178 this->weaponMan.addWeaponToSlot(1, 1, "RFCannon");179 this->weaponMan.addWeaponToSlot(1, 2, "RFCannon");180 this->weaponMan.addWeaponToSlot(1, 3, "RFCannon");177 // this->weaponMan.addWeaponToSlot(0, 0, "RFCannon"); 178 // this->weaponMan.addWeaponToSlot(0, 1, "RFCannon"); 179 // this->weaponMan.addWeaponToSlot(0, 2, "RFCannon"); 180 // this->weaponMan.addWeaponToSlot(0, 3, "RFCannon"); 181 // this->weaponMan.addWeaponToSlot(1, 0, "RFCannon"); 182 // this->weaponMan.addWeaponToSlot(1, 1, "RFCannon"); 183 // this->weaponMan.addWeaponToSlot(1, 2, "RFCannon"); 184 // this->weaponMan.addWeaponToSlot(1, 3, "RFCannon"); 181 185 182 186 this->weaponMan.addWeaponToSlot(0, 4, "NadionLaser"); … … 211 215 setEngine(15); 212 216 217 this->bInit = false; 213 218 214 219 // loadEnergyShare(.3,.3,.4); … … 290 295 291 296 292 //this->toList(OM_GROUP_00);293 294 if ( this->hasPlayer() ){295 State::getPlayer()->hud().setShieldWidget(this->getShieldWidget());296 State::getPlayer()->hud().setEnergyWidget(this->getElectronicWidget());297 }297 this->toList(OM_GROUP_00); 298 299 // if ( this->hasPlayer() ){ 300 // State::getPlayer()->hud().setShieldWidget(this->getShieldWidget()); 301 // State::getPlayer()->hud().setEnergyWidget(this->getElectronicWidget()); 302 // } 298 303 } 299 304 … … 439 444 void SpaceShip::tick (float time) 440 445 { 446 /* 447 if( !this->bInit) 448 { 449 // now get slots from the mount points 450 std::map<int, MountPoint*>::iterator it = this->mountPointMap.begin(); 451 for( ;it != this->mountPointMap.end(); it++) 452 { 453 WeaponSlot* ws = dynamic_cast<WeaponSlot*>((*it).second->getMount()); 454 if( ws != NULL && ws->isA(WeaponSlot::staticClassID())) 455 { 456 int slot = ws->getWeaponSlot(); 457 int side = ws->getWeaponSide(); //FIXME / REMOVE: is not used// HACK needed for some weapons (left/right) 458 this->getWeaponManager().setSlotPosition(slot, (*it).second->getCenter()); 459 this->getWeaponManager().setSlotDirection(slot, ws->getRelDir()); 460 // PRINTF(0)("setting slot %i\n", slot); 461 // (*it).second->getCenter().debug(); 462 } 463 } 464 this->bInit = true; 465 }*/ 466 441 467 // Playable::tick(time); 442 468 … … 667 693 static float tmp = this->decreaseShield(pDamage); 668 694 if( tmp > 0) 669 if ( this->decreaseHealth(tmp / 2) )695 if ( this->decreaseHealth(tmp / 2) > 0) 670 696 this->destroy(this); 671 697 -
branches/vs-enhencements/src/world_entities/space_ships/space_ship.h
r10670 r10671 156 156 int curWeaponSecondary; //!< current secondary weapon config 157 157 158 bool bForward; 159 bool bBackward; 158 bool bForward; //!< up button pressed. 159 bool bBackward; //!< down button pressed. 160 160 bool bLeft; //!< left button pressed. 161 161 bool bRight; //!< right button pressed. … … 165 165 bool bRollR; //!< rolling button pressed (right) 166 166 bool bSecFire; //!< second fire button pressed 167 168 bool bInit; //!< set true, if MP have been loaded 167 169 168 170 /* -
branches/vs-enhencements/src/world_entities/world_entity.h
r10670 r10671 190 190 void loadElectronic(float cur, float max, float th, float regen) 191 191 { this->setElectronic(cur); this->setElectronicMax(max); this->setElectronicTH(th); this->setElectronicRegen(regen); }; 192 /*193 OrxGui::GLGuiEnergyWidgetVertical* getHealthWidget() { return this->healthWidget; };194 OrxGui::GLGuiEnergyWidgetVertical* getShieldWidget() { return this->shieldWidget; };195 OrxGui::GLGuiEnergyWidgetVertical* getEnergyWidget() { return this->electronicWidget; };*/196 192 197 193 198 194 virtual void varChangeHandler( std::list<int> & id ); 199 200 201 195 202 196
Note: See TracChangeset
for help on using the changeset viewer.