- Timestamp:
- Jan 25, 2006, 4:28:37 PM (19 years ago)
- Location:
- branches/network/src/lib/network
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/network_game_manager.cc
r6706 r6715 32 32 #include "network_manager.h" 33 33 34 #include "class_list.h" 34 35 35 36 /* include your own header */ … … 462 463 463 464 465 466 bool NetworkGameManager::signalLeftPlayer(int userID) 467 { 468 const std::list<BaseObject*>* playableList = ClassList::getList(CL_PLAYABLE); 469 std::list<BaseObject*>::const_iterator it = playableList->begin(); 470 471 for(; it != playableList->end(); it++) 472 { 473 if( dynamic_cast<Synchronizeable*>(*it)->getOwner() == userID ) 474 { 475 PRINTF(0)("remove playable from %i\n", userID); 476 this->removeEntity(dynamic_cast<Synchronizeable*>(*it)->getUniqueID()); 477 return true; 478 } 479 } 480 return false; 481 } 482 483 464 484 /** 465 485 * Creates a buffer for user n -
branches/network/src/lib/network/network_game_manager.h
r6695 r6715 95 95 void sendEntityList(int userID); 96 96 97 bool signalNewPlayer(int userId); 98 bool signalLeftPlayer(int userID); 99 97 100 98 101 private: … … 133 136 bool canCreateEntity(ClassID classID); 134 137 135 bool signalNewPlayer(int userId);136 137 138 void resizeBufferVector(int n); 138 139 -
branches/network/src/lib/network/network_stream.cc
r6695 r6715 390 390 handshakes[i] = NULL; 391 391 392 393 NetworkGameManager::getInstance()->signalLeftPlayer(i); 394 392 395 if ( i == networkSockets.size()-1 ) 393 396 {
Note: See TracChangeset
for help on using the changeset viewer.