Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 28, 2009, 10:48:47 PM (15 years ago)
Author:
landauf
Message:

Realized Timer doesn't have to be a template, hence merged TimerBase, Timer and StaticTimer.
Removed the object pointer from Timer for memberfunctions, use createFunctor(f, object) instead.

Location:
code/branches/core5/src/orxonox/weaponsystem
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/weaponsystem/Munition.cc

    r5738 r5831  
    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/core5/src/orxonox/weaponsystem/Munition.h

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

    r5801 r5831  
    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    }
  • code/branches/core5/src/orxonox/weaponsystem/Weapon.h

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

    r5738 r5831  
    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/core5/src/orxonox/weaponsystem/WeaponMode.h

    r5814 r5831  
    150150            std::string munitionname_;
    151151
    152             Timer<WeaponMode> reloadTimer_;
     152            Timer reloadTimer_;
    153153            bool bReloading_;
    154154    };
Note: See TracChangeset for help on using the changeset viewer.