Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 21, 2005, 3:14:00 PM (19 years ago)
Author:
snellen
Message:

playable.cc and space_ship.cc updated

File:
1 edited

Legend:

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

    r6222 r6234  
    146146{
    147147
    148   if (this->target != NULL && this->target->getParent() != PNode::getNullParent())
     148 
     149if (this->target != NULL && this->target->getParent() != PNode::getNullParent())
    149150   {
    150151    speed = velocity.len();
     
    152153
    153154    if(velocity.dot(diffVector) != 0)
    154     {
     155     {
    155156     correctionVector = (( ( diffVector *  (speed * speed/( velocity.dot(diffVector ) ) )) - velocity).getNormalized()) * agility;
    156157
     
    159160      else if (velocity.dot(diffVector) < 0)
    160161        velocity -= correctionVector;
    161     }
     162     }
    162163    else
    163164      velocity += diffVector * agility;
Note: See TracChangeset for help on using the changeset viewer.