Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 11, 2005, 10:47:01 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: more small optimisations, and a convenience inline-tick-life-cycle functions for projectiles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weapons/projectile.h

    r6054 r6056  
    4040    virtual void destroy ();
    4141
    42     virtual void tick (float time);
     42    virtual void tick (float dt);
     43    /** @brief convenience function
     44     * @param dt the Time passed
     45     * @returns true if the Projectile is past its lifeTime, false if it shall still live */
     46    inline bool tickLifeCycle(float dt ) { this->lifeCycle += dt/this->lifeSpan;  return(unlikely(this->lifeCycle >= 1)); }
     47
    4348
    4449  protected:
Note: See TracChangeset for help on using the changeset viewer.