Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 24, 2005, 3:52:50 PM (19 years ago)
Author:
snellen
Message:

guided_missile updated

File:
1 edited

Legend:

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

    r5760 r5761  
    157157{
    158158  //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1);
     159  float speed = velocity.len();
    159160  velocity += ((target.getAbsCoor() - this->getAbsCoor()).getNormalized())*agility;
     161  velocity *= speed/velocity.len();
    160162  Vector v = this->velocity * (time);
    161163  this->shiftCoor(v);
Note: See TracChangeset for help on using the changeset viewer.