- Timestamp:
- May 31, 2005, 1:05:26 AM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/story_entities/world.cc
r4410 r4412 426 426 this->eventHandler->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_LEFT); 427 427 this->eventHandler->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_RIGHT); 428 this->eventHandler->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_FIRE1); 429 this->eventHandler->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_NEXT_WEAPON); 430 this->eventHandler->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_PREVIOUS_WEAPON); 428 431 429 432 // bind camera -
orxonox/trunk/src/util/event/key_mapper.cc
r4411 r4412 37 37 int KeyMapper::PEV_FIRE1 = -1; 38 38 int KeyMapper::PEV_FIRE2 = -1; 39 int KeyMapper::PEV_PREVIOUS_WEAPON = -1; 40 int KeyMapper::PEV_NEXT_WEAPON = -1; 39 41 40 42 int KeyMapper::PEV_VIEW0 = -1; … … 64 66 {&KeyMapper::PEV_FIRE1, "Fire1"}, 65 67 {&KeyMapper::PEV_FIRE2, "Fire2"}, 68 {&KeyMapper::PEV_NEXT_WEAPON, "Next"}, 69 {&KeyMapper::PEV_PREVIOUS_WEAPON, "Prev"}, 70 66 71 67 72 {&KeyMapper::PEV_VIEW0, "view0"}, -
orxonox/trunk/src/util/event/key_mapper.h
r4410 r4412 49 49 static int PEV_FIRE1; 50 50 static int PEV_FIRE2; 51 static int PEV_PREVIOUS_WEAPON; 52 static int PEV_NEXT_WEAPON; 51 53 52 54 static int PEV_VIEW0; -
orxonox/trunk/src/world_entities/player.cc
r4409 r4412 234 234 accel = accel+(direction*acceleration); 235 235 if( this->bDown && this->getRelCoor().x > -5) 236 accel = accel -(direction*acceleration);236 accel = accel -(direction*acceleration); 237 237 if( this->bLeft && TrackManager::getInstance()->getWidth() > -this->getRelCoor().z*2) 238 238 accel = accel + (orthDirection*acceleration); … … 300 300 this->bRight = event.bPressed; 301 301 } 302 303 } 302 else if( event.type == KeyMapper::PEV_FIRE1) 303 { 304 this->bFire = event.bPressed; 305 } 306 else if( event.type == KeyMapper::PEV_NEXT_WEAPON) 307 { 308 if( !event.bPressed) this->bWeaponChange = !this->bWeaponChange; 309 } 310 311 }
Note: See TracChangeset
for help on using the changeset viewer.