Changeset 5901 in orxonox.OLD for branches/spaceshipcontrol/src/world_entities/player.cc
- Timestamp:
- Dec 3, 2005, 7:23:37 PM (18 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.