Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10673 in orxonox.OLD for branches/vs-enhencements


Ignore:
Timestamp:
Jun 6, 2007, 2:38:25 PM (17 years ago)
Author:
nicolasc
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/vs-enhencements/src/world_entities/projectiles/swarm_projectile.cc

    r10670 r10673  
    200200    this->deactivate();
    201201
    202 
    203 
    204202/** old  guiding function*/
    205 
    206203  static float projectileVelocity = this->getVelocity().len();
    207204  if (target != NULL){
    208     static Vector estTargetDir = (this->target->getAbsCoor() - this->getAbsCoor()).getNormalized();
     205    Vector estTargetDir = (this->target->getAbsCoor() - this->getAbsCoor()).getNormalized();
    209206    this->velocity = this->newDirection(this->velocity, estTargetDir, this->turningSpeed * time );
    210207  }
     
    225222
    226223  this->angle += this->rotationSpeed * time;
    227 
    228   while (this->angle > 360)
    229   {
    230     this->angle -= 360;
    231   }
     224  while (this->angle > 360) { this->angle -= 360; }
    232225
    233226  this->lastDir = this->curDir;
     
    240233    PRINTF(0)("Target was hit by Swarm Missile!\n");
    241234  }
    242   else if( this->target == NULL)
     235  if( this->target == NULL)
    243236    this->deactivate();
    244237}
Note: See TracChangeset for help on using the changeset viewer.