Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 3, 2008, 4:30:13 PM (15 years ago)
Author:
polakma
Message:

fixed parentWeaponSystem-Pointer bugs

File:
1 edited

Legend:

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

    r2319 r2327  
    4646namespace orxonox
    4747{
     48    CreateFactory(WeaponSystem);
    4849
    4950    WeaponSystem::WeaponSystem(BaseObject* creator) : BaseObject(creator)
     
    6162    void WeaponSystem::attachWeaponPack(WeaponPack *wPack, unsigned int firemode)
    6263    {
     64        wPack->setParentWeaponSystem(this);
    6365        this->weaponSets_[firemode]->attachWeaponPack(wPack);
    6466        this->weaponPacks_[firemode] = wPack;
    65         wPack->setParentWeaponSystem(this);
    6667    }
    6768
    6869    void WeaponSystem::attachWeaponSlot(WeaponSlot *wSlot)
    6970    {
     71        wSlot->setParentWeaponSystem(this);
    7072        this->weaponSlots_.push_back(wSlot);
    71         wSlot->setParentWeaponSystem(this);
    7273    }
    7374
    7475    void WeaponSystem::attachWeaponSet(WeaponSet *wSet)
    7576    {
     77        wSet->setParentWeaponSystem(this);
    7678        this->weaponSets_.push_back(wSet);
    77         wSet->setParentWeaponSystem(this);
    7879    }
    7980
Note: See TracChangeset for help on using the changeset viewer.