Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 9, 2008, 5:44:34 PM (15 years ago)
Author:
polakma
Message:

fixed some pointer bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponPack.cc

    r2354 r2366  
    9292    void WeaponPack::addWeapon(Weapon * weapon)
    9393    {
    94         weapon->setParentWeaponSystem(this->parentWeaponSystem_);
    95 COUT(0) << "WeaponPack::addWeapon " << weapon << "   munition " << weapon->getMunitionType() << std::endl;
     94COUT(0) << "WeaponPack::addWeapon:" << weapon << "   munition " << weapon->getMunitionType() << std::endl;
    9695        this->weapons_.push_back(weapon);
    9796    }
     
    102101    }
    103102
    104     void WeaponPack::setWeaponSystemToAllWeapons(WeaponSystem * weaponSystem)
     103    void WeaponPack::setParentWeaponSystemToAllWeapons(WeaponSystem * weaponSystem)
    105104    {
    106105        for (int i=0; i < (int) this->weapons_.size(); i++)
     
    110109
    111110    }
     111
     112    void WeaponPack::attachNeededMunitionToAllWeapons()
     113    {
     114        for (int i=0; i < (int) this->weapons_.size(); i++)
     115        {
     116            this->weapons_[i]->attachNeededMunition(weapons_[i]->getMunitionType());
     117        }
     118
     119    }
     120
    112121}
Note: See TracChangeset for help on using the changeset viewer.