Changeset 6464 in orxonox.OLD for branches/network
- Timestamp:
- Jan 10, 2006, 2:53:57 PM (19 years ago)
- 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 59 59 MultiPlayerWorldData::MultiPlayerWorldData() 60 60 : GameWorldData() 61 {} 61 { 62 this->toggle = false; 63 } 62 64 63 65 … … 234 236 assert(playableList != NULL); 235 237 std::list<BaseObject*>::const_iterator entity; 238 239 240 236 241 for (entity = playableList->begin(); entity != playableList->end(); entity++) 237 242 { … … 240 245 } 241 246 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 242 265 PNode* cam = State::getCameraTarget(); 243 266 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 35 35 virtual ErrorMessage unloadWorldEntities(); 36 36 virtual ErrorMessage unloadScene(); 37 38 private: 39 bool toggle; 37 40 }; 38 41
Note: See TracChangeset
for help on using the changeset viewer.