Changeset 1574 for code/branches/core3/src/network/ConnectionManager.cc
- Timestamp:
- Jun 9, 2008, 4:35:38 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core3/src/network/ConnectionManager.cc
r1534 r1574 64 64 { 65 65 //boost::thread_group network_threads; 66 66 67 67 ConnectionManager::ConnectionManager():receiverThread_(0){} 68 68 boost::recursive_mutex ConnectionManager::enet_mutex_; 69 69 70 70 ConnectionManager::ConnectionManager(ClientInformation *head) : receiverThread_(0) { 71 71 quit=false; … … 74 74 head_ = head; 75 75 } 76 76 77 77 ConnectionManager::ConnectionManager(ClientInformation *head, int port){ 78 78 quit=false; … … 115 115 return packet; 116 116 }*/ 117 117 118 118 ENetEvent *ConnectionManager::getEvent(){ 119 119 if(!buffer.isEmpty()) … … 251 251 } 252 252 } 253 253 254 254 //### added some bugfixes here, but we cannot test them because 255 255 //### the server crashes everytime because of some gamestates … … 333 333 } 334 334 335 336 335 336 337 337 bool ConnectionManager::removeShip(ClientInformation *client){ 338 338 int id=client->getShipID(); 339 339 orxonox::Iterator<orxonox::SpaceShip> it; 340 for(it = orxonox::ObjectList<orxonox::SpaceShip>:: start(); it; ++it){340 for(it = orxonox::ObjectList<orxonox::SpaceShip>::begin(); it; ++it){ 341 341 if(it->objectID!=id) 342 342 continue; … … 345 345 return true; 346 346 } 347 347 348 348 bool ConnectionManager::sendWelcome(int clientID, int shipID, bool allowed){ 349 349 if(addPacket(packet_gen.generateWelcome(clientID, shipID, allowed),clientID)){ … … 353 353 return false; 354 354 } 355 355 356 356 void ConnectionManager::disconnectClient(ClientInformation *client){ 357 357 { … … 362 362 removeShip(client); 363 363 } 364 364 365 365 bool ConnectionManager::addFakeConnectRequest(ENetEvent *ev){ 366 366 ENetEvent event; … … 369 369 return buffer.push(&event); 370 370 } 371 372 371 372 373 373 374 374 }
Note: See TracChangeset
for help on using the changeset viewer.