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/space_ship.cc

    r6803 r6804  
    306306void SpaceShip::tick (float time)
    307307{
    308   this->getWeaponManager()->tick(time);
    309   // weapon system manipulation
    310   this->weaponAction();
     308  Playable::tick(time);
    311309
    312310  if( ( xMouse != 0 || yMouse != 0 ) && this->getOwner() == this->getHostID() )
     
    464462
    465463/**
    466  * weapon manipulation by the player
    467 */
    468 void SpaceShip::weaponAction()
    469 {
    470   if( this->bFire)
    471     {
    472       this->getWeaponManager()->fire();
    473     }
    474 }
    475 
    476 /**
    477464 * @todo switch statement ??
    478465 */
    479466void SpaceShip::process(const Event &event)
    480467{
     468  Playable::process(event);
     469
    481470  if( event.type == KeyMapper::PEV_LEFT)
    482471      this->bRollL = event.bPressed;
    483472  else if( event.type == KeyMapper::PEV_RIGHT)
    484473      this->bRollR = event.bPressed;
    485   else if( event.type == KeyMapper::PEV_FIRE1)
    486       this->bFire = event.bPressed;
    487   else if( event.type == KeyMapper::PEV_NEXT_WEAPON && event.bPressed)
    488   {
    489     this->nextWeaponConfig();//if( !event.bPressed) this->bWeaponChange = !this->bWeaponChange;
    490   }
    491   else if ( event.type == KeyMapper::PEV_PREVIOUS_WEAPON && event.bPressed)
    492     this->previousWeaponConfig();
    493474  else if( event.type == KeyMapper::PEV_UP)
    494475    this->bUp = event.bPressed; //this->shiftCoor(0,.1,0);
Note: See TracChangeset for help on using the changeset viewer.