Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10401 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Jan 27, 2007, 12:10:56 AM (18 years ago)
Author:
snellen
Message:

last checkin

File:
1 edited

Legend:

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

    r10114 r10401  
    102102  registerVar( new SynchronizeableBool( &bBackward, &bBackward, "bBackward", PERMISSION_OWNER ) );
    103103  registerVar( new SynchronizeableQuaternion( &mouseDir, &mouseDir, "mouseDir", PERMISSION_OWNER ) );
     104
     105  this->setPlayDirection(Quaternion(0,Vector(0,1,0)), 0.);
    104106}
    105107
     
    167169void Spectator::tick (float time)
    168170{
    169   Playable::tick( time );
     171//   Playable::tick( time );
    170172
    171173  if( ( xMouse != 0 || yMouse != 0 ) && ( !State::isOnline() || this->getOwner() == SharedNetworkData::getInstance()->getHostID() ) )
     
    177179    angleY -= yMouse;
    178180
    179     if ( angleY > 2.05 )
    180       angleY = 2.05;
    181 
    182     if ( angleY < -1.15 )
    183       angleY = -1.15;
     181//     if ( angleY > 1.90 )
     182//       angleY = 1.95;
     183//
     184//     if ( angleY < -1.07 )
     185//       angleY = -1.07;
     186   
     187    xMouse = yMouse = 0;
    184188
    185189    this->mouseDir = Quaternion( angleX, Vector( 0, 1, 0 ) ) * Quaternion( angleY, Vector( 0, 0, 1 ) );
    186190
    187     xMouse = yMouse = 0;
     191   
     192   
    188193  }
    189194
     
    240245  {
    241246//     FPSPlayer * fps = new FPSPlayer();
    242     //GenericNPC* fps = new GenericNPC();
    243     WorldEntity* fps = new WorldEntity();
    244     //WorldEntity * fps = new WorldEntity();
    245 
    246     fps->setAbsCoor( this->getAbsCoorX(), this->getAbsCoorY(), this->getAbsCoorZ() );
    247     fps->setAbsDir( this->getAbsDir() );
    248     fps->loadMD2Texture( "doom_guy.png" );
    249     fps->loadModel( "models/creatures/doom_guy.md2", 10.0f );
    250     fps->toList( OM_GROUP_00);
    251     //fps->loadModel( "models/ships/terran_cruizer.obj" );
    252 
    253     //((Playable*)fps)->setPlayDirection(  0, 0, 1, 0 );
    254   }
    255 }
    256 
    257 
    258 
    259 
     247//     //GenericNPC* fps = new GenericNPC();
     248//     WorldEntity* fps = new WorldEntity();
     249//     //WorldEntity * fps = new WorldEntity();
     250//
     251//     fps->setAbsCoor( this->getAbsCoorX(), this->getAbsCoorY(), this->getAbsCoorZ() );
     252//     fps->setAbsDir( this->getAbsDir() );
     253//     fps->loadMD2Texture( "doom_guy.png" );
     254//     fps->loadModel( "models/creatures/doom_guy.md2", 10.0f );
     255//     fps->toList( OM_GROUP_00);
     256//     //fps->loadModel( "models/ships/terran_cruizer.obj" );
     257
     258//     ((Playable*)fps)->setPlayDirection(  0, 0, 1, 0 );
     259  }
     260}
     261
     262
     263
     264
Note: See TracChangeset for help on using the changeset viewer.