Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10674 in orxonox.OLD for branches/vs-enhencements/src


Ignore:
Timestamp:
Jun 6, 2007, 11:10:08 PM (18 years ago)
Author:
nicolasc
Message:

this and that
might be buggy

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  
    165165  this->secWeaponMan.setSlotCount(6);
    166166
    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);
    175175
    176176
     
    213213  this->bInit = false;
    214214
    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);
    219219  loadReactor(10);
    220220  loadWeapon(10);
     
    444444{
    445445
    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   }
     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//   }
    465465
    466466  // Playable::tick(time);
  • branches/vs-enhencements/src/world_entities/world_entity.cc

    r10670 r10674  
    130130
    131131  // Delete the obbTree
    132   if( this->obbTree != NULL)
     132  if( this->obbTree)
    133133    delete this->obbTree;
    134134
    135   if (this->healthWidget != NULL)
     135  if (this->healthWidget)
    136136    delete this->healthWidget;
     137
     138  if(this->shieldWidget)
     139    delete this->shieldWidget;
     140
     141  if( this->electronicWidget)
     142    delete this->electronicWidget;
    137143
    138144  this->unsubscribeReactions();
     
    809815    float retShield = this->shieldMax - this->shield;
    810816    this->shield = this->shieldMax;
    811     this->updateShieldWidget();
     817//     this->updateShieldWidget();
    812818    return retShield;
    813819  }
    814   this->updateShieldWidget();
     820//   this->updateShieldWidget();
    815821  return 0.0;
    816822}
     
    827833  {
    828834    float retShield = -this->shield;
    829     this->updateShieldWidget();
     835//     this->updateShieldWidget();
    830836    this->bShieldActive = false;
    831837    return retShield;
    832838  }
    833   this->updateShieldWidget();
     839//   this->updateShieldWidget();
    834840  return 0.0;
    835841}
     
    863869  {
    864870    this->shieldWidget = new OrxGui::GLGuiEnergyWidgetVertical();
    865     this->updateHealthWidget();
     871    this->updateShieldWidget();
    866872  }
    867873  else
Note: See TracChangeset for help on using the changeset viewer.