Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6464 in orxonox.OLD


Ignore:
Timestamp:
Jan 10, 2006, 2:53:57 PM (18 years ago)
Author:
patrick
Message:

network: MultiPlayerWorld debug now switches between to playabilities. Here is the playable bug

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

Legend:

Unmodified
Added
Removed
  • branches/network/src/story_entities/multi_player_world_data.cc

    r6463 r6464  
    5959MultiPlayerWorldData::MultiPlayerWorldData()
    6060    : GameWorldData()
    61 {}
     61{
     62  this->toggle = false;
     63}
    6264
    6365
     
    234236  assert(playableList != NULL);
    235237  std::list<BaseObject*>::const_iterator entity;
     238
     239
     240
    236241  for (entity = playableList->begin(); entity != playableList->end(); entity++)
    237242  {
     
    240245  }
    241246
     247
     248  if( this->toggle)
     249  {
     250    playable = dynamic_cast<Playable*>(playableList->front());
     251    this->localPlayer->disconnectControllable();
     252    this->localPlayer->setControllable(playable);
     253    this->toggle = !this->toggle;
     254  }
     255  else
     256  {
     257    playable = dynamic_cast<Playable*>(playableList->back());
     258    this->localPlayer->disconnectControllable();
     259    this->localPlayer->setControllable(playable);
     260    this->toggle = !this->toggle;
     261  }
     262
     263
     264
    242265  PNode* cam = State::getCameraTarget();
    243266  PRINT(0)("Camera has target - class: %s, name: %s, uid: %i\n", cam->getClassName(), cam->getName(), cam->getUniqueID());
  • branches/network/src/story_entities/multi_player_world_data.h

    r6463 r6464  
    3535    virtual ErrorMessage unloadWorldEntities();
    3636    virtual ErrorMessage unloadScene();
     37
     38  private:
     39    bool toggle;
    3740};
    3841
Note: See TracChangeset for help on using the changeset viewer.