Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 20, 2007, 11:39:18 AM (17 years ago)
Author:
nicolasc
Message:

data bump

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/space_ships/space_ship.cc

    r10721 r10728  
    453453{
    454454
    455 //   if( !this->bInit)
    456 //   {
    457 //     // now get slots from the mount points
    458 //     std::map<int, MountPoint*>::iterator it = this->mountPointMap.begin();
    459 //     for( ;it != this->mountPointMap.end(); it++)
    460 //     {
    461 //       WeaponSlot* ws = dynamic_cast<WeaponSlot*>((*it).second->getMount());
    462 //       if( ws != NULL && ws->isA(WeaponSlot::staticClassID()))
    463 //       {
    464 //         int slot = ws->getWeaponSlot();
    465 // //         int side = ws->getWeaponSide(); //FIXME / REMOVE: is not used// HACK needed for some weapons (left/right)
    466 //         this->getWeaponManager().setSlotPosition(slot, (*it).second->getCenter());
    467 //         this->getWeaponManager().setSlotDirection(slot, ws->getRelDir());
    468 // //         PRINTF(0)("setting slot %i\n", slot);
    469 // //         (*it).second->getCenter().debug();
    470 //       }
    471 //     }
    472 //   this->bInit = true;
    473 //   }
     455  if( !this->bInit)
     456  {
     457    // now get slots from the mount points
     458    std::map<int, MountPoint*>::iterator it = this->mountPointMap.begin();
     459    for( ;it != this->mountPointMap.end(); it++)
     460    {
     461      WeaponSlot* ws = dynamic_cast<WeaponSlot*>((*it).second->getMount());
     462      if( ws != NULL && ws->isA(WeaponSlot::staticClassID()))
     463      {
     464        int slot = ws->getWeaponSlot();
     465//         int side = ws->getWeaponSide(); //FIXME / REMOVE: is not used// HACK needed for some weapons (left/right)
     466        this->getWeaponManager().setSlotPosition(slot, (*it).second->getCenter());
     467        this->getWeaponManager().setSlotDirection(slot, ws->getRelDir());
     468//         PRINTF(0)("setting slot %i\n", slot);
     469//         (*it).second->getCenter().debug();
     470      }
     471    }
     472  this->bInit = true;
     473  }
    474474
    475475  // Playable::tick(time);
Note: See TracChangeset for help on using the changeset viewer.