Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6426 in orxonox.OLD for trunk/src/world_entities/weapons


Ignore:
Timestamp:
Jan 7, 2006, 11:17:51 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the spaceshipcontrol branche back to the trunk

merged with command
svn merge https://svn.orxonox.net/orxonox/branches/spaceshipcontrol . -r6224:HEAD
small conflict in space_ship.cc fixed in favor of the control

Location:
trunk/src/world_entities/weapons
Files:
2 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weapons/aiming_turret.cc

    r6074 r6426  
    9090
    9191  this->setCapability(WTYPE_ALLDIRS | WTYPE_TURRET);
    92   this->setProjectileType(CL_GUIDED_MISSILE);
     92  this->setProjectileType(CL_ROCKET);
    9393
    9494
     
    142142            /*target->getAbsCoor() - this->getAbsCoor()*/)*.5);//this->getVelocity());
    143143
    144   pj->setTarget(this->target->getParent());
    145144  pj->setParent(PNode::getNullParent());
    146145  pj->setAbsCoor(this->getEmissionPoint());
  • trunk/src/world_entities/weapons/guided_missile.cc

    r6241 r6426  
    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.