Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 13, 2009, 5:05:17 PM (15 years ago)
Author:
dafrick
Message:

Hopefully merged trunk successfully into pickup branch.

Location:
code/branches/pickup
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickup

  • code/branches/pickup/src/orxonox/weaponsystem/Munition.cc

    r5781 r5935  
    461461        if (bUseReloadTime && (munition->reloadTime_ > 0 || munition->bStackMunition_))
    462462        {
    463             ExecutorMember<Magazine>* executor = createExecutor(createFunctor(&Magazine::loaded));
     463            Executor* executor = createExecutor(createFunctor(&Magazine::loaded, this));
    464464            executor->setDefaultValues(munition);
    465465
    466             this->loadTimer_.setTimer(munition->reloadTime_, false, this, executor);
     466            this->loadTimer_.setTimer(munition->reloadTime_, false, executor);
    467467        }
    468468        else
  • code/branches/pickup/src/orxonox/weaponsystem/Munition.h

    r5781 r5935  
    4747
    4848                unsigned int munition_;
    49                 Timer<Magazine> loadTimer_;
     49                Timer loadTimer_;
    5050                bool bLoaded_;
    5151
  • code/branches/pickup/src/orxonox/weaponsystem/Weapon.cc

    r5781 r5935  
    5050        this->reloadingWeaponmode_ = WeaponSystem::WEAPON_MODE_UNASSIGNED;
    5151
    52         this->reloadTimer_.setTimer(0.0f, false, this, createExecutor(createFunctor(&Weapon::reloaded)));
     52        this->reloadTimer_.setTimer(0.0f, false, createExecutor(createFunctor(&Weapon::reloaded, this)));
    5353        this->reloadTimer_.stopTimer();
    5454    }
     
    6262
    6363            for (std::multimap<unsigned int, WeaponMode*>::iterator it = this->weaponmodes_.begin(); it != this->weaponmodes_.end(); ++it)
    64                 delete it->second;
     64                it->second->destroy();
    6565        }
    6666    }
  • code/branches/pickup/src/orxonox/weaponsystem/Weapon.h

    r5781 r5935  
    7171            std::multimap<unsigned int, WeaponMode*> weaponmodes_;
    7272
    73             Timer<Weapon> reloadTimer_;
     73            Timer reloadTimer_;
    7474            bool bReloading_;
    7575            unsigned int reloadingWeaponmode_;
  • code/branches/pickup/src/orxonox/weaponsystem/WeaponMode.cc

    r5781 r5935  
    5757        this->bParallelReload_ = true;
    5858
    59         this->reloadTimer_.setTimer(0.0f, false, this, createExecutor(createFunctor(&WeaponMode::reloaded)));
     59        this->reloadTimer_.setTimer(0.0f, false, createExecutor(createFunctor(&WeaponMode::reloaded, this)));
    6060        this->reloadTimer_.stopTimer();
    6161
  • code/branches/pickup/src/orxonox/weaponsystem/WeaponMode.h

    r5781 r5935  
    3636#include "util/Math.h"
    3737#include "core/BaseObject.h"
    38 #include "core/Identifier.h"
     38#include "core/SubclassIdentifier.h"
    3939#include "tools/Timer.h"
    4040
     
    150150            std::string munitionname_;
    151151
    152             Timer<WeaponMode> reloadTimer_;
     152            Timer reloadTimer_;
    153153            bool bReloading_;
    154154    };
  • code/branches/pickup/src/orxonox/weaponsystem/WeaponPack.cc

    r5781 r5935  
    5454
    5555            while (!this->weapons_.empty())
    56                 delete (*this->weapons_.begin());
     56                (*this->weapons_.begin())->destroy();
    5757
    5858            for (std::set<DefaultWeaponmodeLink*>::iterator it = this->links_.begin(); it != this->links_.end(); )
    59                 delete (*(it++));
     59                (*(it++))->destroy();
    6060        }
    6161    }
  • code/branches/pickup/src/orxonox/weaponsystem/WeaponSlot.cc

    r5781 r5935  
    4646        this->weapon_ = 0;
    4747
    48         this->setObjectMode(0x0);
     48        this->setSyncMode(0x0);
    4949    }
    5050
  • code/branches/pickup/src/orxonox/weaponsystem/WeaponSystem.cc

    r5781 r5935  
    6262
    6363            while (!this->weaponSets_.empty())
    64                 delete (this->weaponSets_.begin()->second);
     64                this->weaponSets_.begin()->second->destroy();
    6565
    6666            while (!this->weaponPacks_.empty())
    67                 delete (*this->weaponPacks_.begin());
     67                (*this->weaponPacks_.begin())->destroy();
    6868
    6969            while (!this->weaponSlots_.empty())
    70                 delete (*this->weaponSlots_.begin());
     70                (*this->weaponSlots_.begin())->destroy();
    7171
    7272            while (!this->munitions_.empty())
    73                 { delete (this->munitions_.begin()->second); this->munitions_.erase(this->munitions_.begin()); }
     73                { this->munitions_.begin()->second->destroy(); this->munitions_.erase(this->munitions_.begin()); }
    7474        }
    7575    }
Note: See TracChangeset for help on using the changeset viewer.