Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 28, 2006, 11:29:03 AM (20 years ago)
Author:
bensch
Message:

trunk: remastered Playables a bit

File:
1 edited

Legend:

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

    r6803 r6804  
    252252 * @param time The timespan passed since last update
    253253*/
    254 void Hover::tick (float time)
    255 {
     254void Hover::tick (float dt)
     255{
     256  Playable::tick(dt);
     257
    256258  if( xMouse != 0 || yMouse != 0)
    257259   {
     
    263265
    264266  // spaceship controlled movement
    265   this->calculateVelocity(time);
    266 
    267   Vector move = (velocity)*time;
     267  this->calculateVelocity(dt);
     268
     269  Vector move = (velocity)*dt;
    268270
    269271  // this is the air friction (necessary for a smooth control)
     
    271273  this->shiftCoor (move);
    272274
    273   this->getWeaponManager()->tick(time);
    274   // weapon system manipulation
    275   this->weaponAction();
    276275}
    277276
     
    400399{
    401400  Vector tmpRot;
    402 
    403401  WorldEntity::draw();
    404402
     
    463461void Hover::process(const Event &event)
    464462{
    465 
     463  Playable::process(event);
    466464
    467465  if( event.type == KeyMapper::PEV_LEFT)
     
    469467  else if( event.type == KeyMapper::PEV_RIGHT)
    470468      this->bRight = event.bPressed;
    471   else if( event.type == KeyMapper::PEV_FIRE1)
    472       this->bFire = event.bPressed;
    473   else if( event.type == KeyMapper::PEV_NEXT_WEAPON && event.bPressed)
    474     this->getWeaponManager()->nextWeaponConfig();//if( !event.bPressed) this->bWeaponChange = !this->bWeaponChange;
    475   else if ( event.type == KeyMapper::PEV_PREVIOUS_WEAPON && event.bPressed)
    476     this->getWeaponManager()->previousWeaponConfig();
    477469  else if( event.type == SDLK_e)
    478470    this->bAscend = event.bPressed; //this->shiftCoor(0,.1,0);
Note: See TracChangeset for help on using the changeset viewer.