Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 21, 2005, 1:49:06 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the christmas branche to the trunk
merged with command:
svn merge -r6165:HEAD christmas_branche/ ../trunk/
no conflicts

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore set to
      Makefile.in
      Makefile
      configure
      *.kdevelop
      Doxyfile
      config.log
      config.h
      config.status
      stamp-h1
      autom4te.cache
      aclocal.m4
  • trunk/src

    • Property svn:ignore set to
      .deps
      orxonox
      Makefile
      Makefile.in

  • trunk/src/world_entities/space_ships/space_ship.cc

    r6162 r6222  
    112112  PRINTF(4)("SPACESHIP INIT\n");
    113113
    114   EventHandler::getInstance()->grabEvents(true);
     114//   EventHandler::getInstance()->grabEvents(true);
    115115
    116116  bUp = bDown = bLeft = bRight = bAscend = bDescend = bRollL = bRollR = false;
     
    177177  this->getWeaponManager()->getFixedTarget()->setRelCoor(100000,0,0);
    178178
     179  dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( false);
    179180}
    180181
     
    188189}
    189190
     191
     192void SpaceShip::enter()
     193{
     194  dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true);
     195
     196
     197}
     198
     199void SpaceShip::leave()
     200{
     201  dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( false);
     202
     203
     204}
    190205
    191206/**
     
    267282  velocity += ((this->getAbsDirX())*travelSpeed-velocity)*airViscosity;
    268283  velocity = (velocity.getNormalized())*travelSpeed;
    269  
     284
    270285  //orient the spaceship in direction of the mouse
    271286   rotQuat = Quaternion::quatSlerp( this->getAbsDir(),mouseDir,fabsf(time)*3);
    272    if (this->getAbsDir().distance(rotQuat) > 0.001) 
     287   if (this->getAbsDir().distance(rotQuat) > 0.001)
    273288    this->setAbsDir( rotQuat);
    274289   //this->setAbsDirSoft(mouseDir,5);
    275    
     290
    276291  // this is the air friction (necessary for a smooth control)
    277292  if(velocity.len() != 0) velocity -= velocity*0.01;
     
    308323  /* calculate the direction in which the craft is heading  */
    309324
     325  Plane plane(Vector(0,1,0), Vector(0,0,0));
     326
    310327  if( this->bUp )
    311328   {
    312329     //this->shiftCoor(this->getAbsDirX());
    313330      accel += (this->getAbsDirX())*2;
    314      
     331
    315332      /* Heli-Steuerung
    316333         accel += (this->getAbsDirX()*2;
Note: See TracChangeset for help on using the changeset viewer.