Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3685 in orxonox.OLD for orxonox/trunk/src/world_entities/test_gun.cc


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/test_gun.cc

    r3683 r3685  
    4242  :  Weapon (parent, coordinate, direction)
    4343{
     44  this->idleTime = 0.2f;
    4445}
    4546
     
    8384void TestGun::fire()
    8485{
    85   //printf("TestGun::fire() - firing weapon now ---------------------------\n");
     86  if( this->localTime < this->idleTime)
     87    return;
     88
    8689  Projectile* pj = new Projectile(this);
    8790
     
    9699  pj->setSpeed(this->getSpeed());
    97100
    98 
    99 
    100101  this->worldEntities->add(pj);
     102  this->localTime = 0;
    101103}
    102104
     
    128130*/
    129131void TestGun::tick (float time)
    130 {}
     132{
     133  this->localTime += time;
     134}
    131135
    132136
Note: See TracChangeset for help on using the changeset viewer.