Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 21, 2005, 5:31:17 PM (18 years ago)
Author:
snellen
Message:

guiding_misslie.cc updated, targeting_turret added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/spaceshipcontrol/src/world_entities/weapons/guided_missile.cc

    r6234 r6255  
    4444  this->energyMax = 10;
    4545  this->lifeSpan = 10.0;
    46   this->agility = 4;
     46  this->agility = 500;
    4747  this->maxVelocity = 75;
    4848
     
    156156     correctionVector = (( ( diffVector *  (speed * speed/( velocity.dot(diffVector ) ) )) - velocity).getNormalized()) * agility;
    157157
    158       if(velocity.dot(diffVector) > 0)
     158      if( (diffVector *  (speed * speed/( velocity.dot(diffVector ) ) ) -velocity).len() < agility )
     159       velocity = ((diffVector *  (speed * speed/( velocity.dot(diffVector ) ) )).getNormalized())*agility;
     160      else if(velocity.dot(diffVector) > 0)
    159161        velocity += correctionVector;
    160162      else if (velocity.dot(diffVector) < 0)
Note: See TracChangeset for help on using the changeset viewer.