Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 3, 2005, 5:18:37 PM (18 years ago)
Author:
bensch
Message:

controll: playable interface work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/spaceshipcontrol/src/world_entities/player.cc

    r5883 r5895  
    6161
    6262
    63 void Player::setControllable(Playable* controllalble)
     63bool Player::setControllable(Playable* controllable)
    6464{
    65 
    66   this->controllable = controllalble;
    67   this->controllable->subscribeEvents(this);
    68 
     65  if(controllable != NULL && controllable->subscribePlayer(this))
     66  {
     67      this->controllable = controllable;
     68      return true;
     69  }
     70  else
     71    return false;
    6972}
    7073
    7174
    72 
    73 Playable* Player::getControllable()
    74 {
    75   return controllable;
    76 }
    77 
Note: See TracChangeset for help on using the changeset viewer.