Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 19, 2005, 12:20:58 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: remake of the Projectile and TestBullet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/weapons/test_bullet.cc

    r4836 r4890  
    6464  this->shiftCoor(v);
    6565
    66   this->currentLifeTime += time;
    67   if( this->ttl < this->currentLifeTime)
     66  this->lifeCycle += time/this->lifeSpan;
     67  if( this->lifeCycle >= 1)
    6868    {
    6969      PRINTF(5)("FINALIZE==========================\n");
    70       PRINTF(5)("current life time is: %f/%f\n", this->currentLifeTime, this->ttl);
     70      PRINTF(5)("current life cycle is: %f\n", this->lifeCycle);
    7171      PRINTF(5)("FINALIZE===========================\n");
    7272      this->finalize();
    73       this->currentLifeTime = 0.0f;
    7473    }
    7574}
    76 
    77 /**
    78  *  the projectile gets hit by another entity
    79  * @param the other entity
    80  * @param place where it is hit
    81 */
    82 void TestBullet::hit (WorldEntity* entity, Vector* place)
    83 {}
    84 
    8575
    8676/**
Note: See TracChangeset for help on using the changeset viewer.