- Timestamp:
- Dec 3, 2005, 7:23:37 PM (19 years ago)
- Location:
- branches/spaceshipcontrol/src/world_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/spaceshipcontrol/src/world_entities/player.cc
r5899 r5901 53 53 54 54 55 56 void Player::process(const Event &event)57 {58 if (likely(this->controllable != NULL))59 this->controllable->process(event);60 }61 62 63 55 bool Player::setControllable(Playable* controllable) 64 56 { … … 72 64 } 73 65 66 bool Player::disconnectControllable() 67 { 68 if(this->controllable == NULL) return true; 74 69 70 if(this->controllable->unsubscribePlayer(this)) 71 { 72 this->controllable = NULL; 73 return true; 74 } 75 else 76 return false; 77 } 78 79 void Player::process(const Event &event) 80 { 81 if (likely(this->controllable != NULL)) 82 this->controllable->process(event); 83 } 84 -
branches/spaceshipcontrol/src/world_entities/player.h
r5899 r5901 26 26 27 27 bool setControllable(Playable* controllalble); 28 void disconnectControllable();29 28 inline Playable* getControllable() { return this->controllable; }; 29 30 bool disconnectControllable(); 30 31 31 32 // eventListener extension. -
branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.cc
r5900 r5901 256 256 Vector move = (velocity)*time; 257 257 258 if( velocity.len() != 0 )258 /*if( velocity.len() != 0 ) 259 259 { 260 260 this->setAbsDir(Quaternion(velocity, Vector(0,1,0)) * Quaternion ( -M_PI_2, Vector(0,1,0))); 261 261 } 262 262 */ 263 263 this->shiftCoor (move); 264 264 … … 289 289 if(velocity.len() == 0) 290 290 accel += ((this->getAbsDir()).getSpacialAxis().getNormalized()); 291 else292 travelSpeed++;291 //else 292 //travelSpeed++; 293 293 } 294 294 … … 297 297 if(velocity.len() == 0) 298 298 accel -= ((this->getAbsDir()).getSpacialAxis().getNormalized()); 299 else300 travelSpeed--;299 // else 300 //travelSpeed--; 301 301 } 302 302
Note: See TracChangeset
for help on using the changeset viewer.