Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 11, 2005, 10:47:01 PM (20 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/guided_missile.cc

    r6054 r6056  
    134134//  GarbageCollector::getInstance()->collect(this);
    135135  State::getWorldEntityList()->remove(this);
     136  this->removeNode();
    136137  GuidedMissile::fastFactory->kill(this);
    137138}
     
    164165  this->shiftCoor(v);
    165166
    166   this->lifeCycle += time/this->lifeSpan;
    167   if( this->lifeCycle >= 1.0)
    168     {
    169       PRINTF(5)("FINALIZE==========================\n");
    170       PRINTF(5)("current life cycle is: %f\n", this->lifeCycle);
    171       PRINTF(5)("FINALIZE===========================\n");
    172 
    173       this->deactivate();
    174     }
     167  if(this->tickLifeCycle(time))
     168    this->deactivate();
    175169}
    176170
Note: See TracChangeset for help on using the changeset viewer.