Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8147 in orxonox.OLD for trunk/src/world_entities


Ignore:
Timestamp:
Jun 5, 2006, 12:09:15 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the network branche back here
merged with command:
svn merge -r8070:HEAD https://svn.orxonox.net/orxonox/branches/network .
no conflicts

Location:
trunk/src/world_entities
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/playable.cc

    r8055 r8147  
    7979  // this->setPlayer(NULL);
    8080  // IN ITS DESTRUCTOR.
     81 
    8182  assert(this->currentPlayer == NULL);
    8283}
     
    281282 */
    282283void  Playable::detachCamera()
    283 {}
     284{
     285}
    284286
    285287
  • trunk/src/world_entities/player.cc

    r8145 r8147  
    8181      return true;
    8282  }
     83 
     84  if ( playable == NULL )
     85    this->playable = NULL;
    8386
    8487  return true;
  • trunk/src/world_entities/spectator.cc

    r8068 r8147  
    7171{
    7272  this->mouseDir =  rot;
    73   this->rotY = Quaternion( rot.getHeading(), Vector( 0, 1, 0) );
    74   this->rotAxis = Quaternion( rot.getAttitude(), Vector( 0, 0, 1 ) );
     73  this->angleY = rot.getHeading();
     74  this->angleX = rot.getAttitude();
    7575}
    7676
     
    104104    yMouse *= time / 10;
    105105   
    106     this->rotY *= Quaternion(-M_PI/4.0*this->xMouse, Vector(0,1,0));
    107     this->rotAxis *= Quaternion(-M_PI/4.0*this->yMouse, Vector(0,0,1) );
    108 
    109     this->mouseDir = rotY * rotAxis;
    110     //this->mouseDir *= Quaternion(-M_PI/4.0*this->yMouse, Vector(0,0,1));
     106    angleX -= xMouse;
     107    angleY -= yMouse;
     108   
     109    if ( angleY > 2.05 )
     110      angleY = 2.05;
     111   
     112    if ( angleY < -1.15 )
     113      angleY = -1.15;
     114   
     115    this->mouseDir = Quaternion( angleX, Vector( 0, 1, 0 ) ) * Quaternion( angleY, Vector( 0, 0, 1 ) );
     116   
    111117    xMouse = yMouse = 0;
    112118  }
    113119 
    114120  this->setAbsDir( this->mouseDir );
     121 
     122  Vector velocity;
     123 
     124  if ( this->bForward )
     125  {
     126    velocity += this->getAbsDirX();
     127  }
     128 
     129  if ( this->bBackward )
     130  {
     131    velocity -= this->getAbsDirX();
     132  }
     133 
     134  if ( this->bRight )
     135  {
     136    velocity += this->getAbsDirZ();
     137  }
     138 
     139  if ( this->bLeft )
     140  {
     141    velocity -= this->getAbsDirZ();
     142  }
     143 
     144  velocity *= 100;
     145 
     146  this->shiftCoor( velocity*time );
    115147}
    116148
  • trunk/src/world_entities/spectator.h

    r8068 r8147  
    3535    Quaternion            mouseDir;           //!< the direction where the player wants to fly
    3636
    37     Quaternion            rotY;
    38     Quaternion            rotAxis;
     37    //Quaternion            rotY;
     38    //Quaternion            rotAxis;
     39    float                 angleX;
     40    float                 angleY;
    3941};
    4042
  • trunk/src/world_entities/weapons/weapon_manager.cc

    r7350 r8147  
    5555{
    5656  // crosshair being a PNode it must not be deleted (this is because PNodes delete themselves.)
    57   //delete this->crosshair;
     57  // rennerc: crosshair seems not to delete itselve
     58  delete this->crosshair;
    5859}
    5960
Note: See TracChangeset for help on using the changeset viewer.