Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6506 in orxonox.OLD for branches/spaceshipcontrol/src/world_entities


Ignore:
Timestamp:
Jan 12, 2006, 4:10:05 PM (19 years ago)
Author:
bknecht
Message:

Control: Some keys for SpaceShip and Helicopter can now be altered in orxonox.conf

Location:
branches/spaceshipcontrol/src/world_entities/space_ships
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/spaceshipcontrol/src/world_entities/space_ships/helicopter.cc

    r6505 r6506  
    134134
    135135  //add events to the eventlist
    136   registerEvent(SDLK_w);
    137   registerEvent(SDLK_s);
    138   registerEvent(SDLK_a);
    139   registerEvent(SDLK_d);
    140   registerEvent(SDLK_q);
     136  registerEvent(KeyMapper::PEV_UP);
     137  registerEvent(KeyMapper::PEV_DOWN);
     138  registerEvent(KeyMapper::PEV_LEFT);
     139  registerEvent(KeyMapper::PEV_RIGHT);
     140  //registerEvent(SDLK_q);
    141141  registerEvent(SDLK_e);
    142142  registerEvent(SDLK_c);
     
    144144  registerEvent(KeyMapper::PEV_NEXT_WEAPON);
    145145  registerEvent(KeyMapper::PEV_PREVIOUS_WEAPON);
    146   registerEvent(SDLK_PAGEUP);
    147   registerEvent(SDLK_PAGEDOWN);
     146  //registerEvent(SDLK_PAGEUP);
     147  //registerEvent(SDLK_PAGEDOWN);
    148148  registerEvent(EV_MOUSE_MOTION);
    149149
     
    442442
    443443
    444   if( event.type == SDLK_a)
     444  if( event.type == KeyMapper::PEV_LEFT)
    445445      this->bLeft = event.bPressed;
    446   else if( event.type == SDLK_d)
     446  else if( event.type == KeyMapper::PEV_RIGHT)
    447447      this->bRight = event.bPressed;
    448448  else if( event.type == KeyMapper::PEV_FIRE1)
     
    456456  else if( event.type == SDLK_c)
    457457    this->bDescend = event.bPressed; //this->shiftCoor(0,-.1,0);
    458   else if( event.type == SDLK_w)
     458  else if( event.type == KeyMapper::PEV_UP)
    459459    this->bUp = event.bPressed; //this->shiftCoor(0,.1,0);
    460   else if( event.type == SDLK_s)
     460  else if( event.type == KeyMapper::PEV_DOWN)
    461461    this->bDown = event.bPressed; //this->shiftCoor(0,-.1,0);
    462462  else if( event.type == EV_MOUSE_MOTION)
  • branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.cc

    r6505 r6506  
    152152
    153153  //add events to the eventlist
    154   registerEvent(SDLK_w);
    155   registerEvent(SDLK_s);
    156   registerEvent(SDLK_a);
    157   registerEvent(SDLK_d);
    158   registerEvent(SDLK_q);
    159   registerEvent(SDLK_e);
     154  registerEvent(KeyMapper::PEV_UP);
     155  registerEvent(KeyMapper::PEV_DOWN);
     156  registerEvent(KeyMapper::PEV_LEFT);
     157  registerEvent(KeyMapper::PEV_RIGHT);
     158  //registerEvent(SDLK_q);
     159  //registerEvent(SDLK_e);
    160160  registerEvent(KeyMapper::PEV_FIRE1);
    161161  registerEvent(KeyMapper::PEV_NEXT_WEAPON);
    162162  registerEvent(KeyMapper::PEV_PREVIOUS_WEAPON);
    163   registerEvent(SDLK_PAGEUP);
    164   registerEvent(SDLK_PAGEDOWN);
     163  //registerEvent(SDLK_PAGEUP);
     164  //registerEvent(SDLK_PAGEDOWN);
    165165  registerEvent(EV_MOUSE_MOTION);
    166166
     
    422422
    423423
    424   if( event.type == SDLK_a)
     424  if( event.type == KeyMapper::PEV_LEFT)
    425425      this->bRollL = event.bPressed;
    426   else if( event.type == SDLK_d)
     426  else if( event.type == KeyMapper::PEV_RIGHT)
    427427      this->bRollR = event.bPressed;
    428428  else if( event.type == KeyMapper::PEV_FIRE1)
     
    434434  else if ( event.type == KeyMapper::PEV_PREVIOUS_WEAPON && event.bPressed)
    435435    this->previousWeaponConfig();
    436   else if( event.type == SDLK_w)
     436  else if( event.type == KeyMapper::PEV_UP)
    437437    this->bUp = event.bPressed; //this->shiftCoor(0,.1,0);
    438   else if( event.type == SDLK_s)
     438  else if( event.type == KeyMapper::PEV_DOWN)
    439439    this->bDown = event.bPressed; //this->shiftCoor(0,-.1,0);
    440440  else if( event.type == EV_MOUSE_MOTION)
Note: See TracChangeset for help on using the changeset viewer.