Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8096 in orxonox.OLD for branches/network/src/world_entities


Ignore:
Timestamp:
Jun 1, 2006, 6:36:55 PM (19 years ago)
Author:
rennerc
Message:

teamchoice works now

Location:
branches/network/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/world_entities/playable.cc

    r8055 r8096  
    7979  // this->setPlayer(NULL);
    8080  // IN ITS DESTRUCTOR.
     81  detachCamera();
    8182  assert(this->currentPlayer == NULL);
    8283}
     
    281282 */
    282283void  Playable::detachCamera()
    283 {}
     284{
     285  PRINTF(0)("detach camera\n");
     286  if ( (PNode*)(State::getCameraTarget()) == this )
     287  {
     288    PRINTF(0)("lookAt nullParent\n");
     289   
     290    State::getCameraNode()->setParentSoft(PNode::getNullParent());
     291    State::getCameraTargetNode()->setParentSoft(PNode::getNullParent());
     292   
     293    State::getCamera()->lookAt( PNode::getNullParent() );
     294  }
     295}
    284296
    285297
  • branches/network/src/world_entities/player.cc

    r7868 r8096  
    8181      return true;
    8282  }
     83 
     84  if ( playable == NULL )
     85    this->playable = NULL;
    8386
    8487  return true;
Note: See TracChangeset for help on using the changeset viewer.