Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 30, 2005, 11:04:39 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: fixed a gc issue and implemented firing-frequency. still got some speed problems…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/projectile.cc

    r3683 r3685  
    3737  this->flightDirection = NULL;
    3838  this->currentLifeTime = 0.0f;
    39   this->ttl = 1.0f;
     39  this->ttl = 0.75f; /* sec */
    4040  this->speed = 2.0f;
    4141}
     
    8989void Projectile::setSpeed(float speed)
    9090{
    91   this->speed = speed * 5;
    92   printf("Projectile::setting speed to: %f\n", this->speed);
     91  this->speed = speed * 3;
     92  PRINTF(4)("Projectile::setting speed to: %f\n", this->speed);
    9393}
    9494
     
    9999void Projectile::tick (float time)
    100100{
    101   this->speed = this->weapon->getSpeed() * 5
     101  this->speed = this->weapon->getSpeed() * 3
    102102  this->shiftCoor(*this->flightDirection * this->speed * time);
    103   printf("current speed is: %f\n", this->speed);
     103  //printf("current speed is: %f\n", this->speed);
    104104
    105105  this->currentLifeTime += time;
    106   if( this->ttl > this->currentLifeTime)
    107     this->finalize();
     106  if( this->ttl < this->currentLifeTime)
     107    {
     108      PRINTF(5)("FINALIZE=============================================================\n");
     109      PRINTF(5)("current life time is: %f/%f\n", this->currentLifeTime, this->ttl);
     110      PRINTF(5)("FINALIZE=============================================================\n");
     111      this->finalize();
     112    }
    108113}
    109114
Note: See TracChangeset for help on using the changeset viewer.