Changeset 5921 in orxonox.OLD
- Timestamp:
- Dec 4, 2005, 11:22:50 PM (19 years ago)
- Location:
- branches/spaceshipcontrol/src/world_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.cc
r5919 r5921 30 30 #include "factory.h" 31 31 #include "key_mapper.h" 32 #include "event_handler.h" 32 33 33 34 using namespace std; … … 132 133 registerEvent(SDLK_PAGEUP); 133 134 registerEvent(SDLK_PAGEDOWN); 135 registerEvent(EV_MOUSE_MOTION); 134 136 135 137 this->getWeaponManager()->setSlotCount(7); … … 261 263 // this is the air friction (necessary for a smooth control) 262 264 if(velocity.len() != 0) velocity -= velocity*0.005; 265 266 this->shiftDir(Quaternion(-M_PI/4*xMouse*time, Vector(0,1,0))*Quaternion(-M_PI/4*yMouse*time, Vector(0,0,1))); 263 267 264 268 this->shiftCoor (move); … … 369 373 else if( event.type == SDLK_PAGEDOWN) 370 374 this->bDescend = event.bPressed; //this->shiftCoor(0,-.1,0); 375 else if( event.type == EV_MOUSE_MOTION) 376 { 377 this->xMouse = event.x; 378 this->yMouse = event.y; 379 } 371 380 } 372 381 -
branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.h
r5907 r5921 55 55 bool bDescend; //!< descend button presses. 56 56 bool bFire; //!< fire button pressed. 57 58 float xMouse; //!< mouse moved in x-Direction 59 float yMouse; //!< mouse moved in y-Direction 57 60 58 61 Vector velocity; //!< the velocity of the player. -
branches/spaceshipcontrol/src/world_entities/weapons/crosshair.cc
r5750 r5921 70 70 this->material = new Material; 71 71 72 EventHandler::getInstance()->subscribe(this, ES_GAME, EV_MOUSE_MOTION);72 //EventHandler::getInstance()->subscribe(this, ES_GAME, EV_MOUSE_MOTION); 73 73 74 74 // center the mouse on the screen, and also hide the cursors
Note: See TracChangeset
for help on using the changeset viewer.