Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 8, 2009, 12:58:47 AM (15 years ago)
Author:
dafrick
Message:

Reverted to revision 2906 (because I'm too stupid to merge correctly, 2nd try will follow shortly. ;))

Location:
code/branches/questsystem5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/questsystem5

  • code/branches/questsystem5/src/orxonox/objects/weaponSystem/WeaponSet.cc

    r2907 r2908  
    5656    void WeaponSet::attachWeaponPack(WeaponPack *wPack)
    5757    {
     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;
    5862        if ( this->parentWeaponSystem_->getWeaponSlotSize()>0 && wPack->getSize()>0 && ( wPack->getSize() <= this->parentWeaponSystem_->getWeaponSlotSize() ) )
    5963        {
     64//COUT(0) << "WeaponSet::attachWeaponPack after if" << std::endl;
    6065            this->attachedWeaponPack_ = wPack;
    6166            int wPackWeapon = 0;    //WeaponCounter for Attaching
    62            
    6367            //should be possible to choose which slot to use
    64             //attach every weapon of the weaponPack to a weaponSlot
    6568            for (  int i=0; i < wPack->getSize() ; i++  )
    6669            {
    6770                //at the moment this function only works for one weaponPack in the entire WeaponSystem...
    68                 //it also takes the first free weaponSlot...
    6971                if ( this->parentWeaponSystem_->getWeaponSlotPointer(i)->getAttachedWeapon() == 0 && this->parentWeaponSystem_->getWeaponSlotPointer(i) != 0) //if slot not full
    7072                {
     73//COUT(0) << "WeaponSet::attachWeaponPack attaching Weapon" << std::endl;
    7174                    this->setWeaponSlots_.push_back( this->parentWeaponSystem_->getWeaponSlotPointer(i) );
    7275                    this->parentWeaponSystem_->getWeaponSlotPointer(i)->attachWeapon( wPack->getWeaponPointer(wPackWeapon) );
     
    8083                        if ( this->parentWeaponSystem_->getWeaponSlotPointer(k)->getAttachedWeapon() == 0 )
    8184                        {
     85//COUT(0) << "WeaponSet::attachWeaponPack mode 2 k="<< k << std::endl;
    8286                            this->setWeaponSlots_.push_back( this->parentWeaponSystem_->getWeaponSlotPointer(k) );
    8387                            this->parentWeaponSystem_->getWeaponSlotPointer(k)->attachWeapon( wPack->getWeaponPointer(wPackWeapon) );
     
    9599    {
    96100        //fires all WeaponSlots available for this weaponSet attached from the WeaponPack
     101//COUT(0) << "WeaponSet::fire from Pack: " << this->attachedWeaponPack_ << std::endl;
    97102        if (this->attachedWeaponPack_)
    98103            this->attachedWeaponPack_->fire();
Note: See TracChangeset for help on using the changeset viewer.