Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3670 in orxonox.OLD for orxonox/trunk/src/world_entities


Ignore:
Timestamp:
Mar 30, 2005, 12:43:15 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: currently working on orxonox weapon system. still got problem with the speed! flushing state

Location:
orxonox/trunk/src/world_entities
Files:
2 edited

Legend:

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

    r3646 r3670  
    3838  this->currentLifeTime = 0.0f;
    3939  this->ttl = 1.0f;
    40   this->speed = 1.1f;
     40  this->speed = 2.0f;
    4141}
    4242
     
    8484
    8585/**
     86   \brief sets the speed of the projectile
     87*/
     88void Projectile::setSpeed(float speed)
     89{
     90  this->speed = speed;
     91  printf("Projectile::setting speed to: %f\n", this->speed);
     92}
     93
     94/**
    8695   \brief signal tick, time dependent things will be handled here
    8796   \param time since last tick
     
    92101  if( this->ttl < this->currentLifeTime)
    93102    {
    94       *this->flightDirection = *this->flightDirection * speed;
     103      *this->flightDirection = *this->flightDirection * this->speed;
    95104      this->shiftCoor(this->flightDirection);
     105      this->flightDirection->debug();
    96106      return;
    97107    }
  • orxonox/trunk/src/world_entities/test_gun.cc

    r3646 r3670  
    8282void TestGun::fire()
    8383{
    84   printf("TestGun::fire() - firing weapon now ---------------------------\n");
     84  //printf("TestGun::fire() - firing weapon now ---------------------------\n");
    8585  Projectile* pj = new Projectile();
    8686  Vector* v = new Vector();
     
    9292
    9393  pj->setFlightDirection(q);
     94  //pj->setSpeed(this->getSpeed() * 0.025);
    9495
    95   printf("TestGun::current speed is: %f", this->getSpeed());
    9696
    9797  this->worldEntities->add(pj);
Note: See TracChangeset for help on using the changeset viewer.