Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6679 in orxonox.OLD for trunk/src/world_entities/space_ships


Ignore:
Timestamp:
Jan 24, 2006, 10:56:46 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: WeaponManager seems to work, better than before.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/space_ships/space_ship.cc

    r6637 r6679  
    110110  this->addWeapon(wpRight,1 ,1);
    111111  this->addWeapon(cannon, 0, 6);
    112 
    113   //this->addWeapon(turret, 3, 0);
    114112
    115113  this->getWeaponManager()->changeWeaponConfig(1);
     
    291289    if (yMouse > controlVelocityY) yMouse = controlVelocityY;
    292290    else if (yMouse < -controlVelocityY) yMouse = -controlVelocityY;
    293    
     291
    294292    pitchDir = (Quaternion(xMouse*mouseSensitivity*0.5, Vector(1,0,0)));
    295    
     293
    296294    mouseDir *= (Quaternion(-M_PI/4*xMouse*mouseSensitivity, Vector(0,1,0))*Quaternion(-M_PI/4*yMouse*mouseSensitivity*yInvert, Vector(0,0,1))*pitchDir);
    297295    xMouse = yMouse = 0;
     
    306304
    307305  Vector move = velocity*time;
    308  
     306
    309307  //orient the velocity in the direction of the spaceship.
    310308  travelSpeed = velocity.len();
     
    321319  if(travelSpeed >= 120) velocity -= velocity.getNormalized()*travelSpeed*travelSpeed*0.0001;
    322320  else if (travelSpeed <= 80) velocity -= velocity.getNormalized()*travelSpeed*0.001;
    323  
     321
    324322  //other physics (gravity)
    325323  if(travelSpeed < 120)
    326324  move += Vector(0,-1,0)*60*time + Vector(0,1,0)*travelSpeed/2*time;
    327    
     325
    328326  //hoover effect
    329327  //cycle += time;
Note: See TracChangeset for help on using the changeset viewer.