- Timestamp:
- Mar 12, 2009, 5:05:18 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/weaponsystem/src/orxonox/objects/weaponSystem/WeaponSet.cc
r2662 r2778 56 56 void WeaponSet::attachWeaponPack(WeaponPack *wPack) 57 57 { 58 //COUT(0) << "WeaponSet::attachWeaponPack" << std::endl;59 //COUT(0) << "........ parentWeaponSystem_=" << this->parentWeaponSystem_ << std::endl;60 //COUT(0) << "........ this->parentWeaponSystem_->getWeaponSlotSize()" << this->parentWeaponSystem_->getWeaponSlotSize() << std::endl;61 //COUT(0) << "........ wPack->getSize()" << wPack->getSize() << std::endl;62 58 if ( this->parentWeaponSystem_->getWeaponSlotSize()>0 && wPack->getSize()>0 && ( wPack->getSize() <= this->parentWeaponSystem_->getWeaponSlotSize() ) ) 63 59 { 64 //COUT(0) << "WeaponSet::attachWeaponPack after if" << std::endl;65 60 this->attachedWeaponPack_ = wPack; 66 61 int wPackWeapon = 0; //WeaponCounter for Attaching 67 62 //should be possible to choose which slot to use 63 64 //attach every weapon of the weaponPack to a weaponSlot 68 65 for ( int i=0; i < wPack->getSize() ; i++ ) 69 66 { 70 67 //at the moment this function only works for one weaponPack in the entire WeaponSystem... 68 //it also takes the first free weaponSlot... 71 69 if ( this->parentWeaponSystem_->getWeaponSlotPointer(i)->getAttachedWeapon() == 0 && this->parentWeaponSystem_->getWeaponSlotPointer(i) != 0) //if slot not full 72 70 { 73 //COUT(0) << "WeaponSet::attachWeaponPack attaching Weapon" << std::endl;74 71 this->setWeaponSlots_.push_back( this->parentWeaponSystem_->getWeaponSlotPointer(i) ); 75 72 this->parentWeaponSystem_->getWeaponSlotPointer(i)->attachWeapon( wPack->getWeaponPointer(wPackWeapon) );
Note: See TracChangeset
for help on using the changeset viewer.